1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Create a dsvpn interface and put all VPN in VPN menu

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-09-10 18:00:56 +02:00
parent 29b42e36a1
commit 87327f9489
8 changed files with 185 additions and 5 deletions

View file

@ -0,0 +1,44 @@
local net = require "luci.model.network".init()
local sys = require "luci.sys"
local ifaces = sys.net:devices()
local m, s, o
m = Map("dsvpn", translate("DSVPN"))
s = m:section(TypedSection, "dsvpn", translate("Settings"))
s.anonymous = true
s.addremove = false
o = s:option(Flag, "enable", translate("Enable"))
o.rmempty = false
o = s:option(Value, "host", translate("Remote host"))
o.placeholder = "128.128.128.128"
o.default = "128.128.128.128"
o.datatype = "host"
o.rmempty = false
o = s:option(Value, "port", translate("Remote/Bind port"))
o.placeholder = "65011"
o.default = "65011"
o.datatype = "port"
o = s:option(Value, "key", translate("Key"))
o.password = true
o.rmempty = false
o = s:option(Value, "localip", translate("Local IP"),translate("Tunnel local IP"))
o.default = "10.255.251.2"
o.datatype = "host"
o = s:option(Value, "remoteip", translate("Remote IP"),translate("Tunnel remote IP"))
o.default = "10.255.251.1"
o.datatype = "host"
o = s:option(Value, "dev", translate("Interface name"))
o.placeholder = "tun0"
o.default = "tun0"
o.rmempty = false
return m