genotrance / px

An HTTP proxy server to automatically authenticate through an NTLM proxy
MIT License
950 stars 98 forks source link

Support for macOS Ventura 13.4? #183

Closed W0nderMuffin closed 9 months ago

W0nderMuffin commented 1 year ago

Hey there, there is an error when running px with import from keyrings with the current source code:

elif sys.platform == "darwin":
        import keyring.backends.OS_X

module 'keyring.backends' has no attribute 'OS_X'

If you change it to

elif sys.platform == "darwin":
        import keyring.backends.macOS

It will work again ;)

Doc: With the latest macOS versions people should run python3 -m pip install px-proxy

When running with proxy pac I receive:

[...]
  File "/Users/####/Library/Python/3.9/lib/python/site-packages/px/pac.py", line 71, in find_proxy_for_url
    proxies = self.ctxt.eval("FindProxyForURL")(url, host)
_quickjs.JSException: ReferenceError: 'FindProxyForURL' is not defined
    at <eval> (<input>)
genotrance commented 1 year ago

Looks like it has been deprecated. I’ll make some fixes soon.

ibru commented 1 year ago

I can confirm this.

I've installed px using python3 -m pip install px-proxy command, but when I run it, I always got message "Requires module keyring" and px was terminated.

After executing px.py directly and applying the change from OS_X to macOS as mentioned above, inside main.py file, it works as expected.

genotrance commented 11 months ago

No idea how this ever worked - I added OSX support to Px two years after OS_X changed to macOS in keyring! I was able to test without issues - perhaps it will pulling in an older version of keyring for the version of Python I was using? No idea.

Anyway, this is fixed in v0.9.0 still in development - see branch.

genotrance commented 9 months ago

v0.9.0 has been released.