Minor changes

This commit is contained in:
MHSanaei 2026-04-27 15:02:43 +02:00
parent b56db67759
commit 03393c9f52
No known key found for this signature in database
GPG key ID: 7E4060F2FBE5AB7A
3 changed files with 72 additions and 49 deletions

View file

@ -1027,14 +1027,18 @@ type kcpShareFields struct {
}
func (f kcpShareFields) applyToParams(params map[string]string) {
params["headerType"] = f.headerType
if f.headerType != "" && f.headerType != "none" {
params["headerType"] = f.headerType
}
setStringParam(params, "seed", f.seed)
setIntParam(params, "mtu", f.mtu)
setIntParam(params, "tti", f.tti)
}
func (f kcpShareFields) applyToObj(obj map[string]any) {
obj["type"] = f.headerType
if f.headerType != "" && f.headerType != "none" {
obj["type"] = f.headerType
}
setStringField(obj, "path", f.seed)
setIntField(obj, "mtu", f.mtu)
setIntField(obj, "tti", f.tti)