frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Holesail – open-source peer-to-peer tunnels

https://holesail.io/
1•supersuryaansh•1h ago
Hi guys,

Wanted to share a project I have been working on for a while https://github.com/holesail/holesail

It is a lightweight reverse proxy similar to Ngrok but works over peer-to-peer tunnels and requires absolutely no configuration.

No port forwarding, no VPNs, no servers in the middle just a direct, end-to-end encrypted connection between two peers using a simple connection key.

It supports both UDP and TCP and runs on Linux, Mac, Windows, Android and iOS and has a Node API that can be used to integrate it into any Android, iOS or CLI app.

The goal is to make Holesail the go-to solution for developers, and self hosters who need fast, reliable, private connectivity.

Some of the stuff I use it for: 1. Accessing self hosted services such as Immich, Vaultwarden, Jistsi Meet, Paperless ngx, Portainer, Filegator 2. Playing LAN games over the internet, like Minecraft and Stardew valley 3. SSHing into my servers 4. Server security

Features: 1. Cross platform i.e. Android, iOS, Linux, Windows, Mac 2. Open source 3. Supports both TCP and UDP 4. Unlimited traffic (as much as your router and server can support) 5. Unlimited bandwidth (as much as your ISP gives you) 6. No servers 7. No accounts 8. Not a vpn 9. Can punch through firewalls and CGNAT 10. Integrate into other apps with Node API

It is the perfect alternative to Tailscale, Cloudflared, Ngrok or any other tunneling tool that otherwise works over ssh or servers.

Would love to hear feedback from anyone working with networking, P2P systems, or tunneling tools.

Happy to answer any questions!

Thanks

Comments

mutant•34m ago
i was frustrated by the documentation, so i had claude break this down.

it might be wtong but i wouldve had to invest significant time to understand your networking model without it.

-----

## Holesail Connection & Encryption Architecture

### Core Technology Stack

Holesail is built on top of *Holepunch’s Hyperswarm* ecosystem, specifically:

1. *HyperDHT* - Kademlia-based distributed hash table for peer discovery 1. *Hyperswarm* - High-level P2P networking abstraction 1. *@hyperswarm/secret-stream* - Noise Protocol + libsodium encryption layer 1. *UDX* - Custom UDP transport protocol

-----

### Connection Technique: UDP Holepunching

*How it works:*

1. *Peer Discovery via DHT*: When you run `holesail --live <port>`, the server generates an *Ed25519 keypair* and announces its public key to the HyperDHT. The connection string (`hs://...`) is essentially this public key encoded. 1. *NAT Traversal*: The DHT nodes themselves act as holepunch facilitators. Unlike traditional STUN/TURN servers, any peer in the DHT can help coordinate the holepunch between two NAT’d peers. This is what makes it “truly P2P” - no centralized relay infrastructure. 1. *Holepunch Mechanics*:

- Both peers send UDP packets to each other’s external IP:port (discovered via DHT) - The simultaneous outbound packets “punch” holes in both NATs - The DHT nodes relay timing/coordination metadata - Once holepunched, a direct UDP connection is established

1. *Transport*: Uses *UDX* (custom UDP protocol) for the data plane after holepunching. TCP fallback is available when UDP fails.

-----

### Encryption Management

*Two-layer encryption using Noise Protocol + libsodium secretstream:*

|Layer |Protocol |Purpose | |---------|--------------------------|------------------------------------| |Handshake|*Noise XX pattern* |Key exchange, mutual authentication | |Data |*libsodium secretstream*|Symmetric encryption of all payloads|

*Cryptographic Primitives:*

- *Key generation*: Ed25519 keypairs (identity/authentication) - *Key exchange*: Noise Protocol XX pattern (ephemeral DH) - *Symmetric encryption*: XChaCha20-Poly1305 (via libsodium secretstream) - *Handshake hash*: Unique per-session identifier (`socket.handshakeHash`) for crypto binding

*Secure vs Insecure Mode:*

- `hs://s000...` = *Secure* (prefix `s`) - Full Noise handshake with authentication - `hs://0000...` = *Insecure* - Presumably skips authentication (anonymous connections)

*The flow:*

``` 1. Peer A generates keypair → announces publicKey to DHT 2. Peer B looks up publicKey → initiates holepunch 3. After UDP connection established: a. Noise XX handshake begins (ephemeral keys exchanged) b. Both sides derive shared secret c. secretstream initialized with derived keys 4. All subsequent data encrypted with XChaCha20-Poly1305 ```

-----

### Key Properties

- *Identity-based routing*: Peers connect by public key, not IP address - works even if you move networks - *E2E encrypted by default*: No way for DHT nodes or relays to read your traffic - *No central servers*: Bootstrap nodes exist but only for DHT entry; traffic never routes through them - *Firewall support*: Optional `firewall()` callback to accept/reject connections by remotePublicKey

-----

### References

- Holesail: <https://github.com/holesail/holesail> - HyperDHT: <https://github.com/holepunchto/hyperdht> - Hyperswarm Secret Stream: <https://github.com/holepunchto/hyperswarm-secret-stream> - Holepunch docs: <https://docs.holepunch.to/building-blocks/hyperswarm> - Hypertele (predecessor): <https://github.com/bitfinexcom/hypertele>

supersuryaansh•28m ago
Hey thanks for the feedback, I am rewriting the whole documentation at the moment to make it easier to understand and cover v2 of Holesail that we recently released.

If you have a particular question about it, I am happy to help.

Borges on Kalshi

https://www.mikealche.com/uncategorized/borges-on-kalshi
1•yoouareperfect•1m ago•0 comments

Why Speed Matters

https://lemire.me/blog/2025/12/05/why-speed-matters/
2•gsky•3m ago•0 comments

AI chatbots can sway voters better than political advertisements

https://www.technologyreview.com/2025/12/04/1128824/ai-chatbots-can-sway-voters-better-than-polit...
1•_tk_•4m ago•0 comments

DNS over TLS with LetsEncrypt

https://blog.hardill.me.uk/2025/12/06/dns-over-tls-with-letsencrypt/
1•gsky•12m ago•0 comments

Ask HN: What's Been Your Experience Implementing Web Accessibility?

1•lalithaar•12m ago•0 comments

Physicists prove the Universe isn't a simulation after all

https://www.sciencedaily.com/releases/2025/11/251110021052.htm
3•webnrrd2k•12m ago•2 comments

Show HN: Stateless TikToken and Unix-Dictionary GitHub URL Shortener

https://selfdotsend.com/shorty/
1•pankajdoharey•15m ago•0 comments

Show HN: Trello Clone with Source Code

https://kanban.demo.codegres.com/
1•Codegres•19m ago•0 comments

Touching the Elephant – TPUs

https://considerthebulldog.com/tte-tpu/
2•giuliomagnifico•21m ago•0 comments

Self-hosted RSS reader with Docker and HTTPS

https://github.com/ggeorgovassilis/selfhosted-reader
2•ggeorgovassilis•31m ago•1 comments

John Oliver Auction Raises $1.5M for Public Broadcasting

https://www.techdirt.com/2025/12/05/john-oliver-auction-raises-1-5-million-for-public-broadcasting/
2•thunderbong•32m ago•0 comments

US Flips History by Casting Europe–Not Russia–As Villain in New Security Policy

https://www.wsj.com/world/europe/u-s-flips-history-by-casting-europenot-russiaas-villain-in-new-s...
3•layer8•32m ago•0 comments

Desantis Proposal for Citizens Bill of Rights for AI

https://www.flgov.com/eog/news/press/2025/governor-ron-desantis-announces-proposal-citizen-bill-r...
1•yankeehue•40m ago•0 comments

Why Apple Is Moving Intelligence Back to Your Laptop

https://www.apple.com/
4•alternativeto•41m ago•1 comments

Mapping cell dynamics in hair follicles suggests pull mechanism of hair growth

https://www.nature.com/articles/s41467-025-65143-x
1•rbanffy•41m ago•0 comments

'Life being stressful is not an illness' – GPS on mental health over-diagnosis

https://www.bbc.com/news/articles/cx2pvxdn9v4o
4•jnord•43m ago•1 comments

Show HN: GitHub Organisation Years in review stats

https://github.com/Tazer/years-in-review
3•tazer•43m ago•1 comments

Why Tehran Is Running Out of Water

https://www.wired.com/story/why-tehran-is-running-out-of-water-iran-climate-change-drought-extrem...
2•quapster•45m ago•0 comments

Iosevka – Versatile typeface for code, from code

https://github.com/be5invis/Iosevka
1•gjvc•47m ago•0 comments

Replit Design Mode

https://blog.replit.com/design-mode
2•555imon•53m ago•1 comments

Claude Opus 4.5 Gave Me a Perfect Tmux Setup

https://www.hadijaveed.me/2025/12/05/how-claude-opus-gave-me-perfect-tmux-setup/
2•hjaveed•55m ago•0 comments

Apple Interface Design Executive Left for Meta

https://daringfireball.net/2025/12/bad_dye_job
2•SoKamil•56m ago•0 comments

llama2.zig: Inference Llama 2 in one file of pure Zig

https://github.com/cgbur/llama2.zig
3•tosh•56m ago•0 comments

Cryptids

https://wiki.bbchallenge.org/wiki/Cryptids
1•frozenseven•1h ago•0 comments

Show HN: WDP – A protocol where data migrates to survive seizure

https://github.com/dododbobovo-commits/wdp
1•__VECTOR•1h ago•0 comments

We Gave Students Laptops and Took Away Their Brains

https://www.thefp.com/p/we-gave-students-laptops-and-took
3•tzury•1h ago•0 comments

Lessons from a Swift Interview

https://oskargroth.com/blog/swift-interview-lessons
1•cindori•1h ago•0 comments

Swiss government urges people to ditch Microsoft 365 – lack proper encryption

https://www.techradar.com/pro/security/swiss-government-urges-people-to-ditch-microsoft-365-and-o...
14•pseudolus•1h ago•2 comments

OpenRouter Broadcast

https://openrouter.ai/docs/guides/features/broadcast/overview
2•Topfi•1h ago•0 comments

Show HN: Holesail – open-source peer-to-peer tunnels

https://holesail.io/
1•supersuryaansh•1h ago•2 comments