* wg-dark: a tiny toy darknet
@ 2018-09-03 23:08 Jake McGinty
0 siblings, 0 replies; only message 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.
repo: https://github.com/wg-dark/wg-dark
# 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
an Invitee.
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
server's pubkey.
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] only message in thread
only message in thread, other threads:[~2018-09-03 22:54 UTC | newest]
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).