Skip to content

Commit

Permalink
improve: 认证双栈网络时 ip 留空
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Dec 3, 2023
1 parent 6608808 commit 605637e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/controllers/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ func Login(eth *tools.Eth, debugOutput bool) error {
return err
}

log.Debugln("认证客户端 ip: ", ip)
var loginIp string

if config.Meta.DoubleStack {
log.Debugln("使用双栈网络时认证 ip 为空")
} else {
loginIp = ip
log.Debugln("认证客户端 ip: ", ip)
}

// 登录执行

Expand All @@ -72,7 +79,7 @@ func Login(eth *tools.Eth, debugOutput bool) error {
} else {
log.Infoln("检测到用户未登录,开始尝试登录...")

if err = srunClient.DoLogin(ip); err != nil {
if err = srunClient.DoLogin(loginIp); err != nil {
return err
}

Expand Down

0 comments on commit 605637e

Please sign in to comment.