* wg-dark: a tiny toy darknet
@ 2018-09-03 23:08 Jake McGinty
0 siblings, 0 replies; 1+ messages in thread
From: Jake McGinty @ 2018-09-03 23:08 UTC (permalink / raw)
To: WireGuard mailing list; +Cc: notrhodey
I thought I'd share a toy darknet to the list. It's p2p, but with a
coordinating server to deal with addressing and NAT holepunching.
The client is 134 lines of cross-platform bash. The coordinating server
is an additional ~175 lines of node.
# How it works
A coordinating server is at an external address (ex. cool.dark.net) and
a fixed internal wg address (10.13.37.1). It handles 1) invites,
2) address assignment, and 3) peer announcements / NAT holepunching.
1) Any existing darknet peer GETs http://10.13.37.1:1337/invite, and
receives something like
"cool.dark.net:1337:6e435b7a2541b7443adebec9754fae9d". They give it to
1) Invitee POSTs https://cool.dark.net:1337/join and sends its invite
code and a generated wg pubkey.
2) Server sends back an assigned address (ex. 10.13.37.2/32) and the
3) Invitee adds the server as a peer to a new wg interface.
4) Invitee GETs http://10.13.37.1:1337/status and receives a wireguard
configuration list of all peers with their latest endpoints.
5) Peers periodically repeats the status request to update their peer lists.
That's about it. It's incredibly feature-limited, quick, dirty, and has
infinite room for improvement.
<< Not for use for anything other than funsies. >>
^ permalink raw reply [flat|nested] 1+ messages in thread
only message in thread, back to index
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 23:08 wg-dark: a tiny toy darknet Jake McGinty
WireGuard Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/ public-inbox