Settings

Theme

Show HN: Gonc – Serverless P2P dual reverse proxy with NAT traversal

gonc.cc

4 points by gonc_cc a month ago · 0 comments · 1 min read

Reader

Over the past couple of months, I've been working on gonc. It started as a cross-platform netcat alternative written in Go, but I realized it would be much more powerful with a -p2p flag to automatically punch through NATs and firewalls.

It is now working smoothly. To establish a P2P netcat-like chat connection, you simply run the same command on both sides:

gonc -p2p <passphrase>

Building on this, I implemented a dual (bidirectional) reverse proxy. This allows both peers to access each other's networks simultaneously.

Peer A:

gonc -p2p <passphrase> -linkagent

Peer B:

gonc -p2p <passphrase> -link 1080;1080

This opens port 1080 on both ends as a SOCKS5 & HTTP proxy to tunnel traffic to the other side.

How it differs from frp/rathole: Unlike existing solutions that require you to deploy a self-hosted Rendezvous/Signaling Server, gonc uses public STUN and MQTT servers for signaling.

For cases involving Symmetric NATs where a relay is unavoidable, gonc doesn't need a proprietary relay server—it can simply use any standard SOCKS5 server as a relay.

Peer B: (only one side needs to specify -x)

gonc -x socks5ip:port -p2p <passphrase> -link 1080;1080

I'd love to hear your feedback or suggestions!

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection