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 4b5WCQ2NThz2y1f for ; Mon, 26 May 2025 09:47:46 +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 4b5WCQ28htz2xVX for ; Mon, 26 May 2025 09:47:46 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [172.28.1.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "people01.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4b5WCP5jHJz62 for ; Mon, 26 May 2025 09:47:45 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1748252865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=vVRqj5Q/Wt3qjHT5tbwuh23lFiSXXMgPVGXcQYzW+f0=; b=yfjce6DKTI2X9Tfamd1pOqu+2TmyzFp9ZcB4mahL3Y1LNKcoMdymNWXtuJ86xSAF/U3KfA 6Csn6fcmrk2TMqAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1748252865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=vVRqj5Q/Wt3qjHT5tbwuh23lFiSXXMgPVGXcQYzW+f0=; b=cCZ6Y0RqXAgTQUUTULPM3j1sW1WauOVqATny67mwh7Q5E+IxNSHg5PXGs5zMikmKyjjMX/ Vv1P5GGkKYYeGY8oaloDDzckInKNnVmKB8DBCjDLRYEqqXRqHXFhOA1OeIWHJL3ASEQWhA fS45mWKyqHWguWrrYcBOaRiPdaov4v+toOMphkxolObgRgYydyGmYqFKv7Aeus29py9Edp D1tNAuBAE2g0yJR5NObzl6o7SecrL+ewVZvWG4KqaZ40qovRAA1vNPHBqAj/RJaG9xufbt sIqo2BgfQScoG+a2viFrCXOvKpmDcxjjTcbNDTxpq35vLCgIgQWv23jCgd2iFw== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4b5WCP3pcNz2yMh; Mon, 26 May 2025 09:47:45 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f40e600822ce836e82e8a46adba94cf3695eb72d X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: 08511b2750fd664970015f3a9bf5ffb81cdcfae9 X-Git-Newrev: f40e600822ce836e82e8a46adba94cf3695eb72d Message-Id: <4b5WCP3pcNz2yMh@people01.haj.ipfire.org> Date: Mon, 26 May 2025 09:47:45 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via f40e600822ce836e82e8a46adba94cf3695eb72d (commit) via e35e6588673396fdaa3f33b25cd3075c0da9d577 (commit) via c00e6e49c3cd0ba0fa3826539c251d757f41bc9a (commit) via 8277dec16614df36ed0bd6f687ce244c2d243c62 (commit) via 9f1f3da8f5866098177edd68ef50b238a3dadf6a (commit) via c29a07b2ee505811a6cd78ca643bf816beb77375 (commit) via 5d14f5c10e43c3440e97f6ecc28d4b10709a0e07 (commit) via fbbaa19d13a828a98170fb3b23330189e9eed1d5 (commit) from 08511b2750fd664970015f3a9bf5ffb81cdcfae9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f40e600822ce836e82e8a46adba94cf3695eb72d Author: Michael Tremer Date: Mon May 26 11:47:21 2025 +0200 core196: Ship index.cgi and WireGuard changes Signed-off-by: Michael Tremer commit e35e6588673396fdaa3f33b25cd3075c0da9d577 Author: Michael Tremer Date: Mon May 26 11:46:35 2025 +0200 core196: Sort filelist alphanumerically Signed-off-by: Michael Tremer commit c00e6e49c3cd0ba0fa3826539c251d757f41bc9a Author: Michael Tremer Date: Mon May 26 11:45:34 2025 +0200 index.cgi: Use correct string for "WireGuard" Signed-off-by: Michael Tremer commit 8277dec16614df36ed0bd6f687ce244c2d243c62 Author: Michael Tremer Date: Mon May 26 11:44:30 2025 +0200 index.cgi: Translate "Online" Signed-off-by: Michael Tremer commit 9f1f3da8f5866098177edd68ef50b238a3dadf6a Author: Michael Tremer Date: Mon May 26 11:39:28 2025 +0200 index.cgi: Show the WireGuard client pool This is in line with the other Roadwarrior pools. Signed-off-by: Michael Tremer commit c29a07b2ee505811a6cd78ca643bf816beb77375 Author: Michael Tremer Date: Mon May 26 11:38:57 2025 +0200 index.cgi: Show WireGuard status using the function library The settings file is also loaded all the time and we don't need to load it again. Signed-off-by: Michael Tremer commit 5d14f5c10e43c3440e97f6ecc28d4b10709a0e07 Author: Adolf Belka Date: Sun May 25 13:35:01 2025 +0200 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 commit fbbaa19d13a828a98170fb3b23330189e9eed1d5 Author: Michael Tremer Date: Mon May 26 11:31:54 2025 +0200 wireguard-functions.pl: Add a simple function to check if enabled Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/cfgroot/wireguard-functions.pl | 5 +++++ config/rootfiles/core/196/filelists/files | 11 +++++++---- doc/language_issues.en | 1 + doc/language_issues.es | 1 + doc/language_issues.fr | 1 + doc/language_issues.it | 1 + doc/language_issues.nl | 1 + doc/language_issues.pl | 1 + doc/language_issues.ru | 1 + doc/language_issues.tr | 1 + doc/language_missings | 7 +++++++ html/cgi-bin/index.cgi | 27 ++++++++++++++++++++++----- html/cgi-bin/wireguard.cgi | 16 ++++++++-------- langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 15 files changed, 59 insertions(+), 17 deletions(-) Difference in files: diff --git a/config/cfgroot/wireguard-functions.pl b/config/cfgroot/wireguard-functions.pl index 11451a615..e8650e7d5 100644 --- a/config/cfgroot/wireguard-functions.pl +++ b/config/cfgroot/wireguard-functions.pl @@ -52,6 +52,11 @@ if (-e "/var/ipfire/wireguard/peers") { "CLIENT_DNS" => $Network::ethernet{'GREEN_ADDRESS'}, }); +# Returns true if WireGuard is enabled +sub is_enabled() { + return ($settings{'ENABLED'} eq "on"); +} + # Returns the local endpoint sub get_endpoint() { my $endpoint = $settings{'ENDPOINT'}; diff --git a/config/rootfiles/core/196/filelists/files b/config/rootfiles/core/196/filelists/files index a27954506..57731bead 100644 --- a/config/rootfiles/core/196/filelists/files +++ b/config/rootfiles/core/196/filelists/files @@ -1,9 +1,12 @@ +etc/rc.d/init.d/networking/red +srv/web/ipfire/cgi-bin/index.cgi +srv/web/ipfire/cgi-bin/netexternal.cgi +srv/web/ipfire/cgi-bin/netovpnsrv.cgi srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/pakfire.cgi -var/ipfire/langs/list +srv/web/ipfire/cgi-bin/wireguard.cgi var/ipfire/fwhosts/customservices var/ipfire/graphs.pl -srv/web/ipfire/cgi-bin/netexternal.cgi -srv/web/ipfire/cgi-bin/netovpnsrv.cgi -etc/rc.d/init.d/networking/red var/ipfire/ipblocklist-functions.pl +var/ipfire/langs/list +var/ipfire/wireguard-functions.pl diff --git a/doc/language_issues.en b/doc/language_issues.en index 2cb09c2b5..996572456 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -1403,6 +1403,7 @@ WARNING: untranslated string: one hour = One Hour WARNING: untranslated string: one month = One Month WARNING: untranslated string: one week = One Week WARNING: untranslated string: one year = One Year +WARNING: untranslated string: online = Online WARNING: untranslated string: online help en = Online help (in english) WARNING: untranslated string: only digits allowed in holdoff field = Only digits allowed in holdoff field WARNING: untranslated string: only digits allowed in max retries field = Only digits allowed in max retries field. diff --git a/doc/language_issues.es b/doc/language_issues.es index 0f47a5e8a..26edce40f 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -1072,6 +1072,7 @@ WARNING: untranslated string: malformed preshared key = Malformed Pre-Shared Key WARNING: untranslated string: malformed private key = Malformed Private Key WARNING: untranslated string: malformed public key = Malformed Public Key WARNING: untranslated string: no data = unknown string +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: openvpn cert expires soon = Expires Soon WARNING: untranslated string: openvpn cert has expired = Expired diff --git a/doc/language_issues.fr b/doc/language_issues.fr index 0612bf18f..80341a1c3 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -1022,6 +1022,7 @@ WARNING: untranslated string: local subnets = Local Subnets WARNING: untranslated string: malformed preshared key = Malformed Pre-Shared Key WARNING: untranslated string: malformed private key = Malformed Private Key WARNING: untranslated string: malformed public key = Malformed Public Key +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: ovpn roadwarrior server = OpenVPN Roadwarrior Server WARNING: untranslated string: pakfire ago = ago. diff --git a/doc/language_issues.it b/doc/language_issues.it index 4eaf186de..4ec3545ba 100644 --- a/doc/language_issues.it +++ b/doc/language_issues.it @@ -1256,6 +1256,7 @@ WARNING: untranslated string: one hour = One Hour WARNING: untranslated string: one month = One Month WARNING: untranslated string: one week = One Week WARNING: untranslated string: one year = One Year +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: open connections = Open Connections WARNING: untranslated string: openvpn cert expires soon = Expires Soon diff --git a/doc/language_issues.nl b/doc/language_issues.nl index 2d8fd7496..56c6dadf6 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -1279,6 +1279,7 @@ WARNING: untranslated string: one hour = One Hour WARNING: untranslated string: one month = One Month WARNING: untranslated string: one week = One Week WARNING: untranslated string: one year = One Year +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: open connections = Open Connections WARNING: untranslated string: openvpn cert expires soon = Expires Soon diff --git a/doc/language_issues.pl b/doc/language_issues.pl index 7a9033291..6ccb0a497 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -1431,6 +1431,7 @@ WARNING: untranslated string: one hour = One Hour WARNING: untranslated string: one month = One Month WARNING: untranslated string: one week = One Week WARNING: untranslated string: one year = One Year +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: open connections = Open Connections WARNING: untranslated string: openvpn cert expires soon = Expires Soon diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 63da07bdd..8a689daa7 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -1427,6 +1427,7 @@ WARNING: untranslated string: one hour = One Hour WARNING: untranslated string: one month = One Month WARNING: untranslated string: one week = One Week WARNING: untranslated string: one year = One Year +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: open connections = Open Connections WARNING: untranslated string: openvpn cert expires soon = Expires Soon diff --git a/doc/language_issues.tr b/doc/language_issues.tr index 4b4d780bd..e79fe1388 100644 --- a/doc/language_issues.tr +++ b/doc/language_issues.tr @@ -1172,6 +1172,7 @@ WARNING: untranslated string: no data = unknown string WARNING: untranslated string: no entries = No entries at the moment. WARNING: untranslated string: not affected = Not Affected WARNING: untranslated string: not validating = Not validating +WARNING: untranslated string: online = Online WARNING: untranslated string: oops something went wrong = Oops, something went wrong... WARNING: untranslated string: open connections = Open Connections WARNING: untranslated string: openvpn cert expires soon = Expires Soon diff --git a/doc/language_missings b/doc/language_missings index 63a039730..0262ff0e4 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -173,6 +173,7 @@ < malformed preshared key < malformed private key < malformed public key +< online < oops something went wrong < openvpn cert expires soon < openvpn cert has expired @@ -285,6 +286,7 @@ < malformed preshared key < malformed private key < malformed public key +< online < oops something went wrong < ovpn roadwarrior server < password has quotation mark @@ -729,6 +731,7 @@ < one month < one week < one year +< online < oops something went wrong < open connections < openvpn cert expires soon @@ -1362,6 +1365,7 @@ < one month < one week < one year +< online < oops something went wrong < open connections < openvpn cert expires soon @@ -2300,6 +2304,7 @@ < one month < one week < one year +< online < oops something went wrong < open connections < openvpn cert expires soon @@ -3390,6 +3395,7 @@ < one month < one week < one year +< online < oops something went wrong < open connections < openvpn cert expires soon @@ -4001,6 +4007,7 @@ < not affected < not validating < okay +< online < oops something went wrong < open connections < openvpn cert expires soon diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index d9c74ce7f..e0e18dd62 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 # @@ -30,6 +30,7 @@ use Sort::Naturally; require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +require "${General::swroot}/wireguard-functions.pl"; require "/opt/pakfire/lib/functions.pl"; my %cgiparams=(); @@ -333,7 +334,7 @@ if (&Header::orange_used()) { $Lang::tr{'dmz'} $netsettings{'ORANGE_ADDRESS'}/$sub - Online + $Lang::tr{'online'} END } @@ -345,7 +346,7 @@ print<$Lang::tr{'ipsec'} - Online + $Lang::tr{'online'} END } @@ -366,10 +367,26 @@ print <OpenVPN $ovpnip - Online + $Lang::tr{'online'} END - } +} + +# Show WireGuard status +if (&Wireguard::is_enabled()) { + my $network = $Wireguard::settings{'CLIENT_POOL'}; + + print< + + $Lang::tr{'wireguard'} + + $network + $Lang::tr{'online'} + +END +} + print""; &Header::closesection(); diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index 6fc01c404..b9661948c 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -94,7 +94,7 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { &General::writehash("/var/ipfire/wireguard/settings", \%Wireguard::settings); # Start if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } else { &General::system("/usr/local/bin/wireguardctrl", "stop"); @@ -117,7 +117,7 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } @@ -230,7 +230,7 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } @@ -349,7 +349,7 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } @@ -534,7 +534,7 @@ END &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } @@ -649,7 +649,7 @@ END &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } @@ -765,7 +765,7 @@ END &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers); # Reload if enabled - if ($Wireguard::settings{'ENABLED'} eq "on") { + if (&Wireguard::is_enabled()) { &General::system("/usr/local/bin/wireguardctrl", "start"); } } @@ -785,7 +785,7 @@ MAIN: &Header::openbox('100%', '', $Lang::tr{'global settings'}); my %checked = ( - "ENABLED" => ($Wireguard::settings{'ENABLED'} eq "on") ? "checked" : "", + "ENABLED" => (&Wireguard::is_enabled()) ? "checked" : "", ); my %readonly = ( diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index c4fb03ca5..53d6903ae 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1895,6 +1895,7 @@ 'one month' => 'Ein Monat', 'one week' => 'Eine Woche', 'one year' => 'Ein Jahr', +'online' => 'Online', 'online help en' => 'Online-Hilfe (auf Englisch)', 'only digits allowed in holdoff field' => 'Im Holdoff-Feld sind nur Ziffern erlaubt', 'only digits allowed in max retries field' => 'Im Feld "Maximale Wiederholversuche" sind nur Ziffern erlaubt.', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index dc905cdde..ef7d75ce7 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1960,6 +1960,7 @@ 'one month' => 'One Month', 'one week' => 'One Week', 'one year' => 'One Year', +'online' => 'Online', 'online help en' => 'Online help (in english)', 'only digits allowed in holdoff field' => 'Only digits allowed in holdoff field', 'only digits allowed in max retries field' => 'Only digits allowed in max retries field.', hooks/post-receive -- IPFire 2.x development tree