diff --git a/cmd/config/decode.go b/cmd/config/decode.go index 48594e8..af0f602 100644 --- a/cmd/config/decode.go +++ b/cmd/config/decode.go @@ -13,8 +13,8 @@ import ( ) type NetConfig struct { - Gateway string `yaml:"gateway"` // network gateway - Address string `yaml:"address"` // network address + Gateway string `yaml:"gateway" json:"gateway"` // network gateway + Address string `yaml:"address" json:"address"` // network address } type RawConfig struct { diff --git a/cmd/proxy/config.go b/cmd/proxy/config.go index 508b891..86afa8f 100644 --- a/cmd/proxy/config.go +++ b/cmd/proxy/config.go @@ -44,6 +44,9 @@ type inboundObject struct { } func loadLogConfig(logLevel string, logDir string) string { + if logLevel == "" { + logLevel = "warning" // using warning level without log output + } if logLevel != "debug" && logLevel != "info" && logLevel != "warning" && logLevel != "error" && logLevel != "none" { log.Warningf("Unknown log level -> %s", logLevel) diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index b2ebfe8..6f62d3b 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -7,7 +7,7 @@ import ( ) type Config struct { - Log string `yaml:"log" json:"json"` + Log string `yaml:"log" json:"log"` Core string `yaml:"core" json:"core"` Http map[string]int `yaml:"http" json:"http"` Socks map[string]int `yaml:"socks" json:"socks"`