mirror of
https://github.com/baoweise-bot/aimili-vpngate.git
synced 2026-09-08 17:26:46 +08:00
fix: update proxy protocol to socks5h and correct proxy error key retrieval
This commit is contained in:
+2
-2
@@ -3039,7 +3039,7 @@ def check_proxy_health() -> dict[str, Any]:
|
|||||||
cmd = [
|
cmd = [
|
||||||
"curl", "-4", "-s",
|
"curl", "-4", "-s",
|
||||||
"-w", "\n%{time_total} %{http_code}",
|
"-w", "\n%{time_total} %{http_code}",
|
||||||
"-x", f"socks5://127.0.0.1:{LOCAL_PROXY_PORT}",
|
"-x", f"socks5h://127.0.0.1:{LOCAL_PROXY_PORT}",
|
||||||
"http://ip.sb",
|
"http://ip.sb",
|
||||||
"--max-time", "5"
|
"--max-time", "5"
|
||||||
]
|
]
|
||||||
@@ -3460,7 +3460,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
proxy_ok=False,
|
proxy_ok=False,
|
||||||
proxy_ip="-",
|
proxy_ip="-",
|
||||||
proxy_latency_ms=0,
|
proxy_latency_ms=0,
|
||||||
proxy_error=result.get("reason", "未知错误")
|
proxy_error=result.get("error", "未知错误")
|
||||||
)
|
)
|
||||||
self.send_json(result)
|
self.send_json(result)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
Reference in New Issue
Block a user