net/wireguard: add MTU option (#1332)

This commit is contained in:
Michael
2019-05-10 18:46:49 +02:00
committed by Franco Fichtner
parent e71c9c3ff8
commit ef04eb8f45
4 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= wireguard
PLUGIN_VERSION= 0.10
PLUGIN_VERSION= 0.11
PLUGIN_COMMENT= WireGuard VPN service
PLUGIN_DEPENDS= wireguard
PLUGIN_MAINTAINER= m.muenz@gmail.com
@@ -35,6 +35,13 @@
<type>text</type>
<help>Set port for this instance to listen on.</help>
</field>
<field>
<id>server.mtu</id>
<label>MTU</label>
<type>text</type>
<advanced>true</advanced>
<help>Set the interface MTU for this interface. Leaving empty uses the MTU from main interface which is fine for most setups.</help>
</field>
<field>
<id>server.dns</id>
<label>DNS Server</label>
@@ -31,6 +31,11 @@
<default>51820</default>
<Required>Y</Required>
</port>
<mtu type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>9300</MaximumValue>
<Required>N</Required>
</mtu>
<dns type="CSVListField">
<Required>N</Required>
<mask>/^([a-fA-F0-9\.:\[\]]*?,)*([a-fA-F0-9\.:\[\]]*)$/</mask>
@@ -9,6 +9,9 @@ Address = {{ server_list.tunneladdress }}
{% if server_list.dns|default('') != '' %}
DNS = {{ server_list.dns }}
{% endif %}
{% if server_list.mtu|default('') != '' %}
MTU = {{ server_list.mtu }}
{% endif %}
ListenPort = {{ server_list.port }}
PrivateKey = {{ server_list.privkey }}
{% if server_list.disableroutes == '1' %}