Files
BitSrunLoginGo/util/checker.go
2021-09-19 22:47:53 +08:00

19 lines
306 B
Go

package util
import "github.com/Mmx233/tool"
type checker struct{}
var Checker checker
func (checker) NetOk() bool {
h, _, e := tool.HTTP.GetBytes(&tool.GetRequest{
Url: "https://www.baidu.com/",
Redirect: false,
})
if e != nil || h.Get("Location") != "" {
return false
}
return true
}