Wireguard/Seedbox automatic user management

Messages
588
Location
Gurgaon
ISP
Airtel FTTH
I have been trying to automate few things and therefore I tried making a demo project for automatic wireguard user creation.

Here is how it works,
The user creates a account using Google's one tap sign up, the signup triggers a function in Google cloud which sends a API call with UUID and a secret API key, after the server verifies the call, it passes the UUID to a shell script which creates a private/public key pair and adds it to wireguard peers list along with interface etc.
The script then creates a config file for the user and uploads it to firebase storage (based on Google cloud storage) in a new seperate UUID folder in the bucket (helps with restricting access to config to other users even if they have the URL)
Now after signup (and login) the user is redirected to a page which asks the user to click to download the config file
The user is then redirected to a page which verifies the user and automatically downloads the config file for that particular user through Google cloud.
Obviously many other small things as well to make it work.

Though not implemented, it's easy to have per user speed and data cap.

It's also easy to serve content from a local/custom storage instead of Google cloud.

The same thing can be used for Seedbox for anything similar for that matter, if anyone is interested I will share the exact procedure and source code.
Extremely basic HTML design, not planning to or earning anything from this, to try how it is like

 
Thanks for sharing this. On second thought, wouldn't it be better for everyone if you could share links to your github repo?
 

Top