Documentation
¶
Overview ¶
Command starter-client is a minimal, self-contained holt peer — a template to copy when writing your own client. It joins a hub with a token from `holt enroll`, serves one HTTP handler over the tunnel, and listens on nothing.
Everything a peer needs is here and nothing else: decode the token, then dial.Run your handler (JWT auth rides the WebSocket upgrade; the tunnel URL's scheme picks the transport). The join token is decoded inline (a tiny base64+JSON struct) so this file has no dependency on the holt CLI's internals — copy it and go.
# on the hub machine: holt hub & holt enroll myservice # prints a token # anywhere: go run ./cmd/starter-client --token <paste> # reach it through the hub: curl -H 'x-tunnel-peer: myservice' http://localhost:7002/