feat: support tuicV5
This commit is contained in:
@ -84,16 +84,17 @@ type tunSchema struct {
|
||||
}
|
||||
|
||||
type tuicServerSchema struct {
|
||||
Enable bool `yaml:"enable" json:"enable"`
|
||||
Listen *string `yaml:"listen" json:"listen"`
|
||||
Token *[]string `yaml:"token" json:"token"`
|
||||
Certificate *string `yaml:"certificate" json:"certificate"`
|
||||
PrivateKey *string `yaml:"private-key" json:"private-key"`
|
||||
CongestionController *string `yaml:"congestion-controller" json:"congestion-controller,omitempty"`
|
||||
MaxIdleTime *int `yaml:"max-idle-time" json:"max-idle-time,omitempty"`
|
||||
AuthenticationTimeout *int `yaml:"authentication-timeout" json:"authentication-timeout,omitempty"`
|
||||
ALPN *[]string `yaml:"alpn" json:"alpn,omitempty"`
|
||||
MaxUdpRelayPacketSize *int `yaml:"max-udp-relay-packet-size" json:"max-udp-relay-packet-size,omitempty"`
|
||||
Enable bool `yaml:"enable" json:"enable"`
|
||||
Listen *string `yaml:"listen" json:"listen"`
|
||||
Token *[]string `yaml:"token" json:"token"`
|
||||
Users *map[string]string `yaml:"users" json:"users,omitempty"`
|
||||
Certificate *string `yaml:"certificate" json:"certificate"`
|
||||
PrivateKey *string `yaml:"private-key" json:"private-key"`
|
||||
CongestionController *string `yaml:"congestion-controller" json:"congestion-controller,omitempty"`
|
||||
MaxIdleTime *int `yaml:"max-idle-time" json:"max-idle-time,omitempty"`
|
||||
AuthenticationTimeout *int `yaml:"authentication-timeout" json:"authentication-timeout,omitempty"`
|
||||
ALPN *[]string `yaml:"alpn" json:"alpn,omitempty"`
|
||||
MaxUdpRelayPacketSize *int `yaml:"max-udp-relay-packet-size" json:"max-udp-relay-packet-size,omitempty"`
|
||||
}
|
||||
|
||||
func getConfigs(w http.ResponseWriter, r *http.Request) {
|
||||
@ -186,6 +187,9 @@ func pointerOrDefaultTuicServer(p *tuicServerSchema, def LC.TuicServer) LC.TuicS
|
||||
if p.Token != nil {
|
||||
def.Token = *p.Token
|
||||
}
|
||||
if p.Users != nil {
|
||||
def.Users = *p.Users
|
||||
}
|
||||
if p.Certificate != nil {
|
||||
def.Certificate = *p.Certificate
|
||||
}
|
||||
|
Reference in New Issue
Block a user