We are dealing correctly when a PAC is set on the OS (into the registry on Windows, and into the system preferences on macOS), but we are not testing a user entering directly a local PAC file into proxy settings.
And in real case scenario, this leads to such errors:
Traceback (most recent call last): File "gui/api.py", line 853, in set_proxy_settings proxy = get_proxy(category=config, url=url, pac_url=pac_url) File "client/proxy.py", line 134, in get_proxy return _get_cls(kwargs.pop("category"))(**kwargs) File "client/proxy.py", line 118, in __init__ self._pac_file = get_pac( File "/.../pypac/api.py", line 39, in get_pac downloaded_pac = download_pac([url], timeout=timeout, File "/.../pypac/api.py", line 137, in download_pac resp = sess.get(pac_url, timeout=timeout) File "/.../requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/.../requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/.../requests/sessions.py", line 649, in send adapter = self.get_adapter(url=request.url) File "/.../requests/sessions.py", line 742, in get_adapter raise InvalidSchema("No connection adapters were found for {!r}".format(url)) requests.exceptions.InvalidSchema: No connection adapters were found for 'file://Users/USER/super-proxy.pac'
- Is referenced in