fff-web-ui: Show more information about wireguard

Show more information in the WebUI about wireguard VPN connection

Signed-off-by: Christian Dresel <freifunk@dresel.systems>
This commit is contained in:
Christian Dresel 2022-04-30 12:29:28 +02:00
parent 9bc3b5d76e
commit 513301620d
1 changed files with 16 additions and 0 deletions

View File

@ -73,6 +73,22 @@ fi
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
<% fi %>
<% if [ -f "$(command -v wg)" ] ; then %>
<tr><td>
<table border="1">
<tr><th style="text-align:center">Interfacename</th><th style="text-align:center">Endpoint</th><th style="text-align:center">Handshake</th><th style="text-align:center">Daten</th></tr>
<% for f in $(wg | grep interface | cut -d ":" -f 2 | sed 's/^ //'); do
endpoint="$(wg show $f | grep endpoint)"
handshake="$(wg show $f | grep handshake)"
transfer="$(wg show $f | grep transfer)"
echo "<tr><td style="text-align:center">"$f"</td>"
echo "<td style="text-align:center">"${endpoint#*:}"</td>"
echo "<td style="text-align:center">"${handshake#*:}"</td>"
echo "<td style="text-align:center">"${transfer#*:}"</td>"
done %>
</table>
</td></tr>
<% fi %>
</table>
</fieldset>
<fieldset style="padding-bottom:12px">