This project provides a lightweight system for distributing access keys to Outline VPN services. It leverages Google Apps Script to host the service using a high-collateral shared domain (scripts.google.com
) and to authenticate users.
The implementation is straightforward, consisting of only ~80 lines of code. It defines two web endpoints:
-
Home Page
A welcoming interface with a form to generate dynamic access keys. The dynamic access includes a token that encodes a device id and expiration date. -
Dynamic Key Endpoint
This endpoint interacts with the Outline Server API. It creates a static access key upon the first connection using the dynamic key. It uses the device id to replace the previous static key, and the expiration data to fail on expired keys.
You can try the service live at: https://my.freeoutlineserver.net
We manage the code with the clasp command line tool.
clasp create --type "webapp" --title "Outline Distribution"
Open the project on the browser:
clasp open
In the Project Settings, under Script Properties, create a API_URL
property with the value of the server management API URL.
clasp deploy
clasp open --webapp
Use clasp clone
with the project id to create the .clasp.json file:
clasp clone 17x29dO2HTBdvBMZxYI_k5K3lcY7jZtvY1E4ErUFJ2abzYGpXFs5Uzftn
To open the project on the browser:
clasp open