Handles login, VPN server registration, server selection, peer registration, and persisted lease state.
- Node.js
- TypeScript
- Fastify
- Run
npm install - Copy
.env.exampleto.env - Set the following values:
AUTH_SECRETINVITE_CODEGATEWAY_SHARED_SECRETHTTP_PORTGATEWAY_STATE_FILEif you want a custom state path
npm run devnpm run build- Registered VPN server data and lease state are stored in
.data/gateway-leases.jsonby default. - The gateway no longer uses static
VPN_SERVER_A_URL/VPN_SERVER_B_URLentries. VPN servers register themselves through/vpn/register.