6ed52ddba518662c2df0429c48a08f8c493fe44d
[project/luci.git] / applications / luci-app-vpnbypass / luasrc / model / cbi / vpnbypass.lua
1 m = Map("vpnbypass", translate("VPN Bypass Settings"))
2 s = m:section(NamedSection, "config", "vpnbypass")
3
4 -- General options
5 o1 = s:option(Flag, "enabled", translate("Enable VPN Bypass"))
6 o1.rmempty = false
7 o1.default = 0
8
9 -- Local Ports
10 p1 = s:option(DynamicList, "localport", translate("Local Ports to Bypass"), translate("Local ports to trigger VPN Bypass"))
11 p1.addremove = true
12 p1.optional = true
13
14 -- Remote Ports
15 p2 = s:option(DynamicList, "remoteport", translate("Remote Ports to Bypass"), translate("Remote ports to trigger VPN Bypass"))
16 p2.addremove = true
17 p2.optional = true
18
19 -- Local Subnets
20 r1 = s:option(DynamicList, "localsubnet", translate("Local IP Subnets to Bypass"), translate("Local IP ranges with direct internet access (outside of the VPN tunnel)"))
21 r1.addremove = true
22 r1.optional = true
23
24 -- Remote Subnets
25 r2 = s:option(DynamicList, "remotesubnet", translate("Remote IP Subnets to Bypass"), translate("Remote IP ranges which will be accessed directly (outside of the VPN tunnel)"))
26 r2.addremove = true
27 r2.optional = true
28
29 -- Domains
30 d = Map("dhcp")
31 s4 = d:section(TypedSection, "dnsmasq")
32 s4.anonymous = true
33 di = s4:option(DynamicList, "ipset", translate("Domains to Bypass"),
34     translate("Domains to be accessed directly (outside of the VPN tunnel), see ")
35     .. [[<a href="https://github.com/openwrt/packages/tree/master/net/vpnbypass/files#bypass-domains-formatsyntax" target="_blank">]]
36     .. translate("README") .. [[</a>]] .. translate(" for syntax"))
37
38 return m, d