Closed stephen304 closed 4 years ago
ip ro add <peer_ip> via <wan_gw> dev <wan_dev>
, 3 paramsip addr add 10.42.0.4/16 dev ygg0
, 2 parameters, ip/cidr and interface nameyggdrasilctl addremotesubnet subnet=10.42.0.1/32 box_pub_key=<key>
, 2 params, ip/cidr and key. Use hemicarp for thisip ro replace default via 10.42.0.1
, 1 param
Here's my gateway auto configuration pipe-dream
Server Daemon
HTTP Endpoints accessible to ygg
GET /info
- Displays infoPOST /register
- Takes basic information and stores requester's node key for whitelistingGET /register
- Shows the status of registrationPOST /renew
- takes the source IP and finds public key, finds a free or existing IP in ygg.conf and adds a remote subnet if not exists, returns json or plain text the assigned IP, save timestamp somewhereDaemon 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 enabledWhitelist=[]
Whitelist array of keys to allow along with optional data, or whitelist file /shrugBlacklistEnabled=true/false
Blacklist=[]
AllowRegistration=true/false
Enables the/register
endpoint, which outputs toRegistered
RegistrationAutoApprove=true/false
Redirects registered nodes to theWhitelist
Registered=[]
Nodes that have registered, awaiting approvalMaxClients=10
If there are <= MaxClients leases unexpired, reject/renew
requests that do not have a leaseLeaseTimeout=240
Number of minutes to consider lease expiredClient 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 / routesHTTP Endpoints accessible locally
POST /connect
- with gateway ID, on success it saves lease details for hourly daemon to renew and assigns ip/routesClient UI