summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--protocols/luci-proto-wireguard/htdocs/luci-static/resources/view/wireguard/status.js37
-rw-r--r--protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard2
2 files changed, 2 insertions, 37 deletions
diff --git a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/view/wireguard/status.js b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/view/wireguard/status.js
index 3b7fa13b25..4344c36739 100644
--- a/protocols/luci-proto-wireguard/htdocs/luci-static/resources/view/wireguard/status.js
+++ b/protocols/luci-proto-wireguard/htdocs/luci-static/resources/view/wireguard/status.js
@@ -30,43 +30,6 @@ function timestampToStr(timestamp) {
return (new Date(timestamp * 1000)).toUTCString() + ' (' + ago + ')';
}
-/*
-{
- "jow": {
- "public_key": "o4iLoC1pl8+vEUshV7eUyKrryo7cr0WJkjS/Dlixxy8=",
- "name": "jow",
- "fwmark": "off",
- "listen_port": "51821",
- "peers": [
- {
- "endpoint": "45.13.105.118:51821",
- "public_key": "672KLy/R4miKXdvw2unuf9jQzVEmNnqen5kF+zVjMX0=",
- "name": "m300",
- "latest_handshake": "1668680574",
- "persistent_keepalive": "off",
- "allowed_ips": [
- "192.168.220.10/32"
- ],
- "transfer_tx": "308",
- "transfer_rx": "220"
- },
- {
- "endpoint": "171.22.3.161:51821",
- "public_key": "yblNj1s41F8m1MdXhxD2U+Aew6ZR6Miy8OcNK/fkAks=",
- "name": "ac2",
- "latest_handshake": "0",
- "persistent_keepalive": "off",
- "allowed_ips": [
- "192.168.220.11/32"
- ],
- "transfer_tx": "2960",
- "transfer_rx": "0"
- }
- ]
- }
-}
-*/
-
function handleInterfaceDetails(iface) {
ui.showModal(_('Instance Details'), [
ui.itemlist(E([]), [
diff --git a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
index fc99919127..add810c8ae 100644
--- a/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
+++ b/protocols/luci-proto-wireguard/root/usr/share/rpcd/ucode/luci.wireguard
@@ -52,6 +52,8 @@ const methods = {
const wg_dump = popen("wg show all dump 2>/dev/null");
if (wg_dump) {
+ uci.load("network");
+
for (let line = wg_dump.read('line'); length(line); line = wg_dump.read('line')) {
const record = split(rtrim(line, '\n'), '\t');