mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/wireguard: add similar to "don't pull routes" in OpenVPN (#860)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= wireguard
|
||||
PLUGIN_VERSION= 0.4
|
||||
PLUGIN_VERSION= 0.5
|
||||
PLUGIN_COMMENT= WireGuard VPN service
|
||||
PLUGIN_DEPENDS= wireguard
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
||||
+6
@@ -37,4 +37,10 @@
|
||||
<type>text</type>
|
||||
<help>Set port the endpoint listens to.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>client.disableroutes</id>
|
||||
<label>Disable Routes</label>
|
||||
<type>checkbox</type>
|
||||
<help>This will prevent installing routes. Usually you only enable this to do own routing decisions via a local gateway and gateway rules.</help>
|
||||
</field>
|
||||
</form>
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
<serverport type="PortField">
|
||||
<Required>N</Required>
|
||||
</serverport>
|
||||
<disableroutes type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</disableroutes>
|
||||
</client>
|
||||
</clients>
|
||||
</items>
|
||||
|
||||
@@ -14,6 +14,9 @@ ListenPort = {{ server_list.port }}
|
||||
{% for peerlist in server_list.peers.split(",") %}
|
||||
{% set peerlist2_data = helpers.getUUID(peerlist) %}
|
||||
{% if peerlist2_data != {} and peerlist2_data.enabled == '1' %}
|
||||
{% if peerlist2_data != {} and peerlist2_data.disableroutes == '1' %}
|
||||
Table = off
|
||||
{% endif %}
|
||||
PrivateKey = {{ server_list.privkey }}
|
||||
[Peer]
|
||||
PublicKey = {{ peerlist2_data.pubkey }}
|
||||
|
||||
Reference in New Issue
Block a user