This commit is contained in:
+3
-1
@@ -1063,7 +1063,9 @@ def api_test_proxy():
|
||||
except (ValueError, TypeError):
|
||||
return jsonify({"success": False, "error": "端口号必须是数字"})
|
||||
|
||||
proxy_url = f"{scheme}://{hostname}:{port}"
|
||||
# SOCKS5 强制使用 socks5h,由代理服务器解析 DNS,避免国内 DNS 污染导致测试失败
|
||||
test_scheme = "socks5h" if scheme == "socks5" else scheme
|
||||
proxy_url = f"{test_scheme}://{hostname}:{port}"
|
||||
proxies = {"http": proxy_url, "https": proxy_url}
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user