relaynet

Give your browser VM a network.

relaynet is a hosted relay for virtual machines that run in a web page. Point the VM's network adapter at a WebSocket and it gets DNS, TCP and UDP to the public internet, with per-account limits and nothing reachable inside the relay's own network.

See how it works

1. Get a token

Sign in and create an API token from your dashboard, or let your page request a short-lived demo token with no account.

2. Open the WebSocket

Connect to wss://relay.relaynet.network with the token in the subprotocol list. Ethernet frames go in, Ethernet frames come out.

3. Boot the VM

The relay answers DHCP and ARP, forwards TCP and UDP, and resolves DNS. Works with v86, container-in-browser projects, or anything that speaks the protocol.

Connecting from a page

const ws = new WebSocket("wss://relay.relaynet.network", [
  "relay.v1",
  "relay.token." + token,   // an API token from your dashboard
]);
// hand `ws` to your VM's network adapter

Browsers cannot set headers on a WebSocket, so the token travels as a subprotocol entry. Non-browser clients may send Authorization: Bearer instead.

Demo, no account

  • Short-lived token, one session at a time
  • Ports 80 and 443 only, 256 KiB/s up and 512 KiB/s down
  • 15 minute sessions, 200 MB per day per address

Account

  • Long-lived API tokens, up to 4 concurrent sessions
  • Any port except mail, 1 MiB/s each direction
  • 12 hour sessions, 20 GB per month