换成sock5代理

This commit is contained in:
work
2025-08-22 15:17:46 +08:00
parent 314fb31e3c
commit b30a1f0844
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ SECRET_KEY = 'iPXte32y1deoySiDq0RwONUJIiIgvjTVhbfCL8tV'
BUCKET = 'facebook'
# PROXY
PROXY_HOST = 'http://api.proxy.ip2world.com/getProxyIp?num=1&regions=us&lb=1&return_type=json&protocol=http'
PROXY_HOST = 'http://api.proxy.ip2world.com/getProxyIp?num=1&regions=us&lb=1&return_type=json&protocol=sock5'
api_key = "adf0d1fc9c9313b7f87c18bf9caef01d"

View File

@@ -775,7 +775,7 @@ def get_proxy_from_api():
proxy_port = proxy_datum['port']
if proxy_ip and proxy_port:
return f"http://{proxy_ip}:{proxy_port}"
return f"socks5://{proxy_ip}:{proxy_port}"
raise OperationFailed("获取代理时出错")
except Exception as e: