Quick and dirty Outline VPN key manager for jfkerman.me. Written over 2 evenings, so don't expect any quality code or documentation here.
License: MIT
Moved to settings.
The following details how to deploy this application.
NOTE
I am a dum dum who never learned to use Docker. Please send me a PR if you figure it out.
- Clone the repository.
- Configure the settings for your production server (see settings).
- Add your server's IP to
ALLOWED_HOSTS
inconfig/settings/production.py
. - Set
DEBUG = False
. - Create a production database and user, and update the
DATABASE_URL
inconfig/settings/production.py
. - Create necessary directories for media and static files, and update
MEDIA_ROOT
andSTATIC_ROOT
inconfig/settings/production.py
. - Run
python manage.py collectstatic
. - Run
python manage.py migrate
. - Create a superuser with
python manage.py createsuperuser
. - Install a web server (e.g. Nginx) and configure it to serve the application using WSGI/ASGI.
- Create systemd service files for the application and the web server (I forgot to add example files, you are on your own ¯\_(ツ)_/¯). Systemd should point to the
start.sh
file. - Create a cron job (or a systemd timer) to run
schedule.sh
every 5 minutes. - Start your services, it should hopefully work.
To add a server, log in to the admin interface and create a new Outline Server
object. The Outline Server
object has the following fields:
Field | Description |
---|---|
Name | A human-readable name for the server. |
Slug | A unique identifier for the server. |
Country | The country where the server is located; this field is used to display flags. See possible options in jfkerman_outline/static/images/country |
Url | The URL of the server for client connections. |
Port | The port of the server for client connections. |
API URL | The URL of the server for API connections, you can find it in installation logs or in Outline Manager. |
API Cert | SHA256 fingerprint of the server's API certificate (self-signed). |
Keys per user | The number of keys a user can generate for this server. |
Max data per key | Max monthly data limit for a single key. |
Command to obtain API Cert SHA256 fingerprint:
openssl s_client -connect <API URL> < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin