mirror of
https://github.com/fatedier/frp.git
synced 2025-07-12 02:05:14 +02:00
let role default value to 'server'
This commit is contained in:
@ -632,6 +632,9 @@ func (cfg *StcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmpStr := section["role"]
|
tmpStr := section["role"]
|
||||||
|
if tmpStr == "" {
|
||||||
|
tmpStr = "server"
|
||||||
|
}
|
||||||
if tmpStr == "server" || tmpStr == "visitor" {
|
if tmpStr == "server" || tmpStr == "visitor" {
|
||||||
cfg.Role = tmpStr
|
cfg.Role = tmpStr
|
||||||
} else {
|
} else {
|
||||||
@ -721,6 +724,9 @@ func (cfg *XtcpProxyConf) LoadFromFile(name string, section ini.Section) (err er
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmpStr := section["role"]
|
tmpStr := section["role"]
|
||||||
|
if tmpStr == "" {
|
||||||
|
tmpStr = "server"
|
||||||
|
}
|
||||||
if tmpStr == "server" || tmpStr == "visitor" {
|
if tmpStr == "server" || tmpStr == "visitor" {
|
||||||
cfg.Role = tmpStr
|
cfg.Role = tmpStr
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user