fix: tuic server cwnd parsing

This commit is contained in:
wwqgtxx
2023-06-21 14:00:49 +08:00
parent 6d824c8745
commit 919daf0dbb
3 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,7 @@ type tuicServerSchema struct {
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"`
CWND *int `yaml:"cwnd" json:"cwnd,omitempty"`
}
func getConfigs(w http.ResponseWriter, r *http.Request) {
@ -211,6 +212,9 @@ func pointerOrDefaultTuicServer(p *tuicServerSchema, def LC.TuicServer) LC.TuicS
if p.MaxUdpRelayPacketSize != nil {
def.MaxUdpRelayPacketSize = *p.MaxUdpRelayPacketSize
}
if p.CWND != nil {
def.CWND = *p.CWND
}
}
return def
}