Websocket client: Missing proxy support
The websocket client does not work behind a HTTP proxy. In a company network where all internet access needs to go through a HTTP proxy, the websocket client tries to resolve the IP address of the websocket URL and fails.
Is there any support for HTTP proxies in ws4py ? Are there any solutions for this issue (other websocket libraries that support HTTP proxies) ?
I have found out just now as well that ws4py does not support proxies. This post is for me a verification of that. (@wklenk)
I foudn that the python package websocket-client does provide proxy support and I verified this using the following code
import websocket
ws = websocket.WebSocket()
ws.connect = ('wss://blabla.com', http_proxy_host='ip', http_proxy_port='8080')
See also here: https://github.com/websocket-client/websocket-client#http-proxy
I created a patch with the help of pysocks which supports http/socks5/socks5 proxies: https://gist.github.com/hoozecn/6640b705ba709ee28382a9fee784ff26, wish it helps.
Appreciate if someone could create a pr that will make the ws4py be with native proxy support
This is still a nice to have feature. It will be really helpful.