mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/wireguard: 0.3
This commit is contained in:
parent
3ff493ec12
commit
e2fc6abe17
5 changed files with 8 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= wireguard
|
||||
PLUGIN_VERSION= 0.2
|
||||
PLUGIN_VERSION= 0.3
|
||||
PLUGIN_COMMENT= WireGuard VPN service
|
||||
PLUGIN_DEPENDS= wireguard
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ wireguard_start()
|
|||
echo "starting wireguard"
|
||||
for STARTER in ${wireguard_config}; do
|
||||
$command up $STARTER
|
||||
ifconfig $STARTER group wireguard
|
||||
ifconfig $STARTER group wg
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class ServerController extends ApiMutableModelControllerBase
|
|||
$node = $this->getModel()->servers->server->Add();
|
||||
}
|
||||
$node->setNodes($this->request->getPost("server"));
|
||||
if (empty((string)$node->pubkey) || empty((string)$node->privkey)) {
|
||||
if (empty((string)$node->pubkey) && empty((string)$node->privkey)) {
|
||||
// generate new keypair
|
||||
$backend = new Backend();
|
||||
$keyspriv = $backend->configdpRun("wireguard genkey", 'private');
|
||||
|
|
@ -80,7 +80,7 @@ class ServerController extends ApiMutableModelControllerBase
|
|||
$node = $this->getModel()->servers->server->Add();
|
||||
}
|
||||
$node->setNodes($this->request->getPost("server"));
|
||||
if (empty((string)$node->pubkey) || empty((string)$node->privkey)) {
|
||||
if (empty((string)$node->pubkey) && empty((string)$node->privkey)) {
|
||||
// generate new keypair
|
||||
$backend = new Backend();
|
||||
$keyspriv = $backend->configdpRun("wireguard genkey", 'private');
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
<field>
|
||||
<id>server.pubkey</id>
|
||||
<label>Public Key</label>
|
||||
<type>info</type>
|
||||
<type>text</type>
|
||||
<help>Public key of this instance. After saving you will see here your public key.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>server.privkey</id>
|
||||
<label>Private Key</label>
|
||||
<type>info</type>
|
||||
<type>text</type>
|
||||
<help>Private key of this instance. After saving you will see here your public key, please keep it safe.</help>
|
||||
</field>
|
||||
<field>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<model>
|
||||
<mount>//OPNsense/wireguard/client</mount>
|
||||
<description>Wireguard Client configuration</description>
|
||||
<version>0.0.2</version>
|
||||
<version>0.0.3</version>
|
||||
<items>
|
||||
<clients>
|
||||
<client type="ArrayField">
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<Required>Y</Required>
|
||||
<asList>Y</asList>
|
||||
</tunneladdress>
|
||||
<serveraddress type="NetworkField">
|
||||
<serveraddress type="HostnameField">
|
||||
<Required>N</Required>
|
||||
</serveraddress>
|
||||
<serverport type="PortField">
|
||||
|
|
|
|||
Loading…
Reference in a new issue