forked from freifunk-franken/firmware
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:
parent
9bc3b5d76e
commit
513301620d
|
@ -73,6 +73,22 @@ fi
|
||||||
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
|
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
|
||||||
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
|
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
|
||||||
<% fi %>
|
<% 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>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset style="padding-bottom:12px">
|
<fieldset style="padding-bottom:12px">
|
||||||
|
|
Loading…
Reference in New Issue