forked from Mxmilu666/frp
add support for command line with frpc
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
var (
|
||||
ServerAddr string = "0.0.0.0"
|
||||
ServerPort int64 = 7000
|
||||
LogFile string = "./frpc.log"
|
||||
LogLevel string = "warn"
|
||||
LogWay string = "file"
|
||||
HeartBeatInterval int64 = 5
|
||||
HeartBeatTimeout int64 = 30
|
||||
LogFile string = "console"
|
||||
LogWay string = "console"
|
||||
LogLevel string = "info"
|
||||
HeartBeatInterval int64 = 20
|
||||
HeartBeatTimeout int64 = 60
|
||||
)
|
||||
|
||||
var ProxyClients map[string]*ProxyClient = make(map[string]*ProxyClient)
|
||||
@@ -43,6 +43,11 @@ func LoadConf(confFile string) (err error) {
|
||||
tmpStr, ok = conf.Get("common", "log_file")
|
||||
if ok {
|
||||
LogFile = tmpStr
|
||||
if LogFile == "console" {
|
||||
LogWay = "console"
|
||||
} else {
|
||||
LogWay = "file"
|
||||
}
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "log_level")
|
||||
@@ -50,11 +55,6 @@ func LoadConf(confFile string) (err error) {
|
||||
LogLevel = tmpStr
|
||||
}
|
||||
|
||||
tmpStr, ok = conf.Get("common", "log_way")
|
||||
if ok {
|
||||
LogWay = tmpStr
|
||||
}
|
||||
|
||||
// proxies
|
||||
for name, section := range conf {
|
||||
if name != "common" {
|
||||
|
||||
Reference in New Issue
Block a user