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

@@ -31,7 +31,7 @@ func main() {
interfaces, _ := tools.GetInterfaceAddr()
for _, eth := range interfaces {
log.Infoln("使用网卡: ", eth.Name)
if err = controllers.Login(eth.Addr, false); err != nil {
if err = controllers.Login(&eth, false); err != nil {
log.Errorf("网卡 %s 登录出错: %v", eth.Name, err)
}
}