public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f40e600822ce836e82e8a46adba94cf3695eb72d
@ 2025-05-26  9:47 Michael Tremer
  0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2025-05-26  9:47 UTC (permalink / raw)
  To: ipfire-scm

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 <michael.tremer@ipfire.org>
Date:   Mon May 26 11:47:21 2025 +0200

    core196: Ship index.cgi and WireGuard changes
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit e35e6588673396fdaa3f33b25cd3075c0da9d577
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon May 26 11:46:35 2025 +0200

    core196: Sort filelist alphanumerically
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit c00e6e49c3cd0ba0fa3826539c251d757f41bc9a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon May 26 11:45:34 2025 +0200

    index.cgi: Use correct string for "WireGuard"
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 8277dec16614df36ed0bd6f687ce244c2d243c62
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon May 26 11:44:30 2025 +0200

    index.cgi: Translate "Online"
    
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 9f1f3da8f5866098177edd68ef50b238a3dadf6a
Author: Michael Tremer <michael.tremer@ipfire.org>
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 <michael.tremer@ipfire.org>

commit c29a07b2ee505811a6cd78ca643bf816beb77375
Author: Michael Tremer <michael.tremer@ipfire.org>
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 <michael.tremer@ipfire.org>

commit 5d14f5c10e43c3440e97f6ecc28d4b10709a0e07
Author: Adolf Belka <adolf.belka@ipfire.org>
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 <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit fbbaa19d13a828a98170fb3b23330189e9eed1d5
Author: Michael Tremer <michael.tremer@ipfire.org>
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 <michael.tremer@ipfire.org>

-----------------------------------------------------------------------

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  <info@ipfire.org>                     #
+# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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()) {
 				<a href='/cgi-bin/firewall.cgi' style='color:white'><b>$Lang::tr{'dmz'}</b></a>
 			</td>
 			<td style='width:30%; text-align:center;'>$netsettings{'ORANGE_ADDRESS'}/$sub</td>
-			<td style='width:45%; text-align:center; color:$Header::colourgreen;'>Online</td>
+			<td style='width:45%; text-align:center; color:$Header::colourgreen;'>$Lang::tr{'online'}</td>
 		</tr>
 END
 	}
@@ -345,7 +346,7 @@ print<<END;
 				<a href='/cgi-bin/vpnmain.cgi' style='color:white'><b>$Lang::tr{'ipsec'}</b></a>
 			</td>
 			<td style='width:30%; text-align:center;'></td>
-			<td style='width:45%; text-align:center; color:$Header::colourgreen;'>Online</td>
+			<td style='width:45%; text-align:center; color:$Header::colourgreen;'>$Lang::tr{'online'}</td>
 		</tr>
 END
 }
@@ -366,10 +367,26 @@ print <<END;
 			<a href='/cgi-bin/ovpnmain.cgi' style='color:white'><b>OpenVPN</b></a>
 		</td>
 		<td style='width:30%; text-align:center;'>$ovpnip</td>
-		<td style='width:45%; text-align:center; color:$Header::colourgreen;'>Online</td>
+		<td style='width:45%; text-align:center; color:$Header::colourgreen;'>$Lang::tr{'online'}</td>
 	</tr>
 END
-	}
+}
+
+# Show WireGuard status
+if (&Wireguard::is_enabled()) {
+	my $network = $Wireguard::settings{'CLIENT_POOL'};
+
+	print<<END;
+		<tr>
+			<td style='width:25%; text-align:center; background-color:$Header::colourwg;'>
+				<a href='/cgi-bin/wireguard.cgi' style='color:white'><b>$Lang::tr{'wireguard'}</b></a>
+			</td>
+			<td style='width:30%; text-align:center;'>$network</td>
+			<td style='width:45%; text-align:center; color:$Header::colourgreen;'>$Lang::tr{'online'}</td>
+		</tr>
+END
+}
+
 print"</table>";
 &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 &quot;Maximale Wiederholversuche&quot; 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-26  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-26  9:47 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f40e600822ce836e82e8a46adba94cf3695eb72d Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox