From 3140d46c944f56587bff8d97db141882c0333706 Mon Sep 17 00:00:00 2001 From: Donald Cheng Hong Zou Date: Sat, 14 Aug 2021 23:43:30 -0400 Subject: [PATCH] Finalizing the documentation --- README.md | 2 +- src/dashboard.py | 3 ++- src/templates/get_conf.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2fc2927..5a4894c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ - **Search peers**: You can now search peers by their name. - **Autostart on boot:** Added a tutorial on how to start the dashboard to on boot! Please read the [tutorial below](#autostart-wireguard-dashboard-on-boot). [❤️ in [#29](https://github.com/donaldzou/wireguard-dashboard/issues/29)] - **Click to copy**: You can now click and copy all peer's public key and configuration's public key. - - And many more... + - .... - 🪚 **Bug Fixed** - When there are comments in the wireguard config file, will cause the dashboard to crash. - Used regex to search for config files. diff --git a/src/dashboard.py b/src/dashboard.py index 7f96f80..974b22f 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -908,6 +908,7 @@ def download(config_name): private_key = peer['private_key'] allowed_ip = peer['allowed_ip'] DNS = peer['DNS'] + endpoint_allowed_ip = peer['endpoint_allowed_ip'] filename = peer['name'] if len(filename) == 0: filename = "Untitled_Peers" @@ -926,7 +927,7 @@ def download(config_name): 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 = 0.0.0.0/0\nEndpoint = " + endpoint + yield "[Interface]\nPrivateKey = " + private_key + "\nAddress = " + allowed_ip + "\nDNS = " + DNS + "\n\n[Peer]\nPublicKey = " + public_key + "\nAllowedIPs = "+endpoint_allowed_ip+"\nEndpoint = " + endpoint return app.response_class(generate(private_key, allowed_ip, DNS, public_key, endpoint), mimetype='text/conf', diff --git a/src/templates/get_conf.html b/src/templates/get_conf.html index 30d79a6..820b40e 100644 --- a/src/templates/get_conf.html +++ b/src/templates/get_conf.html @@ -152,7 +152,7 @@ {% if i['private_key'] %}
-