improve: 为 linux 添加可靠的网卡绑定

This commit is contained in:
Mmx233
2023-06-01 10:02:53 +08:00
parent bcb840560c
commit b0b0f2d6a7
8 changed files with 84 additions and 38 deletions

View File

@@ -11,13 +11,10 @@ var Flags struct {
RunningDaemon bool
//强制daemon
Daemon bool
//指定 client ip
ClientIP string
}
func initFlags() {
flag.StringVar(&Flags.Path, "config", "Config.yaml", "config path")
flag.StringVar(&Flags.ClientIP, "ip", "", "client ip for login")
flag.BoolVar(&Flags.RunningDaemon, "running-daemon", false, "")
flag.BoolVar(&Flags.Daemon, "daemon", false, "")
flag.Parse()

View File

@@ -19,7 +19,6 @@ type Basic struct {
SkipCertVerify bool `json:"skip_cert_verify" yaml:"skip_cert_verify" mapstructure:"skip_cert_verify"`
Timeout uint `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
Interfaces string `json:"interfaces" yaml:"interfaces" mapstructure:"interfaces"`
UseDhcpIP bool `json:"use_dhcp_ip" yaml:"use_dhcp_ip" mapstructure:"use_dhcp_ip"`
}
type Log struct {