diff --git a/models/config/proxy.go b/models/config/proxy.go index 21e8664..ac9853f 100644 --- a/models/config/proxy.go +++ b/models/config/proxy.go @@ -632,6 +632,9 @@ func (cfg *StcpProxyConf) LoadFromFile(name string, section ini.Section) (err er } tmpStr := section["role"] + if tmpStr == "" { + tmpStr = "server" + } if tmpStr == "server" || tmpStr == "visitor" { cfg.Role = tmpStr } else { @@ -721,6 +724,9 @@ func (cfg *XtcpProxyConf) LoadFromFile(name string, section ini.Section) (err er } tmpStr := section["role"] + if tmpStr == "" { + tmpStr = "server" + } if tmpStr == "server" || tmpStr == "visitor" { cfg.Role = tmpStr } else {