holt

package module
v0.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

🌀 holt

Reverse HTTP tunnels for services that can only dial out.

Go Reference Go Report Card

A holt is an otter's den: a burrow in the riverbank, reachable only through the underwater tunnel its owner dug. Same idea here. A peer that cannot accept inbound connections (behind NAT, in a locked down container, on a field device) dials out to a hub, then serves an ordinary http.Handler back through the connection it opened. The hub gets an http.RoundTripper per peer, and a presence signal for free.

No listener, no inbound port, no published container port on the peer.

Useful when something needs a public address and cannot have one:

  • show a local website to a client or a colleague, without deploying it
  • debug webhooks (Stripe, GitHub, Slack) that need a real URL to call
  • test an OAuth callback that must be reachable from outside
  • reach a machine at home or on a customer network: a NAS, a router, a Raspberry Pi
  • give an agent or a device an address, without opening a port on its side

⚠️ Alpha, extracted from openotters where it is the sole daemon-to-agent-runtime channel. The wire protocol may still change.

holt web console
The built-in web console (holt hub --ui). See Web console.

Where holt fits

frp, ngrok and inlets do much more than holt, and at a bigger scale. If you need TCP or UDP forwarding, load balancing, teams and quotas, or a hosted service with support, look at them first.

holt is for simpler needs. You have an HTTP service that can only dial out, you have a domain and a small server (or a Kubernetes cluster), and you want to reach that service without giving your traffic to somebody else. One binary for the hub, one command on the peer, and everything stays yours.

What you get:

  • HTTP and gRPC through the tunnel, the peer serving an ordinary handler
  • a hostname per peer, so a browser, a webhook or an OAuth callback can reach it directly
  • a WebSocket transport, so the tunnel passes through Cloudflare, ingresses and access proxies (gRPC does not pass there)
  • a live view of the traffic: logged by the peer, shown in the console
  • a web console, Prometheus metrics and a Grafana dashboard
  • a Helm chart, and a shared PostgreSQL when you run several hubs

Quickstart (local)

Install it (see all install methods):

brew install openotters/tap/holt      # or: go install github.com/openotters/holt/cmd/holt@latest

Expose a local service through a hub in two commands:

holt hub --ui &                  # run a hub (web console on 127.0.0.1:7201)
holt expose localhost:3000 --peer web   # enrolls itself, then serves the tunnel

Then reach the peer through the hub:

curl -H 'x-tunnel-peer: web' http://127.0.0.1:7202/

holt expose logs every request as it answers it, so you see what your service is doing without opening a log file:

9:27AM INFO expose: GET    /            200  27ms
9:27AM INFO expose: GET    /missing     404  12ms

The hub keeps its own output quiet and shows the same traffic in the console (holt hub --ui), live, with the peer that answered.

Drop --peer and it enrolls under a generated name (cosy-eddy-aec23e); from another machine, point it at the hub with --admin-url or a --profile. For a long-lived peer, mint the token once with holt enroll web and pass it with --token.

The token bundles the peer's JWT and the hub's tunnel URL. Peers authenticate with the JWT and attach over a WebSocket, so the tunnel passes through anything that can proxy plain HTTP: CDN public hostnames (Cloudflare included), access proxies, ordinary ingresses. The URL's scheme picks the transport: a wss:// URL is encrypted by a TLS edge in front of the hub (an ingress, LoadBalancer, or Cloudflare), while ws:// dials plaintext for local use (https:///http:// are accepted as aliases). The hub itself never manages a certificate.

Behind a TLS edge, advertise the public URL so peers dial it over TLS:

holt hub --advertise-addr wss://holt.example.com &   # hub is plaintext; your edge terminates TLS
holt enroll web                                      # token now carries the wss URL

See Security for exposing a hub safely.

Examples

Give a peer its own hostname, for a webhook, an OAuth callback, or just a browser. Point a wildcard record at the proxy first (keep the peers at the first level of the domain, a wildcard certificate covers only one level):

holt hub --advertise-addr wss://holt.example.com \
  --proxy-routing both --proxy-domain example.com

holt expose localhost:3000 --peer checkout
# https://checkout.example.com/ now reaches the service

Expose an appliance that serves HTTPS with a self signed certificate (a router, a NAS, an IPMI card):

holt expose https://192.168.1.1 --insecure --peer router

Open a quick tunnel without choosing a name:

holt expose localhost:8080
# it enrolls itself, as something like cosy-eddy-aec23e

From another machine, say where the hub is (or put it in a profile):

