From 54dcd1f884e05b0d02c81f593c4029663aa057bc Mon Sep 17 00:00:00 2001 From: masgzy Date: Sun, 23 Aug 2026 00:51:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DHTTP=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=A0=81=E6=A0=A1=E9=AA=8C=E9=80=BB=E8=BE=91=EF=BC=88&&?= =?UTF-8?q?=E6=94=B9=E4=B8=BA||=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task/httping.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/task/httping.go b/task/httping.go index 2f36d69..76ee83d 100644 --- a/task/httping.go +++ b/task/httping.go @@ -61,7 +61,7 @@ func (p *Ping) httping(ip *net.IPAddr) (int, time.Duration, string) { //fmt.Println("IP:", ip, "StatusCode:", response.StatusCode, response.Request.URL) // 如果未指定的 HTTP 状态码,或指定的状态码不合规,则默认只认为 200、301、302 才算 HTTPing 通过 - if HttpingStatusCode == 0 || HttpingStatusCode < 100 && HttpingStatusCode > 599 { + if HttpingStatusCode == 0 || HttpingStatusCode < 100 || HttpingStatusCode > 599 { if response.StatusCode != 200 && response.StatusCode != 301 && response.StatusCode != 302 { if utils.Debug { // 调试模式下,输出更多信息 utils.Red.Printf("[调试] IP: %s, 延迟测速终止,HTTP 状态码: %d, 测速地址: %s\n", ip.String(), response.StatusCode, URL)