feat: 多网卡模式支持直接使用网卡 DHCP ip
This commit is contained in:
@@ -33,6 +33,10 @@ func Login(localAddr net.Addr, debugOutput bool) error {
|
|||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if localAddr != nil && global.Config.Settings.Basic.UseDhcpIP {
|
||||||
|
ip = localAddr.(*net.TCPAddr).IP.String()
|
||||||
|
}
|
||||||
|
|
||||||
log.Debugln("认证客户端 ip: ", ip)
|
log.Debugln("认证客户端 ip: ", ip)
|
||||||
|
|
||||||
if online {
|
if online {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ type Basic struct {
|
|||||||
SkipCertVerify bool `json:"skip_cert_verify" yaml:"skip_cert_verify" mapstructure:"skip_cert_verify"`
|
SkipCertVerify bool `json:"skip_cert_verify" yaml:"skip_cert_verify" mapstructure:"skip_cert_verify"`
|
||||||
Timeout uint `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
|
Timeout uint `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
|
||||||
Interfaces string `json:"interfaces" yaml:"interfaces" mapstructure:"interfaces"`
|
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 {
|
type Log struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user