mirror of
https://github.com/baoweise-bot/aimili-vpngate.git
synced 2026-09-06 16:16:53 +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 = [
|
||||
"curl", "-4", "-s",
|
||||
"-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",
|
||||
"--max-time", "5"
|
||||
]
|
||||
@@ -3460,7 +3460,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
proxy_ok=False,
|
||||
proxy_ip="-",
|
||||
proxy_latency_ms=0,
|
||||
proxy_error=result.get("reason", "未知错误")
|
||||
proxy_error=result.get("error", "未知错误")
|
||||
)
|
||||
self.send_json(result)
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user