holt expose localhost:3000 --admin-url https://holt.example.com

Then operate the hub:

holt ls           # who is attached
holt kill web     # close a tunnel, the peer may come back
holt block web    # ban the peer id until you unblock it

On Kubernetes, the chart runs the hub, and several hubs can share one PostgreSQL for presence, blocklist and signing identity:

helm install holt oci://ghcr.io/openotters/charts/holt

See Kubernetes for the fleet setup, the ingresses and the Grafana dashboard.

Documentation

Full docs live in docs/:

License

MIT

Documentation

Overview

Package holt implements a reverse HTTP tunnel over a WebSocket carrying a bidirectional protobuf frame stream: a peer that can only dial OUT attaches to a hub, then serves an ordinary http.Handler back through the attached stream. The hub gets an http.RoundTripper per peer and a presence signal for free. The carrier is a WebSocket so the tunnel passes through CDN public hostnames, access proxies, and HTTP/1.1-only edges that cannot proxy gRPC.

This package is the front door for both halves: NewServer assembles a hub from options and serves it; NewClient wires a peer that attaches to one and serves a handler back through the tunnel. Everything needed to configure the two constructors lives here.

The optional surface lives under pkg/ for applications that want the pieces directly: pkg/registry (the operator surface — Server.Registry returns one), pkg/attach (the WebSocket attach handler, for mounting on your own router), pkg/revproxy (the data-plane reverse proxy), pkg/dial (the raw attach loop), pkg/directory and pkg/blocklist (peer presence and the denylist, each with SQLite and Postgres flavours), pkg/jwtauth and pkg/token (the JWT identity scheme and its join token), and pkg/peername (peer-id validation). Only the assembly guts and the wire protocol are internal.

Index

Constants

View Source
const (
	RoutingHeader    = revproxy.RoutingHeader
	RoutingSubdomain = revproxy.RoutingSubdomain
	RoutingBoth      = revproxy.RoutingBoth
)

The routing strategies.

View Source
const (
	DefaultTunnelAddr = server.DefaultTunnelAddr
	DefaultProxyAddr  = server.DefaultProxyAddr
)

The addresses NewServer serves on when WithTunnel / WithProxy are not given — holt's canonical loopback ports.

View Source
const DevPeerHeader = tunnel.DevPeerHeader

DevPeerHeader is how a peer names itself under the development identity — the default when a tunnel has no identity configured. The claim is not verified.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.29.0

type Client = client.Client

Client is the assembled peer: a persistent attach loop that dials the hub and serves an http.Handler back through the tunnel, redialing with jittered backoff. It is NewServer's counterpart for the client side.

c := holt.NewClient("wss://hub.example.com", handler,
	holt.WithBearerToken(token),
)

err := c.Run(ctx) // attaches, serves, redials; cancel ctx to stop

func NewClient added in v0.29.0

func NewClient(hubURL string, handler http.Handler, opts ...ClientOption) *Client

NewClient wires a peer that attaches to the hub's tunnel endpoint at hubURL — ws:// or wss:// (http/https are accepted as aliases) — and serves handler over the tunnel, as if it were a normal HTTP server. Nothing dials until Run.

type ClientOption added in v0.29.0

type ClientOption = client.Option

ClientOption configures a Client; every SharedOption is one too.

func WithBearerToken added in v0.29.0

func WithBearerToken(token string) ClientOption

WithBearerToken sends token as the Authorization bearer on the attach request — the counterpart of the server's WithAuthBearer.

func WithHTTPClient added in v0.29.0

func WithHTTPClient(httpClient *http.Client) ClientOption

WithHTTPClient overrides the client used for the upgrade request (custom roots, proxies). Default http.DefaultClient.

func WithHeader added in v0.29.0

func WithHeader(key, value string) ClientOption

WithHeader adds a header to the WebSocket upgrade request — whatever the edge in front of the hub wants (e.g. CF-Access-Client-Id / CF-Access-Client-Secret). Repeatable.

func WithKeepalive added in v0.29.0

func WithKeepalive(every time.Duration) ClientOption

WithKeepalive paces WebSocket-level pings so proxies with idle timeouts keep a quiet tunnel open. A negative value disables them (the inner HTTP/2 PING remains).

func WithTunnelTLS added in v0.29.0

func WithTunnelTLS(cfg *tls.Config) ClientOption

WithTunnelTLS encrypts the payload end-to-end INSIDE the tunnel: after the plaintext holt handshake the peer runs a TLS server over the stream and serves the handler over HTTPS. The hub must dial with a matching client config (WithPeerTLS). Independent of any TLS on the outer WebSocket hop.

