Skip to content

Instantly share code, notes, and snippets.

@hoozecn
hoozecn / proxy_support.py
Created October 1, 2017 08:42
Proxy support for ws4py
import socket
from urllib.parse import urlparse
# make sure PySocks(https://github.com/Anorov/PySocks) is installed, commit version >= 1f56ca
import socks
import ssl
# make sure ws4py is installed, version >= 0.4.2
from ws4py.exc import HandshakeError
from ws4py.client import WebSocketBaseClient