Skip to content
Live demo →

Protocols

All of these use the same TLS code and the same policy. Ports of the demo server (unicomm server):

Port Protocols Policy Default
8443 HTTPS (h1/h2), WSS, HTTP/3 (UDP) hybrid (--policy NAME overrides) always on
8446 HTTPS, WSS, HTTP/3 pq-required always on
8445 HTTPS, WSS cnsa2 only with --profile cnsa2
8444 HTTPS, WSS, HTTP/3 classical only with --demo-insecure
8088 plain HTTP and ws none only with --demo-insecure

Every handshake is logged with its group and post_quantum; Prometheus metrics are at /metrics. Ports 8088 and 8444 exist for side-by-side comparison and must never run in production.

c := &unicomm.Client{HTTP3: true} // HTTP/3 over QUIC; default is HTTP/1.1 or HTTP/2 over TCP
r, _ := c.Get("https://localhost:8443/") // r.Protocol == "HTTP/3"

HTTP/3 needs UDP reachable on the port. If a browser shows ERR_INVALID_HTTP_RESPONSE after an older run, flush its socket pools (chrome://net-internals/#sockets). The negotiated QUIC group is exposed through a quinn feature flag; the QUIC cipher is not exposed.

The server upgrades /ws on the TLS listeners. unicomm curl wss://localhost:8443/ws -d hello sends one message and prints the key exchange. The interop matrix covers WSS on every policy.

The public demo server (unicomm server --public, the code behind muthuishere.website) serves these routes through the same router on HTTP/1.1, HTTP/2 and HTTP/3: /sse (server-sent events), /stream (chunked), /download, /upload (POST), /media/{name} (HTTP Range), /ws, /room/{name} (chat and WebRTC signaling rooms), /metrics and /site.json. Open the dashboard to try each one and see which key exchange your browser used. Source: mvp/src/server.rs.

unicomm relay (ADR-0021) keeps an app reachable with no inbound port. The app dials out over WSS (subprotocol ownshop-relay.v1), the relay runs a yamux session over that socket, and visitor requests arrive on a loopback-only forward leg and go to the app as ordinary HTTP/1.1.

visitor -> front (CDN / your service) --HTTP, loopback or unix socket--> FORWARD LEG --yamux stream--> app
^
app --wss://HOST/v1/relay?name=NAME (Bearer key, ownshop-relay.v1)--> APP LEG (TLS = UniComm policy)
  • Per-app limits (flags exist): request body 1 MiB, response 10 MiB, 64 concurrent streams, 3000 requests/min per app and 300/min per visitor.
  • An allowlist of public routes; everything else is 404 and never reaches the app.
  • Keepalive and drain: a silent link is closed after 25 s; on SIGTERM in-flight requests finish.
  • Memory: 10,000 idle sessions used 151 MiB over ws:// and 229 MiB over wss with the hybrid policy (macOS, ps RSS).

Try it in one script (starts and stops everything, prints real output): examples/relay-demo/run.sh. The Go side is pure Go and CGO-free (mvp/relay/goclient) and cross-builds for android/arm64; see the examples README.

unitunnel is our own ngrok-style tunnel on top of the relay: unitunnel http 3000 --name myapp --server wss://tunnel.example.com exposes a local port at https://myapp.tunnel.example.com, with X25519MLKEM768 on the client leg.