mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/wireguard: add psk to peers (#880)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= wireguard
|
||||
PLUGIN_VERSION= 0.5
|
||||
PLUGIN_VERSION= 0.6
|
||||
PLUGIN_COMMENT= WireGuard VPN service
|
||||
PLUGIN_DEPENDS= wireguard
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
+6
@@ -17,6 +17,12 @@
|
||||
<type>text</type>
|
||||
<help>Public key of this instance.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>client.psk</id>
|
||||
<label>Shared Secret</label>
|
||||
<type>text</type>
|
||||
<help>Shared secret (PSK) for this peer.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>client.tunneladdress</id>
|
||||
<label>Tunnel Address</label>
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
<pubkey type="TextField">
|
||||
<Required>N</Required>
|
||||
</pubkey>
|
||||
<psk type="TextField">
|
||||
<Required>N</Required>
|
||||
<mask>/^[a-z0-9\+\=\/]{44}$/i</mask>
|
||||
<ValidationMessage>Optional base64 string of 44 characters and ending with = like a public key. Allowed characters are 0-9a-zA-Z+/=</ValidationMessage>
|
||||
</psk>
|
||||
<tunneladdress type="NetworkField">
|
||||
<default></default>
|
||||
<FieldSeparator>,</FieldSeparator>
|
||||
|
||||
@@ -20,6 +20,9 @@ Table = off
|
||||
{% if peerlist2_data != {} and peerlist2_data.enabled == '1' %}
|
||||
[Peer]
|
||||
PublicKey = {{ peerlist2_data.pubkey }}
|
||||
{% if peerlist2_data.psk|default('') != '' %}
|
||||
PresharedKey = {{ peerlist2_data.psk }}
|
||||
{% endif %}
|
||||
AllowedIPs = {{ peerlist2_data.tunneladdress }}
|
||||
{% if peerlist2_data.serveraddress|default('') != '' %}
|
||||
Endpoint = {{ peerlist2_data.serveraddress }}:{{ peerlist2_data.serverport }}
|
||||
|
||||
Reference in New Issue
Block a user