Skip to Content
New: a threat-model-first guide to choosing your network defence, plus the nym-smoldvpn dVPN package and nym-swizzle sender hygiene.
Developersmix-websocket (ws / wss)

mix-websocket

@nymproject/mix-websocket exposes MixWebSocket, a class that mirrors the browser WebSocket API for traffic that needs to travel through the Nym mixnet. WS and WSS endpoints are reached via the IPR (Internet Packet Router) exit gateway; the destination server sees the connection coming from the IPR’s IP, not yours.

┌──────────────────────────────────────────────────────────────┐ │ Your browser app │ │ └─ new MixWebSocket('wss://...') │ │ └─ mix-tunnel (smolmix-wasm, Web Worker) │ │ └─ smoltcp userspace TCP/IP + rustls TLS │ │ └─ Nym mixnet → IPR exit gateway │ │ └─ destination WS server │ └──────────────────────────────────────────────────────────────┘

The TLS handshake (for wss:// targets) terminates inside the WASM bundle, end-to-end with the destination. The IPR sees TCP frames addressed to the destination’s IP and port; for WSS, the payload is TLS ciphertext.

In this section

Last updated on