mirror of
https://github.com/fatedier/frp.git
synced 2025-07-29 01:07:38 +00:00
improve error role log info
This commit is contained in:
@@ -635,7 +635,7 @@ func (cfg *StcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
|
|||||||
if tmpStr == "server" || tmpStr == "visitor" {
|
if tmpStr == "server" || tmpStr == "visitor" {
|
||||||
cfg.Role = tmpStr
|
cfg.Role = tmpStr
|
||||||
} else {
|
} else {
|
||||||
cfg.Role = "server"
|
return fmt.Errorf("Parse conf error: incorrect role [%s]", tmpStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.Sk = section["sk"]
|
cfg.Sk = section["sk"]
|
||||||
@@ -724,7 +724,7 @@ func (cfg *XtcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
|
|||||||
if tmpStr == "server" || tmpStr == "visitor" {
|
if tmpStr == "server" || tmpStr == "visitor" {
|
||||||
cfg.Role = tmpStr
|
cfg.Role = tmpStr
|
||||||
} else {
|
} else {
|
||||||
cfg.Role = "server"
|
return fmt.Errorf("Parse conf error: incorrect role [%s]", tmpStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.Sk = section["sk"]
|
cfg.Sk = section["sk"]
|
||||||
|
Reference in New Issue
Block a user