func WithVersion added in v0.29.0

func WithVersion(version string) ClientOption

WithVersion sets the peer build version sent in Hello (observability).

type EndpointOption added in v0.29.0

type EndpointOption interface {
	TunnelOption
	ProxyOption
}

EndpointOption configures either endpoint kind: it is accepted by both NewTunnel and NewProxy.

func WithListener added in v0.29.0

func WithListener(lis net.Listener) EndpointOption

WithListener serves the endpoint on a listener the caller bound — a tls.Listener for wss, a systemd socket, ":0" in a test — instead of binding the endpoint's address. The listener is closed when Run returns.

func WithMiddleware added in v0.29.0

func WithMiddleware(middleware ...Middleware) EndpointOption

WithMiddleware wraps the endpoint's handler, first-listed outermost. Repeatable; later calls append.

type ErrorHook added in v0.29.0

type ErrorHook = revproxy.ErrorHook

ErrorHook observes requests the proxy could not serve, with a low-cardinality reason.

type HandlerOption added in v0.29.0

type HandlerOption = attach.HandlerOption

HandlerOption configures the attach handler; pass them through WithHandlerOptions.

func WithPeerTLS added in v0.29.0

func WithPeerTLS(cfg *tls.Config) HandlerOption

WithPeerTLS makes the hub run TLS INSIDE each tunnel with this client config after the plaintext holt handshake — pairing with the peer's WithTunnelTLS, so the payload stays encrypted end-to-end even across a plaintext or TLS-terminated transport.

func WithTracerProvider added in v0.29.0

func WithTracerProvider(tp trace.TracerProvider) HandlerOption

WithTracerProvider sets the OTel tracer provider for attach spans. Default: the global provider.

type Identity added in v0.29.0

type Identity = attach.Identity

Identity extracts the peer ID from an attach request's context. The surrounding middleware establishes it (JWT claims, mTLS SAN, a header); returning ("", err) rejects the attach.

type Middleware added in v0.29.0

type Middleware = utils.Middleware

Middleware wraps an endpoint's handler — auth on the tunnel, instrumentation on the proxy, anything http.

type Option added in v0.29.0

type Option = server.Option

Option configures a Server; every SharedOption is one too.

func WithGrace added in v0.29.0

func WithGrace(grace time.Duration) Option

WithGrace bounds how long Run waits for in-flight work when draining. Default 5s.

func WithProxy added in v0.29.0

func WithProxy(p *Proxy) Option

WithProxy serves the given proxy endpoint instead of the default one on DefaultProxyAddr (see NewProxy). Nil disables the proxy entirely, for a tunnel-only process.

func WithRegistry added in v0.29.0

func WithRegistry(reg *registry.Registry) Option

WithRegistry supplies the registry instead of the default NewRegistry(logger) — the way to set a hub id, a shared presence Directory, or a MeterProvider.

func WithTunnel added in v0.29.0

func WithTunnel(t *Tunnel) Option

WithTunnel serves the given tunnel endpoint instead of the default one on DefaultTunnelAddr (see NewTunnel). Nil disables the tunnel entirely, for a proxy-only process.

type Proxy added in v0.29.0

type Proxy = proxy.Proxy

Proxy is the endpoint that reaches peers through their tunnels. Build it with NewProxy.

func NewProxy added in v0.29.0

func NewProxy(addr string, opts ...ProxyOption) *Proxy

NewProxy declares the peer-reaching reverse proxy on addr. By default it routes on the x-tunnel-peer header; WithRouting adds subdomain routing, WithResolvers custom resolution, WithErrorHook observability.

type ProxyOption added in v0.29.0

type ProxyOption = proxy.Option

ProxyOption configures a Proxy; every EndpointOption is one too.

func WithErrorHook added in v0.29.0

func WithErrorHook(hook ErrorHook) ProxyOption

WithErrorHook observes requests the proxy could not serve.

func WithResolvers added in v0.29.0

func WithResolvers(resolvers ...Resolver) ProxyOption

WithResolvers appends custom resolvers to the proxy's chain, tried after the ones WithRouting names (or instead of the header default when no strategy is configured). Repeatable.

func WithRouting added in v0.29.0

func WithRouting(routing Routing, domain string) ProxyOption

WithRouting sets how the proxy picks the target peer; domain is the base domain for the subdomain strategies. An unusable pair (unknown strategy, missing or unused domain) fails Server.Run before anything binds.

