From e58128f469199813926a10d6c7b1b0ff0e11530d Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Mon, 4 Sep 2023 11:10:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=20inet=20online=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/srun/srun.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/srun/srun.go b/pkg/srun/srun.go index 9c215d3..7d075a8 100644 --- a/pkg/srun/srun.go +++ b/pkg/srun/srun.go @@ -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 }