Skip to content

Latest commit

Β 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ€ holt

Reverse HTTP tunnels for services that can only dial out.

Go Reference Go Report Card License: MIT Status: alpha

hub up, service exposed, reached through the tunnel

Your service dials out to a hub, then serves a plain http.Handler back through the connection it opened. Nothing listens, nothing is published, no hole in the NAT. To the hub, the peer is just another HTTP backend.

holt is a Go library first. The CLI is one opinionated packaging of it... made for fun.

Features

  • πŸ•³οΈ No inbound anything. The peer only dials out. NAT, locked-down containers and field devices are fine.
  • 🧩 A library you embed. Two constructors; the hub hands you an http.RoundTripper per peer, plus presence.
  • ☁️ Passes anywhere. WebSocket carrier with JWT auth: Cloudflare, ingresses and access proxies just work.
  • 🌐 A hostname per peer. checkout.example.com reaches the peer, so webhooks, OAuth callbacks and browsers work.
  • πŸ“¦ HTTP and gRPC through the tunnel, with optional end-to-end TLS inside it.
  • πŸ”Ž Live traffic view. Headers, payloads and timings in the console; any request replays as curl.
  • πŸͺ€ Capture endpoints. Throwaway addresses that accept any call. Inspect a webhook without exposing a service.
  • πŸŽ›οΈ Operable. ls / kill / block, a web console, Prometheus metrics, a Grafana dashboard.
  • πŸš€ Deploys small. One binary, a Docker image, a Helm chart; several hubs share one PostgreSQL.

Quick start

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

holt hub --ui &                         # hub + console on 127.0.0.1:7201
holt expose localhost:3000 --peer web -y   # enrolls itself, serves the tunnel
curl -H 'x-tunnel-peer: web' http://127.0.0.1:7202/

Give peers real hostnames by fronting the hub with your TLS edge:

holt hub --advertise-addr wss://holt.example.com \
  --proxy-routing both --proxy-domain example.com
holt expose localhost:3000 --peer checkout -y
# https://checkout.example.com/ now reaches the service

As a library

The peer attaches, serves your handler through the tunnel, and redials with backoff:

cl := holt.NewClient("wss://holt.example.com", myHandler, holt.WithBearerToken(token))
err := cl.Run(ctx)

The hub is one call, and every peer becomes an ordinary HTTP backend:

srv := holt.NewServer(
	holt.WithTunnel(holt.NewTunnel(":7200", holt.WithAuthBearer(peerForToken))),
	holt.WithProxy(holt.NewProxy(":7202")),
)
go srv.Run(ctx)

client := &http.Client{Transport: srv.Registry().RoundTripper(peerID)}

Bring your own auth, middleware, listeners and storage. Everything the CLI adds is built on this surface. See Library and How it works.

The console

holt hub --ui. Point a Stripe webhook at a capture endpoint and read it, signature and payload included, without exposing anything:

a Stripe webhook opened in the capture inspector

live tunnels with attach and detach activity per-peer live traffic with statuses and timings

When to pick something else

frp, ngrok and inlets do more, at a bigger scale: TCP/UDP, load balancing, teams, hosted service. holt is HTTP(S) and gRPC through one hub on your own infra, and a library to embed. If that is your case, everything stays yours.

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

Documentation

Get started Install Β· How it works
Use holt CLI Β· Web console
Operate Security Β· Kubernetes Β· Observability
Build with holt Library Β· Examples Β· Development

License

MIT

About

πŸŒ€ Reverse HTTP tunnels for services that can only dial out. WebSocket carrier, JWT auth, a hub CLI, and a web console with live traffic capture.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages