From 5d14f5c10e43c3440e97f6ecc28d4b10709a0e07 Mon Sep 17 00:00:00 2001 From: Adolf Belka Date: Sun, 25 May 2025 13:35:01 +0200 Subject: [PATCH] index.cgi: Add wireguard status to home screen - This fix adds a wireguard line to show when it is enabled. - This fix does not show a table for any net2net connections that are enabled. I have started working on that but as I only have an OpenVPN n2n connection in place, I can't test out the copy of the ipsec n2n code section that I have made. I need to get ipsec and wireguard n2n connections working first. - If someone else wants to provide a patch for the wireguard n2n connections tables I have no problems with that. If not then I will submit one when I have been able to test it. Tested-by: Adolf Belka Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer --- html/cgi-bin/index.cgi | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index d9c74ce7f8..e28629cc9b 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2023 IPFire Team # +# Copyright (C) 2007-2025 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -39,6 +39,7 @@ my %netsettings=(); my %ddnssettings=(); my %proxysettings=(); my %vpnsettings=(); +my %wgsettings=(); my %vpnconfig=(); my %ovpnconfig=(); my $warnmessage = ''; @@ -60,6 +61,7 @@ $pppsettings{'PROFILENAME'} = 'None'; &General::readhash("${General::swroot}/ddns/settings", \%ddnssettings); &General::readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings); &General::readhash("${General::swroot}/vpn/settings", \%vpnsettings); +&General::readhash("${General::swroot}/wireguard/settings", \%wgsettings); my %color = (); my %mainsettings = (); @@ -369,7 +371,21 @@ print <Online END - } +} + +#check if WireGuard is running +if ( $wgsettings{'ENABLED'} eq 'on' ) { +print< + + $Lang::tr{'wg'} + + + Online + +END +} + print""; &Header::closesection(); -- 2.39.5