]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
wireguard.cgi: Rebuild the importer
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Apr 2025 11:54:30 +0000 (13:54 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 26 Apr 2025 11:54:30 +0000 (13:54 +0200)
This is now a two-step process that is asking for all sorts of required
information.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
13 files changed:
config/cfgroot/wireguard-functions.pl
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 c8af939b58bc106f6b820c74e2073df9d652d5a2..e9dc667472a1f77c61186bfe2262289d4998c3f4 100644 (file)
@@ -453,10 +453,13 @@ sub generate_peer_configuration($$) {
        return join("\n", @conf);
 }
 
-sub parse_configuration($) {
+sub parse_configuration($$) {
+       my $name = shift;
        my $fh = shift;
 
-       my %peer = ();
+       my %peer = (
+               "NAME" => $name,
+       );
 
        # Collect any errors
        my @errormessages = ();
@@ -465,6 +468,16 @@ sub parse_configuration($) {
        my $key = undef;
        my $val = undef;
 
+       # Check if the name is valid
+       unless (&Wireguard::name_is_valid($name)) {
+               push(@errormessages, $Lang::tr{'wg invalid name'});
+       }
+
+       # Check if the name is already taken
+       unless (&Wireguard::name_is_free($name)) {
+               push(@errormessages, $Lang::tr{'wg name is already used'});
+       }
+
        while (<$fh>) {
                # Remove line breaks
                chomp;
@@ -498,6 +511,14 @@ sub parse_configuration($) {
                                        push(@errormessages, $Lang::tr{'invalid ip address'});
                                }
 
+                       # Port
+                       } elsif ($key eq "Port") {
+                               if (&General::validport($val)) {
+                                       $peer{'PORT'} = $val;
+                               } else {
+                                       push(@errormessages, $Lang::tr{'wg invalid endpoint port'});
+                               }
+
                        # PrivateKey
                        } elsif ($key eq "PrivateKey") {
                                if (&key_is_valid($val)) {
@@ -536,7 +557,7 @@ sub parse_configuration($) {
                                        }
                                }
 
-                               $peer{'REMOTE_SUBNETS'} = join(", ", @networks);
+                               $peer{'REMOTE_SUBNETS'} = \@networks;
                        # Endpoint
                        } elsif ($key eq "Endpoint") {
                                my $address = $val;
@@ -578,7 +599,7 @@ sub parse_configuration($) {
                }
        }
 
-       return %peer, @errormessages;
+       return \%peer, @errormessages;
 }
 
 sub get_free_port() {
index 090850fbe737b7a46d800c3b7969b3da413e2d8f..39e934047172cff902e95db810c8a620ebdfaa7b 100644 (file)
@@ -957,6 +957,7 @@ WARNING: untranslated string: cake profile pppoe-llcsnap 40 = PPPoE LLC SNAP (40
 WARNING: untranslated string: cake profile pppoe-ptm 27 = PPPoE PTM (27 bytes)
 WARNING: untranslated string: cake profile pppoe-vcmux 32 = PPPoE VC-MUX (32 bytes)
 WARNING: untranslated string: cake profile raw 0 = Raw (no overhead compensation)
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: data transfer = Data Transfer
 WARNING: untranslated string: desired = Desired
 WARNING: untranslated string: disable = Disable
@@ -1047,6 +1048,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 1c1c546f7e6892db7f217da73c99ac63e7e46557..834ffa13b8e7e621f052b19dd9cfeb11e2244b1b 100644 (file)
@@ -479,6 +479,7 @@ WARNING: untranslated string: common name = Common name
 WARNING: untranslated string: comp-lzo = LZO-Compression:
 WARNING: untranslated string: computer to modem rate = Computer to modem rate:
 WARNING: untranslated string: concentrator name = Concentrator name:
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: confirmation = confirmation
 WARNING: untranslated string: connect timeout = Connect timeout:
 WARNING: untranslated string: connected = Connected
@@ -2164,6 +2165,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index cf7237435776cf4a13396f2e68b9a56344eec190..ae41466216303489278dd0bfee7e3601e50b5e32 100644 (file)
@@ -1012,6 +1012,7 @@ WARNING: untranslated string: access point name is required = Access Point Name
 WARNING: untranslated string: allowed subnets = Allowed Subnets
 WARNING: untranslated string: bypassed = Bypassed
 WARNING: untranslated string: ca name must only contain characters and spaces = unknown string
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: cpu frequency = CPU frequency
 WARNING: untranslated string: data transfer = Data Transfer
 WARNING: untranslated string: dhcp fixed ip address in dynamic range = Fixed IP Address in dynamic range
@@ -1122,6 +1123,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 702911061d20b6184b20690f4a798b3f42973641..ad26957a665a2035ddc1339734735f481614ff54 100644 (file)
@@ -977,6 +977,7 @@ WARNING: translation string unused: zoneconf val zoneslave amount error
 WARNING: untranslated string: allowed subnets = Allowed Subnets
 WARNING: untranslated string: bypassed = Bypassed
 WARNING: untranslated string: ca name must only contain characters and spaces = unknown string
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core notice 3 = available.
 WARNING: untranslated string: data transfer = Data Transfer
 WARNING: untranslated string: done = Done
@@ -1062,6 +1063,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 3d93239afd1eb2fe58e35e24d00ec5332a046bf4..bf4b2a302d8cf37f0ab87686e6437f15c29886a0 100644 (file)
@@ -996,6 +996,7 @@ WARNING: untranslated string: cake profile pppoe-ptm 27 = PPPoE PTM (27 bytes)
 WARNING: untranslated string: cake profile pppoe-vcmux 32 = PPPoE VC-MUX (32 bytes)
 WARNING: untranslated string: cake profile raw 0 = Raw (no overhead compensation)
 WARNING: untranslated string: check all = Check all
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core update = Core-Update
 WARNING: untranslated string: cpu frequency = CPU frequency
 WARNING: untranslated string: crypto error = Cryptographic error
@@ -1408,6 +1409,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index f1090fc337f64bd6b10ec55537a4e166841a1cf4..6fcfa82bc1a20acd54a661a7e4d61e7e198e46d5 100644 (file)
@@ -998,6 +998,7 @@ WARNING: untranslated string: cake profile pppoe-vcmux 32 = PPPoE VC-MUX (32 byt
 WARNING: untranslated string: cake profile raw 0 = Raw (no overhead compensation)
 WARNING: untranslated string: capabilities = Capabilities
 WARNING: untranslated string: check all = Check all
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: cpu frequency = CPU frequency
 WARNING: untranslated string: crypto error = Cryptographic error
 WARNING: untranslated string: crypto warning = Cryptographic warning
@@ -1429,6 +1430,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 1db36fb67f0d67fdbaee3bacc4bfee837c66d021..c5346243a9096c41e3f126c8ac95ca351c92ca9d 100644 (file)
@@ -960,6 +960,7 @@ WARNING: untranslated string: ccd routes = Routing:
 WARNING: untranslated string: ccd subnet = Subnet
 WARNING: untranslated string: ccd used = Used addresses
 WARNING: untranslated string: check all = Check all
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core update = Core-Update
 WARNING: untranslated string: count = Count
 WARNING: untranslated string: countries = Countries
@@ -1671,6 +1672,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 4d29c4f951d0ed22654ff87b0313dabaffb477d4..4798572d6701bb101e608315c5dd1b60dd8b945e 100644 (file)
@@ -955,6 +955,7 @@ WARNING: untranslated string: ccd routes = Routing:
 WARNING: untranslated string: ccd subnet = Subnet
 WARNING: untranslated string: ccd used = Used addresses
 WARNING: untranslated string: check all = Check all
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core update = Core-Update
 WARNING: untranslated string: count = Count
 WARNING: untranslated string: countries = Countries
@@ -1664,6 +1665,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 2da19f276101dd87823fa684b4c7462c72691cfa..5878f55fa488082fecf2d8cab17ed711e0ad09b1 100644 (file)
@@ -981,6 +981,7 @@ WARNING: untranslated string: cake profile pppoe-llcsnap 40 = PPPoE LLC SNAP (40
 WARNING: untranslated string: cake profile pppoe-ptm 27 = PPPoE PTM (27 bytes)
 WARNING: untranslated string: cake profile pppoe-vcmux 32 = PPPoE VC-MUX (32 bytes)
 WARNING: untranslated string: cake profile raw 0 = Raw (no overhead compensation)
+WARNING: untranslated string: configuration file = Configuration File
 WARNING: untranslated string: core update = Core-Update
 WARNING: untranslated string: cpu frequency = CPU frequency
 WARNING: untranslated string: crypto error = Cryptographic error
@@ -1291,6 +1292,7 @@ WARNING: untranslated string: wg download configuration file = Download the conf
 WARNING: untranslated string: wg edit host-to-net peer = Edit Host-To-Net Peer
 WARNING: untranslated string: wg edit net-to-net peer = Edit Net-To-Net Peer
 WARNING: untranslated string: wg host to net client settings = Host-To-Net Client Settings
+WARNING: untranslated string: wg import peer = Import Peer
 WARNING: untranslated string: wg invalid client dns = Invalid client DNS address
 WARNING: untranslated string: wg invalid client pool = Invalid client pool
 WARNING: untranslated string: wg invalid endpoint address = Invalid endpoint address
index 48b98ce74d710f27ace217825216ebd6e8a1ef8f..6c96352c8ab0e250589a0fd31a438d949ebbbe0f 100644 (file)
@@ -46,6 +46,7 @@
 < Captive invalid coupon
 < Captive please enter a coupon code
 < choose media
+< configuration file
 < could not connect to www ipfire org
 < cryptographic settings
 < data transfer
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < allowed subnets
 < bypassed
 < ca name must only contain characters or spaces
+< configuration file
 < cpu frequency
 < data transfer
 < dhcp fixed ip address in dynamic range
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < bewan adsl usb
 < bypassed
 < ca name must only contain characters or spaces
+< configuration file
 < data transfer
 < done
 < endpoint
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < Captive WiFi coupon
 < Captive wrong type
 < check all
+< configuration file
 < core update
 < cpu frequency
 < crypto error
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < Captive WiFi coupon
 < Captive wrong type
 < check all
+< configuration file
 < cpu frequency
 < crypto error
 < cryptographic settings
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < ccd used
 < check all
 < community rules
+< configuration file
 < ConnSched dial
 < ConnSched hangup
 < ConnSched reboot
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < ccd used
 < check all
 < community rules
+< configuration file
 < ConnSched dial
 < ConnSched hangup
 < ConnSched reboot
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
 < cake profile raw 0
 < ca name must only contain characters or spaces
 < Captive delete logo
+< configuration file
 < core update
 < cpu frequency
 < crypto error
 < wg edit net-to-net peer
 < wg edit peer
 < wg host to net client settings
+< wg import peer
 < wg invalid client dns
 < wg invalid client pool
 < wg invalid endpoint address
index 7d7e3422fd2d7ccd48e4484c460a98d7291c122f..e8836439d0467079dd6a6f45e679b55c869c275a 100644 (file)
@@ -164,6 +164,73 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) {
                die "Unsupported type: $type";
        }
 
+} elsif ($cgiparams{"ACTION"} eq "IMPORT") {
+       my @local_subnets = ();
+       my $peer;
+
+       # Parse the configuration file
+       ($peer, @errormessages) = &Wireguard::parse_configuration($cgiparams{'NAME'}, $cgiparams{'FH'});
+
+       # Check local subnets
+       if (defined $cgiparams{'LOCAL_SUBNETS'}) {
+               @local_subnets = split(/,/, $cgiparams{'LOCAL_SUBNETS'});
+
+               foreach my $subnet (@local_subnets) {
+                       $subnet =~ s/^\s+//g;
+                       $subnet =~ s/\s+$//g;
+
+                       unless (&Network::check_subnet($subnet)) {
+                               push(@errormessages, $Lang::tr{'wg invalid local subnet'} . ": ${subnet}");
+                       }
+               }
+       } else {
+               push(@errormessages, $Lang::tr{'wg no local subnets'});
+       }
+
+       # Show any error messages
+       goto IMPORT if (@errormessages);
+
+       # Allocate a new key
+       my $key = &General::findhasharraykey(\%Wireguard::peers);
+
+       # Save the connection
+       $Wireguard::peers{$key} = [
+               # 0 = Enabled
+               "on",
+               # 1 = Type
+               "net",
+               # 2 = Name
+               $peer->{"NAME"},
+               # 3 = Remote Public Key
+               $peer->{"PUBLIC_KEY"},
+               # 4 = Local Private Key
+               $peer->{"PRIVATE_KEY"},
+               # 5 = Port
+               $peer->{"PORT"},
+               # 6 = Endpoint Address
+               $peer->{"ENDPOINT_ADDRESS"},
+               # 7 = Endpoint Port
+               $peer->{"ENDPOINT_PORT"},
+               # 8 = Remote Subnets
+               &Wireguard::encode_subnets(@{ $peer->{"REMOTE_SUBNETS"} }),
+               # 9 = Remark
+               &Wireguard::encode_remarks($cgiparams{"REMARKS"}),
+               # 10 = Local Subnets
+               &Wireguard::encode_subnets(@local_subnets),
+               # 11 = PSK
+               $peer->{"PSK"},
+               # 12 = Keepalive
+               $peer->{"KEEPALIVE"} || $Wireguard::DEFAULT_KEEPALIVE,
+       ];
+
+       # Store the configuration
+       &General::writehasharray("/var/ipfire/wireguard/peers", \%Wireguard::peers);
+
+       # Reload if enabled
+       if ($Wireguard::settings{'ENABLED'} eq "on") {
+               &General::system("/usr/local/bin/wireguardctrl", "start");
+       }
+
 } elsif ($cgiparams{"ACTION"} eq "CREATE-PEER-NET") {
        my @local_subnets = ();
        my @remote_subnets = ();
@@ -666,12 +733,7 @@ END
                goto CREATEHOST;
 
        } elsif ($cgiparams{"TYPE"} eq "import") {
-               # Parse the configuration file
-               (%cgiparams, @errormessages) = &Wireguard::parse_configuration($cgiparams{'FH'});
-
-               # We basically don't support importing RW connections, so we always
-               # need to go and show the N2N editor.
-               goto EDITNET;
+               goto IMPORT;
 
        # Ask the user what type they want
        } else {
@@ -1003,8 +1065,6 @@ ADD:
                                        <input type='radio' name='TYPE' value='import' />
                                        $Lang::tr{'import connection'}
                                </label>
-
-                               <input type='file' name='FH' />
                        </p>
 
                        <table class="form">
@@ -1022,6 +1082,87 @@ END
 
        exit(0);
 
+IMPORT:
+       # Send HTTP Headers
+       &Header::showhttpheaders();
+
+       # Open the page
+       &Header::openpage($Lang::tr{'wireguard'}, 1, '');
+
+       # Show any error messages
+       &Header::errorbox(@errormessages);
+
+       # Open a new box
+       &Header::openbox('100%', '', $Lang::tr{'wg import peer'});
+
+       print <<END;
+               <form method="POST" ENCTYPE="multipart/form-data">
+                       <input type="hidden" name="ACTION" value="IMPORT">
+
+                       <table class="form">
+                               <tr>
+                                       <td>
+                                               $Lang::tr{'name'}
+                                       </td>
+
+                                       <td>
+                                               <input type="text" name="NAME"
+                                                       value="$cgiparams{'NAME'}" required />
+                                       </td>
+                               </tr>
+
+                               <tr>
+                                       <td>
+                                               $Lang::tr{'remarks'}
+                                       </td>
+
+                                       <td>
+                                               <input type="text" name="REMARKS"
+                                                       value="$cgiparams{'REMARKS'}" />
+                                       </td>
+                               </tr>
+
+                               <tr>
+                                       <td>
+                                               $Lang::tr{'configuration file'}
+                                       </td>
+
+                                       <td>
+                                               <input type='file' name='FH' required />
+                                       </td>
+                               </tr>
+                       </table>
+
+                       <h6>$Lang::tr{'routing'}</h6>
+
+                       <table class="form">
+                               <tr>
+                                       <td>
+                                               $Lang::tr{'local subnets'}
+                                       </td>
+
+                                       <td>
+                                               <input type="text" name="LOCAL_SUBNETS"
+                                                       value="$cgiparams{'LOCAL_SUBNETS'}" required />
+                                       </td>
+                               </tr>
+                       </table>
+
+                       <table class="form">
+                               <tr class="action">
+                                       <td colspan="2">
+                                               <input type='submit' value='$Lang::tr{'import'}' />
+                                       </td>
+                               </tr>
+                       </table>
+               </form>
+END
+
+       &Header::closebox();
+       &Header::closepage();
+
+       exit(0);
+
 CREATENET:
        # Send HTTP Headers
        &Header::showhttpheaders();
index 3e647e6e53dc9937fa9aeac0403a42a16913fa05..1d4a03914782745343ba476ac3c79e06b92bd87b 100644 (file)
 'compression' => 'Compression:',
 'computer to modem rate' => 'Computer to modem rate:',
 'concentrator name' => 'Concentrator name:',
+'configuration file' => 'Configuration File',
 'confirmation' => 'confirmation',
 'connect' => 'OVPN Start / Connect',
 'connect the modem' => 'Connect the modem',
 'wg edit net-to-net peer' => 'Edit Net-To-Net Peer',
 'wg edit peer' => 'Edit Peer',
 'wg host to net client settings' => 'Host-To-Net Client Settings',
+'wg import peer' => 'Import Peer',
 'wg invalid client dns' => 'Invalid client DNS address',
 'wg invalid client pool' => 'Invalid client pool',
 'wg invalid endpoint address' => 'Invalid endpoint address',