A minimal UDP-based P2P experimental network in Go.
Nodes discover each other via gossip: connect to one bootstrap peer, and the network builds itself from there.
# Terminal 1 — first node
./dandelion --port 9000
# Terminal 2 — join the network
./dandelion --port 9001 --bootstrap 127.0.0.1:9000Type anything and press enter to chat. Messages propagate through the P2P network.
make buildRequires Go. The Makefile disables CGO and uses the China Go proxy for fast builds.
| Flag | Default | Description |
|---|---|---|
--port |
9000 | UDP listen port |
--bootstrap |
(none) | Bootstrap peer address (host:port) |
--help |
Show help |
| Command | Description |
|---|---|
/peers, /p |
List connected peers |
/help, /h |
Show help |
/quit, /q |
Exit |
Binary UDP protocol with SOCKS5-style addressing (IPv4, IPv6, domain).
| Type | Purpose |
|---|---|
0x01 HELLO |
Peer discovery + gossip peer list |
0x02 LEAVE |
Graceful departure |
0x03 CHAT |
Chat message with hop-limited relay (max 5 hops) |
make test