diff --git a/transport/config_json.go b/transport/config_json.go index 571ecf99..b2d98a1e 100644 --- a/transport/config_json.go +++ b/transport/config_json.go @@ -23,6 +23,10 @@ func (this *Config) UnmarshalJSON(data []byte) error { } this.ConnectionReuse = jsonConfig.ConnectionReuse this.enableKcp = jsonConfig.EnableKcp - this.kcpConfig = kcpConfig + this.kcpConfig = jsonConfig.KcpConfig + if jsonConfig.KcpConfig.AdvancedConfig == nil { + jsonConfig.KcpConfig.AdvancedConfig = kcpv.DefaultAdvancedConfigs + } + return nil }