Skip to content

Cherrling/dandelion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dandelion

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.

Quick start

# Terminal 1 — first node
./dandelion --port 9000

# Terminal 2 — join the network
./dandelion --port 9001 --bootstrap 127.0.0.1:9000

Type anything and press enter to chat. Messages propagate through the P2P network.

Build

make build

Requires Go. The Makefile disables CGO and uses the China Go proxy for fast builds.

CLI flags

Flag Default Description
--port 9000 UDP listen port
--bootstrap (none) Bootstrap peer address (host:port)
--help Show help

TUI commands

Command Description
/peers, /p List connected peers
/help, /h Show help
/quit, /q Exit

Protocol

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)

Test

make test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors