]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
wireguard.cgi: Make the client configuration downloadable
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Apr 2024 18:03:49 +0000 (20:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Apr 2025 14:48:32 +0000 (16:48 +0200)
I believe this is much better than copy & paste.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
12 files changed:
doc/language_issues.de
doc/language_issues.en
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.it
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
doc/language_missings
html/cgi-bin/wireguard.cgi
langs/en/cgi-bin/en.pl

index 3e61e176bf351123650b95d48992067051fc251e..1c023bc5a31ece5fe2260498ff4e8cba370e7e55 100644 (file)
@@ -1035,10 +1035,10 @@ WARNING: untranslated string: show tls-auth key = Show tls-auth key
 WARNING: untranslated string: smb daemon = SMB Daemon
 WARNING: untranslated string: subscription code = Subscription code
 WARNING: untranslated string: user management = User Management
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 0a81010b2da93128bda3ad8045413d8a5e0ae011..221ae39759cb908af2978effadcd19f886fae02d 100644 (file)
@@ -2142,10 +2142,10 @@ WARNING: untranslated string: web server = Web Server
 WARNING: untranslated string: website = Website
 WARNING: untranslated string: wednesday = Wednesday
 WARNING: untranslated string: weeks = Weeks
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 2d9a925b210f63cc005d037f120ee7cfecc3f5fb..a2c280f7ae83a701c00cf746b4ec8a11636cd7ad 100644 (file)
@@ -1102,10 +1102,10 @@ WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
 WARNING: untranslated string: total = Total
 WARNING: untranslated string: transport mode does not support vti = VTI is not support in transport mode
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 0ccbe945fea40dc306e8583f3268ba6cd395283e..f99b852eaf828dc134af47efaf15c40528479659 100644 (file)
@@ -1042,10 +1042,10 @@ WARNING: untranslated string: system time = System Time (as of last page load)
 WARNING: untranslated string: timeformat = %Y-%m-%d at %H:%M:%S %Z
 WARNING: untranslated string: total = Total
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 0fe19599d58b52d8a8efa7c1dbb942b7a5c380e9..5cb57c8960aff393bbd42faf5e3e5bd21ca2b66d 100644 (file)
@@ -1388,10 +1388,10 @@ WARNING: untranslated string: vpn weak = Weak
 WARNING: untranslated string: vulnerability = Vulnerability
 WARNING: untranslated string: vulnerable = Vulnerable
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 87c69961d7577c142c927d018d07eed7bfd57137..b9e3c8ff93f7b77665e280e6a61df5afbc27f102 100644 (file)
@@ -1409,10 +1409,10 @@ WARNING: untranslated string: vpn weak = Weak
 WARNING: untranslated string: vulnerability = Vulnerability
 WARNING: untranslated string: vulnerable = Vulnerable
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index cb25ad7ea8fc4b89542ccf7b78d740d13c149f9e..3f41f4c7189c6aed05fbe296536c0efe1ded5140 100644 (file)
@@ -1651,10 +1651,10 @@ WARNING: untranslated string: vpn weak = Weak
 WARNING: untranslated string: vulnerability = Vulnerability
 WARNING: untranslated string: vulnerable = Vulnerable
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index ee2eb4eddcdb49de71695374f2fbf8824d56223f..674c9481368f30b30287b7ab816c238a4053faaf 100644 (file)
@@ -1644,10 +1644,10 @@ WARNING: untranslated string: vpn weak = Weak
 WARNING: untranslated string: vulnerability = Vulnerability
 WARNING: untranslated string: vulnerable = Vulnerable
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 77b1cb12ce0754eb9dbcd67c95232ab0e95f0b73..405d65ac85e51e8287ee6cb010ed984087e9e341 100644 (file)
@@ -1271,10 +1271,10 @@ WARNING: untranslated string: vpn wait = WAITING
 WARNING: untranslated string: vulnerability = Vulnerability
 WARNING: untranslated string: vulnerable = Vulnerable
 WARNING: untranslated string: warning = Warning
-WARNING: untranslated string: wg client configuration file = WireGuard Client Configuration File
 WARNING: untranslated string: wg client pool = Client Pool
 WARNING: untranslated string: wg create peer = Create A New Peer
 WARNING: untranslated string: wg dns = DNS
+WARNING: untranslated string: wg download configuration file = Download the configuration file
 WARNING: untranslated string: wg edit peer = Edit Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
index 66f31028edba7249e4e7fb5b193a2efefa153adf..4aac70978434fe6578c295cbb2be257f7e8cbc16 100644 (file)
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
 < wg client pool
 < wg create peer
 < wg dns
+< wg download configuration file
 < wg edit peer
 < wg host to net client settings
 < wg invalid client dns
index 8b62bfedcc9123ad9e526f86f0a895f4c32c7c0c..80b793c649a723d4b2643d43aedb50b261ae82bf 100644 (file)
@@ -974,6 +974,9 @@ sub show_peer_configuration($$) {
        # Encode the image as bas64
        $qrcode = &MIME::Base64::encode_base64($qrcode);
 
+       # Encode the configuration as Base64
+       $config = &MIME::Base64::encode_base64($config);
+
        # Open a new box
        &Header::openbox('100%', '', "$Lang::tr{'wg peer configuration'}: $peer{'NAME'}");
 
@@ -986,11 +989,13 @@ sub show_peer_configuration($$) {
                        <p>
                                $Lang::tr{'wg scan the qr code'}
                        </p>
-               </div>
-
-               <h6>$Lang::tr{'wg client configuration file'}</h6>
 
-               <code><pre>$config</textarea></code>
+                       <p>
+                               <a href="data:text/plain;base64,${config}" download="$peer{'NAME'}.conf">
+                                       $Lang::tr{'wg download configuration file'}
+                               </a>
+                       </p>
+               </div>
 END
 
        &Header::closebox();
index 4b6d793e8267beab34733f50fc5e8742682c7929..e2a8ca0f50201fe6a394763056eecaf38e7c6576 100644 (file)
 'wg client pool' => 'Client Pool',
 'wg create peer' => 'Create A New Peer',
 'wg dns' => 'DNS',
+'wg download configuration file' => 'Download the configuration file',
 'wg edit peer' => 'Edit Peer',
 'wg host to net client settings' => 'Host-To-Net Client Settings',
 'wg invalid client dns' => 'Invalid client DNS address',