MassMesh / meta-imagebuilder

10 stars 4 forks source link

Gateway auto configuration pipe-dream #40

Closed stephen304 closed 4 years ago

stephen304 commented 4 years ago

Here's my gateway auto configuration pipe-dream

Server Daemon

HTTP Endpoints accessible to ygg

Daemon tasks

Schedule daemon to hourly remove leases not renewed in x hours

Daemon config

WhitelistEnabled=true/false Rejects /renew requests from keys not in whitelist if enabled Whitelist=[] Whitelist array of keys to allow along with optional data, or whitelist file /shrug BlacklistEnabled=true/false Blacklist=[] AllowRegistration=true/false Enables the /register endpoint, which outputs to Registered RegistrationAutoApprove=true/false Redirects registered nodes to the Whitelist Registered=[] Nodes that have registered, awaiting approval MaxClients=10 If there are <= MaxClients leases unexpired, reject /renew requests that do not have a lease LeaseTimeout=240 Number of minutes to consider lease expired

Client Daemon

Schedules hourly daemon to POST /renew if a lease is saved, detect if IP changes (it could if it expired and a new lease is given), and execute the proper steps to update tunnel ip / routes

HTTP Endpoints accessible locally

POST /connect - with gateway ID, on success it saves lease details for hourly daemon to renew and assigns ip/routes

Client UI

stephen304 commented 4 years ago

mm_lib.py or something

wfleurant commented 4 years ago
wfleurant commented 4 years ago