From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4b4xdv4WJjz3085 for ; Sun, 25 May 2025 11:35:15 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4b4xdr0y0Vz2xVX for ; Sun, 25 May 2025 11:35:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4b4xdq2xGMzp3; Sun, 25 May 2025 11:35:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1748172911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iHdA56fyL4rX5tZj/9PsuaKhgDwl7lL06PSn7g34cEM=; b=h30y7BUqnq4DmRtPtwSznOOhmwZJ8kw0OEjrV9Pple/4zfAAhaTIZ6jS87yocjKWiEuNPn n+uaJ47PrSfusABw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1748172911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iHdA56fyL4rX5tZj/9PsuaKhgDwl7lL06PSn7g34cEM=; b=PEtl8V4aeL/j3qb40YLlxPc+8KsipFK20rtprl3dNmiSs0/3EgDRHrmVS4WeBIEAKxZmFj Y85MpWDYikYjLFUhQjM++7ZB1W0KyHfGyyutUPmf2+LdMpYQFqJEsgGPhx4YQz1/AosPYz pNcMDr4z4u/SbG8c1ngyoDyl2jeKWieQVIeS9h+1VlzY/VpQcvgMZmtmlAaEbd+4mwcDBH Bh49FSyWOSOIJ2FFhQKrcWOPoJXeVSEva4C8h8ycMBJy48SRgmYOlJTqOjUfpCAHsQpLw8 6Uw1hL3YxQ4O+IwwFhNCECgjZKHhlG9MwnaBr5QgWTZVAWZhP+XIYGhStA3I2w== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] index.cgi: Add wireguard status to home screen Date: Sun, 25 May 2025 13:35:01 +0200 Message-ID: <20250525113501.9516-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - 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 --- 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 d9c74ce7f..e28629cc9 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.49.0