diff --git a/.all-contributorsrc b/.all-contributorsrc index 4a636dd..eb8b2ff 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -41,10 +41,19 @@ "contributions": [ "code" ] + }, + { + "login": "marneu", + "name": "Markus Neubauer", + "avatar_url": "https://avatars.githubusercontent.com/u/5978293?v=4", + "profile": "http://www.std-soft.com", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, - "projectName": "wireguard-dashboard", + "projectName": "WGDashboard", "projectOwner": "donaldzou", "repoType": "github", "repoHost": "https://github.com", diff --git a/README.md b/README.md index a2577bf..cad7393 100644 --- a/README.md +++ b/README.md @@ -433,7 +433,7 @@ Bug Fixed: ## ✨ Contributors -[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): @@ -443,10 +443,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - + + + + +

antonioag95

⚠️ 💻

tonjo

💻

Richard Newton

💻

David Long

💻

antonioag95

⚠️ 💻

tonjo

💻

Richard Newton

💻

David Long

💻

Markus Neubauer

💻
diff --git a/src/dashboard.py b/src/dashboard.py index cd8b0bc..a0eea8f 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -994,7 +994,9 @@ def download(config_name): private_key = peer['private_key'] allowed_ip = peer['allowed_ip'] DNS = peer['DNS'] + MTU = peer['mtu'] endpoint_allowed_ip = peer['endpoint_allowed_ip'] + keepalive = peer['keepalive'] filename = peer['name'] if len(filename) == 0: filename = "Untitled_Peers" @@ -1011,10 +1013,10 @@ def download(config_name): filename = "".join(filename.split(' ')) filename = filename + "_" + config_name - def generate(private_key, allowed_ip, DNS, public_key, endpoint): - yield "[Interface]\nPrivateKey = " + private_key + "\nAddress = " + allowed_ip + "\nDNS = " + DNS + "\n\n[Peer]\nPublicKey = " + public_key + "\nAllowedIPs = "+endpoint_allowed_ip+"\nEndpoint = " + endpoint + def generate(private_key, allowed_ip, DNS, MTU, public_key, endpoint, keepalive): + yield "[Interface]\nPrivateKey = " + private_key + "\nAddress = " + allowed_ip + "\nDNS = " + DNS + "\nMTU = " + MTU + "\n\n[Peer]\nPublicKey = " + public_key + "\nAllowedIPs = " + endpoint_allowed_ip + "\nEndpoint = " + endpoint+ "\nPersistentKeepalive = " + keepalive - return app.response_class(generate(private_key, allowed_ip, DNS, public_key, endpoint), + return app.response_class(generate(private_key, allowed_ip, DNS, MTU, public_key, endpoint, keepalive), mimetype='text/conf', headers={"Content-Disposition": "attachment;filename=" + filename + ".conf"}) else: diff --git a/src/templates/get_conf.html b/src/templates/get_conf.html index 1032ad7..4b95885 100644 --- a/src/templates/get_conf.html +++ b/src/templates/get_conf.html @@ -182,7 +182,7 @@ {% if i['private_key'] %}
- diff --git a/src/wg-dashboard.service b/src/wg-dashboard.service index 44b5c43..d6ca41f 100644 --- a/src/wg-dashboard.service +++ b/src/wg-dashboard.service @@ -5,7 +5,7 @@ ConditionPathIsDirectory=/etc/wireguard [Service] Environment="VIRTUAL_ENV={{VIRTUAL_ENV}}" WorkingDirectory={{APP_ROOT}} -ExecStart={{VIRTUAL_ENV}}/bin/python3 {{APP_ROOT}}dashboard.py +ExecStart={{VIRTUAL_ENV}}/bin/python3 {{APP_ROOT}}/dashboard.py PrivateTmp=yes Restart=always diff --git a/src/wgd.sh b/src/wgd.sh index 2b29a88..f0839e4 100755 --- a/src/wgd.sh +++ b/src/wgd.sh @@ -37,7 +37,7 @@ _check_and_set_venv(){ if [ ! -d $VIRTUAL_ENV ]; then python3 -m venv $VIRTUAL_ENV fi - . ${VIRTUAL_ENV}/activate + . ${VIRTUAL_ENV}/bin/activate } install_wgd(){