MCPcopy Index your code
hub / github.com/EpicEric/sandhole

github.com/EpicEric/sandhole @v0.10.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.10.2 ↗ · + Follow
936 symbols 2,167 edges 150 files 87 documented · 9% updated 2d agov0.10.2 · 2026-07-05★ 722 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Sandhole

Github Actions workflow status Codecov crates.io version Github license

The Sandhole logo, with a crab partially inside a sand mound and the name "Sandhole" written in cursive beside them.

Expose HTTP/SSH/TCP services through SSH port forwarding. A self-hosted ngrok / Cloudflare Tunnels / localhost.run alternative.

Check out the Sandhole book for a full guide.

Features

  • Reverse proxy that just works with an OpenSSH client. No extra software required to beat NAT!
  • Automatic HTTPS support (with Agnos and ACME), including HTTP/2 support.
  • Easily load-balance by pointing multiple services to the same domain/port.
  • Bring your own custom domains and authorize them via DNS records for specific SSH keys.
  • Random subdomain assignment by default, with options for deterministic assignment.
  • Option to connect with SSH via the HTTPS port, if your network blocks outbound connections to SSH ports.
  • Security and performance features like quotas, rate limiting, timeouts, IP filtering, and more.
  • Many other configurable options, including toggling off whole modules.
  • A terminal-based admin interface to view and manage current connections.
  • Written in Rust, with comprehensive testing of most features.

Try it!

To expose a local HTTP service running on port 4321:

ssh -R 80:localhost:4321 demo.sandhole.com.br

Status

Sandhole is mostly feature-complete, but still receives occasional updates and fixes. Contributions are welcome, but try it in production at your own risk.

Some alternatives

  • sish - Main inspiration for this project. Written in Golang.
  • rlt - Uses localtunnel's protocol instead of SSH. Written in Rust.
  • wstunnel - Uses its WebSocket-based protocol instead of SSH. Written in Rust.
  • rathole - A highly configurable reverse proxy with NAT traversal and a great name. Written in Rust.
  • sshuttle - A smart proxy service, also based on SSH, that only needs Python in the server. Written in Python.

Extension points exported contracts — how you extend this code

ConnectionMapReactor (Interface)
(no doc) [7 implementers]
src/reactor.rs
SshCommand (Interface)
(no doc) [10 implementers]
src/ssh/exec.rs
ConnectionGetByHttpHost (Interface)
Helper trait for getting HTTP-specific entries via the hostname. [2 implementers]
src/connections.rs
QuotaHandler (Interface)
A trait for handlers that generate a token, indicating that some of the holder's quota is in use. To get a new token onc [2 …
src/quota.rs
ConnectionHandler (Interface)
(no doc) [2 implementers]
src/connection_handler.rs
AlpnChallengeResolver (Interface)
(no doc) [2 implementers]
src/certificates.rs
SockAddrAliasKey (Interface)
(no doc) [2 implementers]
src/sock_addr_alias.rs
UdpPortHandler (Interface)
(no doc) [1 implementers]
src/udp.rs

Core symbols most depended-on inside this repo

clone
called by 199
src/ssh/auth.rs
send
called by 129
src/ssh/mod.rs
tcpip_forward
called by 115
src/ssh/mod.rs
entrypoint
called by 103
src/entrypoint.rs
get
called by 90
src/connections.rs
insert
called by 84
src/connections.rs
data
called by 62
src/connections.rs
channel_open_session
called by 58
tests/integration/ssh_proxy_jump.rs

Shape

Method 410
Function 263
Class 223
Enum 24
Interface 16

Languages

Rust98%
Python2%

Modules by API surface

src/http/mod.rs49 symbols
src/addressing.rs43 symbols
src/telemetry.rs39 symbols
src/admin/interface.rs30 symbols
src/connections.rs24 symbols
src/login.rs23 symbols
udp_over_tcp.py22 symbols
src/tls.rs21 symbols
src/config.rs21 symbols
src/quota.rs18 symbols
src/ssh/mod.rs17 symbols
src/certificates.rs17 symbols

For agents

$ claude mcp add sandhole \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page