Skip to content
Commands

wctr-relay commands

Every wctr-relay command and flag, as of v0.1.0.

wctr-relay is one binary: serve runs the relay; every other command is a client of its control API. Locally they use the state directory’s admin socket (0600: its permissions are the credential); for a remote relay, --server URL --token-file FILE [--ca-file ROOT.pem], where URL is the relay’s --admin-listen address over https (the token is never a flag value). --state-dir (default <user config dir>/wctr-relay) applies to all.

CommandWhat
init [--name N] [--ip A]create the state directory (0700): admin token, session-token signing keys, and the internal CA for those names and addresses
serverun the relay
class create NAMEa class; flags --cidr (default 10.42.0.0/16), --session-bits (24), --domain (class), --template isolated|neutron, --allow sub:…|email:…|group:…, --require-identity
class listclasses and their join codes
class sessions CLASSsessions: label, name, subnet, connected
class kick CLASS SESSIONend a session: its connection, ports and tokens
class rotate-code CLASSa new join code; the old one stops admitting
class delete CLASSdelete the class and what the relay knows of its students
sg list --class Cgroups and their rules
sg create NAME --class C [--stateless] [--description D]an empty group (it allows nothing)
sg delete GROUP --class Ca group no port uses
rule add GROUP --class C --ingress|--egress [--proto tcp|udp|icmp|any] [--port 80|8000-8080] [--remote-ip PREFIX|--remote-group G]allow a flow
rule delete RULE --class Cremove a rule; the flows only it allowed are reset
port list --class C [--student S]ports: name, address, groups
port set PORT --class C [--sg a,b] [--port-security on|off]a port’s groups (replaces the list)
flows --class C [--follow] [--deny-only] [--student S] [--backlog N]the flow log
explain --class C SRC DST PROTO/PORTwhat the firewall would decide, and which rules
ca export, ca fingerprint, ca rotate [--name] [--ip]the internal CA
teacher-session --class C --out FILEa session token (written 0600) for the teacher’s own containers
versionthe version

A port is named by its id, its DNS name (web.alice.class) or student/container (alice/web).

serve flags

FlagDefaultWhat
--listen:8443the address students reach (data plane /v1/data, join, /v1/info)
--tlsinternalinternal, files, acme, or off (loopback only)
--cert, --keyPEM files for --tls files, re-read when they change
--acme-domain, --acme-email, --acme-directory, --acme-cacheACME for --tls acme (default CA: Let’s Encrypt)
--eab-kid, --eab-hmac-fileExternal Account Binding (the HMAC key in a 0600 file)
--acme-httpalso answer http-01 on this address (e.g. :80)
--origingo-wasmcontainers.github.ioother origins allowed to open the data channel
--hostHost names served; any other is refused
--oidc-issuer, --oidc-audience, --oidc-typeOpenID Connect token verification
--teacher-groupgroups-claim value granting the teacher role on --admin-listen
--admin-listenalso serve the admin API on this address (TLS)
--session-ttl12hsession token lifetime
--audit-retention720hhow long the audit log keeps events
--relay-idhost namethis relay’s id

Created on by tannevaled

Modified on by tannevaled