websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

WebSocketApp proxy auth settings aren't properly documented

Open hazeled opened this issue 2 years ago • 3 comments

hazeled avatar Apr 15 '22 01:04 hazeled

Adding additional information. This is a blank section in the documentation described as "coming soon" and should be filled in later with example code. https://websocket-client.readthedocs.io/en/latest/examples.html#connecting-through-a-proxy

engn33r avatar Apr 15 '22 13:04 engn33r

It seems to work correctly using the following code:

ws.run_forever(proxy_type = 'socks5', http_proxy_host = proxy_ip, http_proxy_auth = (proxy_username, proxy_password,))

There is one issue - When the WebSocketApp is closed, no message or code is passed to the code function. Kinda makes things hard to debug 😅

hazeled avatar Apr 16 '22 05:04 hazeled

The close message or code is a separate topic but #708 sounds similar to what you are asking.

engn33r avatar Apr 18 '22 10:04 engn33r

Thanks for sharing your example code. Fixed in commit bd84b50

engn33r avatar Aug 25 '22 13:08 engn33r