chore: 移除 inet online 判断

This commit is contained in:
Mmx233
2023-09-04 11:10:37 +08:00
parent e77448eeb9
commit e58128f469

View File

@@ -5,7 +5,6 @@ import (
"errors"
log "github.com/sirupsen/logrus"
"net/http"
"strings"
)
type Conf struct {
@@ -49,13 +48,8 @@ func (c Srun) LoginStatus() (online bool, ip string, err error) {
}
}
// 如果深澜分配的 ip 不是内网 ip说明已经在线且拥有固定 ip
ip = ipInterface.(string)
inet := strings.HasPrefix(ip, "192.168.") || strings.HasPrefix(ip, "10.") || strings.HasPrefix(ip, "172.")
online = errRes.(string) == "ok" || !inet
online = errRes.(string) == "ok"
return
}