carsonyl / pypac

Find and use proxy auto-config (PAC) files with Python and Requests.
https://pypac.readthedocs.io
Apache License 2.0
71 stars 18 forks source link

Doesn't accept `https://antizapret.prostovpn.org/proxy.pac` as valid script #68

Closed ZzZombo closed 1 year ago

ZzZombo commented 1 year ago

It raises _dukpy.JSRuntimeError: EvalError: Error while calling Python Function: TypeError('inet_aton() argument 1 must be str, not bool') when testing self.find_proxy_for_url("/", "0.0.0.0"). Removing the check locally allows the file to be correctly consumed by my code. Note that my other issue needs to be resolved before you could use the URL as is, or manually follow the redirect and use the end URL when working with the PAC file.

carsonyl commented 1 year ago

Please attach a repro. I cannot access the given PAC URL. It returns HTTP 403:

Your geoip is not RU, contact antizapret@prostovpn.org if you believe this is an error. Send your IP address in the message!!

ZzZombo commented 1 year ago

https://gist.github.com/ZzZombo/f48c43fa1c1c5ef834dfd83b257140b9 is the current content of the script.

ZzZombo commented 1 year ago

Thanks!