Skip to content

Commit

Permalink
chore: 移除 inet online 判断
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Sep 4, 2023
1 parent e77448e commit e58128f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/srun/srun.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"errors"
log "github.com/sirupsen/logrus"
"net/http"
"strings"
)

type Conf struct {
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit e58128f

Please sign in to comment.