Open tomworster opened 8 months ago
Standard requests are not using the proxy username/password.
Was able to fix this as a workaround by modifying utils.py get_proxy as follows:
First, import quote from urllib.parse:
from urllib.parse import quote
Second, update get_proxy when proxy_type is "requests" to add the username/password and format the proxy url as http://username>:<password>@<url:.
if proxy_type.lower()=="requests": user_pass = "" if proxy["proxy_username"] and proxy["proxy_password"]: username = quote(proxy["proxy_username"], safe="") password = quote(proxy["proxy_password"], safe="") user_pass = f"{username}:{password}@" proxy_url = "%s%s%s:%s" % ("http://", user_pass, proxy["proxy_url"], proxy["proxy_port"]) proxies = { "http" : proxy_url, "https" : proxy_url }
Not clear why the UI has the username/password but it is not in use by the code.
I had the same problem and your code fixed it !
Thanks a lot @tomworster
I hope it'll be fixed in the next version cc @JasonConger
Standard requests are not using the proxy username/password.
Was able to fix this as a workaround by modifying utils.py get_proxy as follows:
First, import quote from urllib.parse:
from urllib.parse import quote
Second, update get_proxy when proxy_type is "requests" to add the username/password and format the proxy url as http://username>:<password>@<url:.
Not clear why the UI has the username/password but it is not in use by the code.