Expose HTTP/SSH/TCP services through SSH port forwarding. https://sandhole.com.br
  • Rust 97.6%
  • Nix 2.2%
  • Just 0.1%
  • Dockerfile 0.1%
Find a file
2026-03-29 21:05:14 -03:00
.cargo Fix macOS build 2026-03-28 16:51:52 -03:00
.config [skip ci] Remove IPv4-only tests 2026-01-14 17:26:39 -03:00
.github Fix macOS build 2026-03-28 16:51:52 -03:00
blender Add WSS test and Blender file for logo 2025-06-14 11:45:21 -03:00
book Remove SUMMARY.md and log error on unexpected HTTP proxy conditions 2026-03-29 14:43:17 -03:00
docker-compose-example Basic improvements to performance 2026-01-30 07:26:49 -03:00
nix Remove SUMMARY.md and log error on unexpected HTTP proxy conditions 2026-03-29 14:43:17 -03:00
npins Update to Rust 1.94.0 2026-03-14 05:46:29 -03:00
src Avoid using dropped handlers for HTTP proxies 2026-03-29 21:05:14 -03:00
tests Add notifications tab to admin interface 2026-03-24 09:16:14 -03:00
.dockerignore Add Dockerfile and attempt to improve book workflow 2024-11-23 15:34:47 -03:00
.envrc [skip ci] Migrate to npins 2026-02-14 14:21:26 -03:00
.gitignore Multiple improvements 2026-02-20 21:59:43 -03:00
Cargo.lock Avoid using dropped handlers for HTTP proxies 2026-03-29 21:05:14 -03:00
Cargo.toml Avoid using dropped handlers for HTTP proxies 2026-03-29 21:05:14 -03:00
CHANGELOG.md Avoid using dropped handlers for HTTP proxies 2026-03-29 21:05:14 -03:00
CODE_OF_CONDUCT.md Add Nix flake for development (#66) 2025-12-20 17:35:24 -03:00
CONTRIBUTING.md Remove SUMMARY.md and log error on unexpected HTTP proxy conditions 2026-03-29 14:43:17 -03:00
default.nix Multiple improvements 2026-02-20 21:59:43 -03:00
Dockerfile Update to Rust 1.94.0 2026-03-14 05:46:29 -03:00
flake.lock [skip ci] Migrate to npins 2026-02-14 14:21:26 -03:00
flake.nix Multiple improvements 2026-02-20 21:59:43 -03:00
justfile Remove SUMMARY.md and log error on unexpected HTTP proxy conditions 2026-03-29 14:43:17 -03:00
LICENSE [skip ci] Update date for license 2026-01-01 18:01:22 -03:00
README.md [skip ci] Add demo to README 2026-02-27 06:23:03 -03:00
SECURITY.md Add CoC, CONTRIBUTING and SECURITY documents 2025-06-15 17:33:49 -03:00
shell.nix Multiple improvements 2026-02-20 21:59:43 -03:00

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 -i path/to/key -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.