type RequestEvent added in v0.36.0

type RequestEvent = reqlog.Event

RequestEvent is one request crossing a tunnel: what it was, what came back, how long it took, and (on the hub) which peer it went to.

type RequestHook added in v0.36.0

type RequestHook = reqlog.Hook

RequestHook receives one RequestEvent per request, after the response. It runs on the request's goroutine, so keep it cheap.

type Resolver added in v0.29.0

type Resolver = revproxy.Resolver

Resolver maps an inbound proxy request to the peer it targets, or "" when the request names none. The proxy tries its resolvers in order and the first peer named wins — implement this to route on anything the built-in strategies do not cover.

type Routing added in v0.29.0

type Routing = revproxy.Routing

Routing selects how the proxy picks the target peer from a request.

type Server added in v0.29.0

type Server = server.Server

Server is the assembled hub: a Registry, a Tunnel endpoint peers attach to, and (optionally) a Proxy endpoint that reaches them. It is the one-call counterpart of NewClient for the server side.

srv := holt.NewServer(
	holt.WithLogger(logger),
	holt.WithTunnel(holt.NewTunnel(":7200",
		holt.WithAuthBearer(peerForToken), // token → peer id
	)),
	holt.WithProxy(holt.NewProxy(":7202")), // reach peers: x-tunnel-peer
)

err := srv.Run(ctx) // binds, serves, blocks; cancel ctx to drain

Zero configuration works: holt.NewServer().Run(ctx) serves a tunnel on 127.0.0.1:7200 and a proxy on 127.0.0.1:7202 with the development identity — peers name themselves with the x-holt-peer header (or get a generated name) and nothing verifies the claim. That identity is loopback-only by construction: a tunnel bound to anything other than a loopback address with no identity configured refuses to start, so the trusting default cannot reach a network.

The operator surface stays reachable through Registry: roster, stop, watch.

func NewServer added in v0.29.0

func NewServer(opts ...Option) *Server

NewServer assembles a hub from the options, laid over the defaults — the caller's options are just applied last, so overriding a default is passing the same option with another value. Nothing binds or serves until Run.

type SharedOption added in v0.29.0

type SharedOption interface {
	Option
	ClientOption
}

SharedOption configures either half: it is accepted by both NewServer and NewClient.

func WithLogger added in v0.29.0

func WithLogger(logger *zap.Logger) SharedOption

WithLogger sets the logger. Default: no logging.

type Tunnel added in v0.29.0

type Tunnel = tunnel.Tunnel

Tunnel is the endpoint peers attach to. Build it with NewTunnel.

func NewTunnel added in v0.29.0

func NewTunnel(addr string, opts ...TunnelOption) *Tunnel

NewTunnel declares the attach endpoint on addr. Give it an identity — WithAuthBearer for bearer tokens, or WithMiddleware + WithIdentity for any other scheme — because the peer id is the registry key and should come from something verified. Without one, the development identity applies: peers name themselves with the x-holt-peer header (or get a generated name), nothing verifies the claim, and Run says so in the log. Loopback development only.

type TunnelOption added in v0.29.0

type TunnelOption = tunnel.Option

TunnelOption configures a Tunnel; every EndpointOption is one too.

func WithAuthBearer added in v0.29.0

func WithAuthBearer(verify func(ctx context.Context, token string) (peer string, err error)) TunnelOption

WithAuthBearer authenticates attaches with a Bearer token: the middleware extracts Authorization, asks verify for the peer id it proves, answers 401 when it refuses, and wires the identity so the registry keys the tunnel by that id. It is WithMiddleware + WithIdentity fused for the most common scheme; bring your own pair for anything else.

func WithHandlerOptions added in v0.29.0

func WithHandlerOptions(opts ...HandlerOption) TunnelOption

WithHandlerOptions passes options through to the attach handler — WithPeerTLS for inner TLS, WithTracerProvider for tracing.

func WithIdentity added in v0.29.0

func WithIdentity(identity Identity) TunnelOption

WithIdentity sets how the peer id is derived from the attach request's context, after the middleware authenticated it and stamped whatever the func reads.

type WatchOption added in v0.36.0

type WatchOption interface {
	ProxyOption
	ClientOption
}

WatchOption configures a live request view. It fits either end: on NewProxy the hub reports every request it carried for every peer, on NewClient the peer reports the ones its own handler served.

func WithRequestHook added in v0.36.0

func WithRequestHook(hook RequestHook) WatchOption

