1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 19:11:51 +00:00
openmptcprouter-feeds/luci-app-dsvpn/luasrc/model/cbi/dsvpn.lua
Ycarus (Yannick Chabanois) c25c91fd49 Update DSVPN interface
2019-09-11 17:56:48 +02:00

44 lines
1.1 KiB
Lua

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 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("Tunnel local IP"))
o.default = "10.255.251.2"
o.datatype = "host"
o = s:option(Value, "remoteip", 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