skx / simple-vpn

A simple VPN allowing mesh-like communication between nodes, over websockets
BSD 3-Clause "New" or "Revised" License
284 stars 48 forks source link

Peers should know about each other. #10

Closed skx closed 6 years ago

skx commented 6 years ago

Every time a new peer comes online we should broadcast that to the other nodes.

The only hard part is working out how to handle this, for the moment we could assume we'll invoke a script every time a node joins:

With $CLIENT_NAME + $CLIENT_IP. However the better case would be to execute only a single script one-time. Passing a list of an arbitrary pair of name/IPs is hard though if we want to use the environment.

Perhaps we'll need JSON, but that suddenly means we can't use a bash-script easily..