A Django app to manage WireGuard Interfaces.
Project description
This is a Django app that provides management via Admin Site for WireGuard interfaces and peers.
Quick start
Add “django_wireguard” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'django_wireguard', ]
Run python manage.py migrate to create the models.
Visit http://localhost:8000/admin/ to manage the VPN peers. Note: you must enable the Django Admin Site first https://docs.djangoproject.com/en/3.1/ref/contrib/admin/.
Enabling the Wagtail Integration
Add “simple_vpn.wagtail” to your INSTALLED_APPS setting after simple_vpn:
INSTALLED_APPS = [ ... 'django_wireguard' 'django_wireguard.wagtail', ]
You can manage the VPN from the Wagtail Admin Panel Settings. Inspect a WireguardPeer object to view their configuration.
Configuration
The following settings can be provided:
WIREGUARD_ENDPOINT the endpoint for the peer configuration. Set it to the server Public IP address or domain. Default: localhost.
WIREGUARD_STORE_PRIVATE_KEYS set this to False to disable auto generation of peer private keys. Default: True.
WIREGUARD_WAGTAIL_SHOW_IN_SETTINGS set this to False to show WireGuard models in root sidebar instead of settings panel. Default: True.
Testing with Docker
Make sure the WireGuard kernel modules are installed and loaded on the host machine.
Run docker build -f Dockerfile.test -t django_wg_test .
Run docker run –cap-add NET_ADMIN django_wg_test
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_wireguard-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f53794ab8788b6d0136f2b2310ff874173fe28fae1a72f9961da49da3b60d10 |
|
MD5 | c9ea0357b414a0a2c300ae519b68198f |
|
BLAKE2b-256 | 931362814e3a56b4eeaa30f75f307631c3430271e91a427aede8c3918d3340ef |