Closed SeyfSV closed 4 years ago
Hi, Pypac does not allow to set session options before pac file reading, session.headers for example. Some services that provide pac file checks User-Agent and provide different responses. That is why I changed it, to allow this:
session = PACSession() session.headers.update({'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0'}) pac = session.get_pac(url='https://antizapret.prostovpn.org/proxy.pac')
Also I added HTTPS value to the valid values in proxy_url()
proxy_url()
Oops, I meant to "request changes" instead.
On my machine all tests passed now except test_timeout_proxy, it returns ProxyError instead of ConnectTimeout
test_timeout_proxy
ProxyError
ConnectTimeout
Thanks again for your contribution.
Hi, Pypac does not allow to set session options before pac file reading, session.headers for example. Some services that provide pac file checks User-Agent and provide different responses. That is why I changed it, to allow this:
Also I added HTTPS value to the valid values in
proxy_url()