from websocket import create_connection

ws = create_connection(
    "wss://service.example.net/socket",
    http_proxy_host="127.0.0.1",
    http_proxy_port=1080,
    proxy_type="socks5h",
    timeout=15,
)

Use this with websocket-client and its documented SOCKS dependency already available. For public WSS services on a permitted public-proxy route, the SOCKS5 proxy list supplies candidates for the proxy host and port. Although the host/port keys are named http_proxy_*, proxy_type='socks5h' selects SOCKS5 with proxy-side target-name handling.

The order is proxy negotiation to obtain a destination stream, verified TLS for WSS, then the WebSocket handshake. The proxy hostname is not the website's TLS identity. Disabling verification does not repair a misplaced TLS stage.

For an authenticated proxy, use the installed version's documented argument for that proxy type. Application WebSocket headers do not authenticate the earlier intermediary.

A manually supplied socket transfers responsibility for those layers to the integration. Prefer the library interface when suitable, and keep websocket-client distinct from the separately versioned websockets package.

Аффингæй хæстæг статьялтæ