WithRequestHook reports every request as it completes — the live view the CLI prints, available to anything embedding either half. Nothing is stored; what the hook does with the event is yours. The hub's duration includes the tunnel hop, the peer's does not.

Directories

Path Synopsis
api
v1
cmd
holt command
Command holt is the operator CLI for a reverse-tunnel hub: run the hub, enroll peers, and manage live tunnels.
Command holt is the operator CLI for a reverse-tunnel hub: run the hub, enroll peers, and manage live tunnels.
holt/internal/admin
Package admin implements the holt hub's Admin gRPC service over a *registry.Registry: list live tunnels, force one closed, and — when a Blocker is supplied — ban/unban a peer id.
Package admin implements the holt hub's Admin gRPC service over a *registry.Registry: list live tunnels, force one closed, and — when a Blocker is supplied — ban/unban a peer id.
holt/internal/clog
Package clog builds the CLI logger.
Package clog builds the CLI logger.
holt/internal/config
Package config loads the operator CLI's connection profiles, used by the admin commands to reach a remote hub (e.g.
Package config loads the operator CLI's connection profiles, used by the admin commands to reach a remote hub (e.g.
holt/internal/httpsrv
Package httpsrv is the listener plumbing behind the hub's four endpoints (tunnel, admin, proxy, metrics).
Package httpsrv is the listener plumbing behind the hub's four endpoints (tunnel, admin, proxy, metrics).
holt/internal/hubapi
Package hubapi is the hub's own HTTP surface on the admin listener, alongside the Admin gRPC service: the enroll endpoint that mints join tokens, and — with --ui — the web console with its config and rotate-secret endpoints.
Package hubapi is the hub's own HTTP surface on the admin listener, alongside the Admin gRPC service: the enroll endpoint that mints join tokens, and — with --ui — the web console with its config and rotate-secret endpoints.
holt/internal/hubmetrics
Package hubmetrics holds the OTel instruments the hub CLI records outside the library: refused attaches, and build info.
Package hubmetrics holds the OTel instruments the hub CLI records outside the library: refused attaches, and build info.
holt/internal/hubsecret
Package hubsecret manages the hub's JWT signing secret: a 32-byte random value the hub signs peer JWTs with, and enroll (local mode) reads to mint tokens.
Package hubsecret manages the hub's JWT signing secret: a 32-byte random value the hub signs peer JWTs with, and enroll (local mode) reads to mint tokens.
holt/internal/store
Package store is the hub's durable non-secret state: a single SQLite database under the config directory (~/.holt/holt.db).
Package store is the hub's durable non-secret state: a single SQLite database under the config directory (~/.holt/holt.db).
holt/internal/style
Package style is the CLI's small output vocabulary: a success mark, a dim note, and a plain column list.
Package style is the CLI's small output vocabulary: a success mark, a dim note, and a plain column list.
holt/internal/webui
Package webui owns the hub's embedded web console.
Package webui owns the hub's embedded web console.
starter-client command
Command starter-client is a minimal, self-contained holt peer — a template to copy when writing your own client.
Command starter-client is a minimal, self-contained holt peer — a template to copy when writing your own client.
examples
authenticated/client command
Command client is a standalone holt peer.
Command client is a standalone holt peer.
authenticated/server command
Command server is a standalone holt hub with a real identity: it accepts reverse tunnels from peers on one port and reaches those peers on another by dialing back THROUGH their tunnels.
Command server is a standalone holt hub with a real identity: it accepts reverse tunnels from peers on one port and reaches those peers on another by dialing back THROUGH their tunnels.
echo/client command
Command client is the peer half of the echo example: it dials the hub and serves an HTTP handler back over the reverse tunnel, while listening on nothing itself.
Command client is the peer half of the echo example: it dials the hub and serves an HTTP handler back over the reverse tunnel, while listening on nothing itself.
echo/server command
Command server is the hub half of the echo example, with zero configuration: holt.NewServer() serves the tunnel on 127.0.0.1:7200 and a proxy on :7202.
Command server is the hub half of the echo example, with zero configuration: holt.NewServer() serves the tunnel on 127.0.0.1:7200 and a proxy on :7202.
internal
proxy
Package proxy declares the endpoint that reaches peers through their tunnels: where it serves and how it routes.
Package proxy declares the endpoint that reaches peers through their tunnels: where it serves and how it routes.
server
Package server assembles the hub half: a registry, a tunnel endpoint peers attach to, and (optionally) a proxy endpoint that reaches them, served together under one lifecycle.
Package server assembles the hub half: a registry, a tunnel endpoint peers attach to, and (optionally) a proxy endpoint that reaches them, served together under one lifecycle.
tunnel
Package tunnel declares the endpoint peers attach to: where it serves, how the peer id is derived, and what passes through to the attach handler.
Package tunnel declares the endpoint peers attach to: where it serves, how the peer id is derived, and what passes through to the attach handler.
utils
Package utils holds the plumbing the Tunnel and Proxy endpoint declarations share.
Package utils holds the plumbing the Tunnel and Proxy endpoint declarations share.
wire
Package wire holds what the hub and dial halves of the tunnel share: the frame-level net.Conn adapter, the handshake, and the GoAway vocabulary.
Package wire holds what the hub and dial halves of the tunnel share: the frame-level net.Conn adapter, the handshake, and the GoAway vocabulary.
pkg
attach
Package attach is the hub's tunnel front door: an http.Handler that accepts a peer's WebSocket upgrade, runs the holt handshake, and registers the resulting tunnel in the registry.
Package attach is the hub's tunnel front door: an http.Handler that accepts a peer's WebSocket upgrade, runs the holt handshake, and registers the resulting tunnel in the registry.
blocklist
Package blocklist is the hub's identity denylist: the peer ids refused at attach time, durable across restarts.
Package blocklist is the hub's identity denylist: the peer ids refused at attach time, durable across restarts.
blocklist/postgres
Package postgres is the PostgreSQL flavour of the SQL-backed denylist.
Package postgres is the PostgreSQL flavour of the SQL-backed denylist.
blocklist/sqlite
Package sqlite is the SQLite flavour of the SQL-backed denylist.
Package sqlite is the SQLite flavour of the SQL-backed denylist.
dial
Package dial is the client half of the holt: a persistent attach loop that dials the hub over a WebSocket, serves an http.Handler over the reverse tunnel, and redials with jittered backoff until the context ends or the hub sends a terminal GoAway.
Package dial is the client half of the holt: a persistent attach loop that dials the hub over a WebSocket, serves an http.Handler over the reverse tunnel, and redials with jittered backoff until the context ends or the hub sends a terminal GoAway.
directory
Package directory defines peer presence: which peer is attached to which hub, since when.
Package directory defines peer presence: which peer is attached to which hub, since when.
directory/postgres
Package postgres is the PostgreSQL flavour of the SQL-backed presence directory.
Package postgres is the PostgreSQL flavour of the SQL-backed presence directory.
directory/sqldir
Package sqldir is a SQL-backed directory.Directory: a shared peer-presence store so a fleet of hubs can each see who is attached where.
Package sqldir is a SQL-backed directory.Directory: a shared peer-presence store so a fleet of hubs can each see who is attached where.
directory/sqlite
Package sqlite is the SQLite flavour of the SQL-backed presence directory.
Package sqlite is the SQLite flavour of the SQL-backed presence directory.
jwtauth
Package jwtauth is the hub's attach-time authentication: it issues and verifies the HMAC-SHA256 JWTs peers present, holds the signing secret so it can be rotated live (Secret), and enforces the whole check in front of the tunnel handler (Guard).
Package jwtauth is the hub's attach-time authentication: it issues and verifies the HMAC-SHA256 JWTs peers present, holds the signing secret so it can be rotated live (Secret), and enforces the whole check in front of the tunnel handler (Guard).
peername
Package peername validates peer identities.
Package peername validates peer identities.
registry
Package registry keeps the hub's live tunnels keyed by peer ID and lets the application dial "through" any attached peer with an ordinary http.RoundTripper.
Package registry keeps the hub's live tunnels keyed by peer ID and lets the application dial "through" any attached peer with an ordinary http.RoundTripper.
reqlog
Package reqlog is the live view of requests crossing a tunnel.
Package reqlog is the live view of requests crossing a tunnel.
revproxy
Package proxy is the hub's data plane: an http.Handler that picks the peer a request targets and dials it through that peer's tunnel.
Package proxy is the hub's data plane: an http.Handler that picks the peer a request targets and dials it through that peer's tunnel.
token
Package token is the copy-paste enrollment token that carries what a peer needs to join: the JWT that authenticates it, and the hub's tunnel URL to dial.
Package token is the copy-paste enrollment token that carries what a peer needs to join: the JWT that authenticates it, and the hub's tunnel URL to dial.
tunneltype
Package tunneltype names what a peer carries over its tunnel.
Package tunneltype names what a peer carries over its tunnel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL