summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vpn-policy-routing
diff options
context:
space:
mode:
authorStan <stangri@melmac.net>2020-09-21 11:41:14 -0700
committerGitHub <noreply@github.com>2020-09-21 11:41:14 -0700
commit482e367e022bf4de8dbe866661d2220de1f2a28c (patch)
tree9d6137d760ccc85b93c91e4ddbcb28afe3a7258b /applications/luci-app-vpn-policy-routing
parent073b9ba3bdc932d28dbc49fb005e13bea494e610 (diff)
parentb0fe4bf371b21e05b03e8c4a875d80a198dd3d45 (diff)
Merge pull request #4460 from stangri/master-luci-app-vpn-policy-routing
luci-app-vpn-policy-routing: ACL-related update
Diffstat (limited to 'applications/luci-app-vpn-policy-routing')
-rw-r--r--applications/luci-app-vpn-policy-routing/Makefile2
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua24
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua18
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm6
-rw-r--r--applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot219
-rw-r--r--applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json33
6 files changed, 173 insertions, 129 deletions
diff --git a/applications/luci-app-vpn-policy-routing/Makefile b/applications/luci-app-vpn-policy-routing/Makefile
index 6daf81b5c8..64c1afa3c1 100644
--- a/applications/luci-app-vpn-policy-routing/Makefile
+++ b/applications/luci-app-vpn-policy-routing/Makefile
@@ -10,7 +10,7 @@ LUCI_TITLE:=VPN Policy-Based Routing Service Web UI
LUCI_DESCRIPTION:=Provides Web UI for vpn-policy-routing service.
LUCI_DEPENDS:=+luci-compat +luci-mod-admin-full +vpn-policy-routing
LUCI_PKGARCH:=all
-PKG_RELEASE:=73
+PKG_RELEASE:=74
include ../../luci.mk
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua
index 2daac795dd..53c0991c6d 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua
+++ b/applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua
@@ -3,25 +3,31 @@ function index()
if nixio.fs.access("/etc/config/vpn-policy-routing") then
local e = entry({"admin", "vpn"}, firstchild(), _("VPN"), 60)
e.dependent = false
-
- entry({"admin", "vpn", "vpn-policy-routing"}, cbi("vpn-policy-routing"), _("VPN Policy Routing")).acl_depends = { "luci-app-vpn-policy-routing" }
+ e.acl_depends = { "luci-app-vpn-policy-routing" }
+ entry({"admin", "vpn", "vpn-policy-routing"}, cbi("vpn-policy-routing"), _("VPN Policy Routing"))
entry({"admin", "vpn", "vpn-policy-routing", "action"}, call("vpn_policy_routing_action"), nil).leaf = true
end
end
function vpn_policy_routing_action(name)
local packageName = "vpn-policy-routing"
+ local http = require "luci.http"
+ local sys = require "luci.sys"
+ local uci = require "luci.model.uci".cursor()
+ local util = require "luci.util"
if name == "start" then
- luci.sys.init.start(packageName)
+ sys.init.start(packageName)
elseif name == "action" then
- luci.util.exec("/etc/init.d/" .. packageName .. " restart >/dev/null 2>&1")
+ util.exec("/etc/init.d/" .. packageName .. " restart >/dev/null 2>&1")
elseif name == "stop" then
- luci.sys.init.stop(packageName)
+ sys.init.stop(packageName)
elseif name == "enable" then
- luci.util.exec("uci set " .. packageName .. ".config.enabled=1; uci commit " .. packageName)
+ uci:set(packageName, "config", "enabled", "1")
+ uci:commit(packageName)
elseif name == "disable" then
- luci.util.exec("uci set " .. packageName .. ".config.enabled=0; uci commit " .. packageName)
+ uci:set(packageName, "config", "enabled", "0")
+ uci:commit(packageName)
end
- luci.http.prepare_content("text/plain")
- luci.http.write("0")
+ http.prepare_content("text/plain")
+ http.write("0")
end
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
index 692c771a43..61c16b1efb 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
+++ b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
@@ -13,6 +13,20 @@ local dispatcher = require "luci.dispatcher"
local enabledFlag = uci:get(packageName, "config", "enabled")
local enc
+function getPackageVersion()
+ local opkgFile = "/usr/lib/opkg/status"
+ local line
+ local flag = false
+ for line in io.lines(opkgFile) do
+ if flag then
+ return line:match('[%d%.$-]+') or ""
+ elseif line:find("Package: " .. packageName:gsub("%-", "%%%-")) then
+ flag = true
+ end
+ end
+ return ""
+end
+
local ubusStatus = util.ubus("service", "list", { name = packageName })
if ubusStatus and ubusStatus[packageName] and
ubusStatus[packageName]["instances"] and
@@ -33,7 +47,7 @@ if ubusStatus and ubusStatus[packageName] and
end
local serviceRunning, statusText = false, nil
-local packageVersion = tostring(util.trim(sys.exec("opkg list-installed " .. packageName .. " | awk '{print $3}'"))) or ""
+local packageVersion = getPackageVersion()
if packageVersion == "" then
statusText = translatef("%s is not installed or not found", packageName)
end
@@ -78,7 +92,7 @@ if (type(lanIPAddr) == "table") then
break
end
lanIPAddr = lanIPAddr:match("[0-9.]+")
-end
+end
if lanIPAddr and lanNetmask then
laPlaceholder = ip.new(lanIPAddr .. "/" .. lanNetmask )
end
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
index 710587ad82..4f77906982 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
+++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm
@@ -1,5 +1,5 @@
<%#
-Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
+Copyright 2017-2020 Stan Grishin (stangri@melmac.net)
This is free software, licensed under the Apache License, Version 2.0
-%>
@@ -11,8 +11,8 @@ This is free software, licensed under the Apache License, Version 2.0
</textarea>
<div>
-<%- local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md" -%>
-<%=translatef("Checkmark represents the default gateway. See the %sREADME%s for details.", "<a href=\"" .. readmeURL .. "#a-word-about-default-routing" .. "\" target=\"_blank\">", "</a>")%>
+ <%- local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md" -%>
+ <%=translatef("The %s represents the default gateway. See the %sREADME%s for details.", "<strong>✓</strong>", "<a href=\"" .. readmeURL .. "#a-word-about-default-routing" .. "\" target=\"_blank\">", "</a>")%>
</div>
<%+cbi/valuefooter%> \ No newline at end of file
diff --git a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot
index 59ad6a9584..bb4d3820d7 100644
--- a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot
+++ b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot
@@ -1,83 +1,78 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:49
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:63
msgid "%s (disabled)"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:44
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:58
msgid "%s (strict mode)"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:38
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:52
msgid "%s is not installed or not found"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:183
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:197
msgid ""
"%sWARNING:%s Please make sure to check the %sREADME%s before changing "
"anything in this section! Change any of the settings below with extreme "
"caution!%s"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:200
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
msgid ""
"Add an ip rule, not an iptables entry for policies with just the local "
"address. Use with caution to manipulte policies priorities."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:182
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:196
msgid "Advanced Configuration"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:185
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:199
msgid ""
"Allows to specify the list of interface names (in lower case) to be "
"explicitly supported by the service. Can be useful if your OpenVPN tunnels "
"have dev option other than tun* or tap*."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:188
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:202
msgid ""
"Allows to specify the list of interface names (in lower case) to be ignored "
"by the service. Can be useful if running both VPN server and VPN client on "
"the router."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:196
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:210
msgid "Append"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
msgid "Append local IP Tables rules"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:216
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:230
msgid "Append remote IP Tables rules"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:150
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:164
msgid "Basic Configuration"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:205
msgid "Boot Time-out"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:324
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:338
msgid "Chain"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm:15
-msgid ""
-"Checkmark represents the default gateway. See the %sREADME%s for details."
-msgstr ""
-
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:275
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:289
msgid "Comment"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:272
msgid ""
"Comment, interface and at least one other field are required. Multiple local "
"and remote addresses/devices/domains and ports can be space separated. "
@@ -85,31 +80,31 @@ msgid ""
"fields are left blank."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:154
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:168
msgid "Condensed output"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:145
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:159
msgid "Configuration"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:152
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
msgid "Controls both system log and console output verbosity."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:358
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:372
msgid "Custom User File Includes"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:351
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:365
msgid "DSCP Tag"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:346
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:360
msgid "DSCP Tagging"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:204
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:218
msgid "Default ICMP Interface"
msgstr ""
@@ -117,22 +112,22 @@ msgstr ""
msgid "Disable"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:174
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:178
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:201
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:241
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:252
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:180
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:188
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:192
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:215
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:251
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:255
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:262
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:266
msgid "Disabled"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258
msgid "Display these protocols in protocol column in Web UI."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:160
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:174
msgid "Do not enforce policies when their gateway is down"
msgstr ""
@@ -140,52 +135,52 @@ msgstr ""
msgid "Enable"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:179
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:202
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:242
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:249
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:253
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:269
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:365
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:193
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:216
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:252
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:256
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:263
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:267
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:283
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:379
msgid "Enabled"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:229
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:243
msgid ""
"FW Mask used by the service. High mask is used to avoid conflict with SQM/"
"QoS. Change with caution together with"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:204
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:218
msgid "Force the ICMP protocol interface."
msgstr ""
#: applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json:3
-msgid "Grant UCI access for luci-app-vpn-policy-routing"
+msgid "Grant UCI and file access for luci-app-vpn-policy-routing"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:200
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
msgid "IP Rules Support"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:195
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
msgid "IPTables rule option"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:177
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
msgid "IPv6 Support"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:188
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:202
msgid "Ignored Interfaces"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:197
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:211
msgid "Insert"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:333
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:347
msgid "Interface"
msgstr ""
@@ -193,48 +188,48 @@ msgstr ""
msgid "Loading"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:280
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:294
msgid "Local addresses / devices"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:287
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:301
msgid "Local ports"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:277
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:291
msgid "Name"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:205
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
msgid "No Change"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:152
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:166
msgid "Output verbosity"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:368
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:382
msgid "Path"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:165
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:173
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:179
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:187
msgid "Please check the %sREADME%s before changing this option."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:272
msgid "Policies"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:304
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:318
msgid "Protocol"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:292
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:306
msgid "Remote addresses / domains"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:297
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:311
msgid "Remote ports"
msgstr ""
@@ -242,101 +237,101 @@ msgstr ""
msgid "Restart"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:359
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:373
msgid ""
"Run the following user files after setting up but before restarting DNSMASQ. "
"See the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:42
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:56
msgid "Running"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:159
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:173
msgid "See the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:195
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
msgid "Select Append for -A and Insert for -I."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:130
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:144
msgid "Service Errors"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:224
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:229
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:243
msgid "Service FW Mask"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:125
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:139
msgid "Service Gateways"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:121
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:135
msgid "Service Status"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:120
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:134
msgid "Service Status [%s %s]"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:135
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:149
msgid "Service Warnings"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:347
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:361
msgid ""
"Set DSCP tags (in range between 1 and 63) for specific interfaces. See the "
"%sREADME%s for details."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:247
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:261
msgid "Show Chain Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:236
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
msgid "Show Enable Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:240
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:254
msgid "Show Protocol Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:251
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
msgid "Show Up/Down Buttons"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:251
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
msgid ""
"Shows the Up/Down buttons for policies, allowing you to move a policy up or "
"down in the list."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:247
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:261
msgid ""
"Shows the chain column for policies, allowing you to assign a PREROUTING, "
"FORWARD, INPUT or OUTPUT chain to a policy."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:236
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
msgid ""
"Shows the enable checkbox column for policies, allowing you to quickly "
"enable/disable specific policy without deleting it."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:240
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:254
msgid ""
"Shows the protocol column for policies, allowing you to assign a specific "
"protocol to a policy."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
msgid ""
"Special instructions to append iptables rules for local IPs/netmasks/devices."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:216
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:230
msgid "Special instructions to append iptables rules for remote IPs/netmasks."
msgstr ""
@@ -344,13 +339,13 @@ msgstr ""
msgid "Start"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:224
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
msgid ""
"Starting (WAN) FW Mark for marks used by the service. High starting mark is "
"used to avoid conflict with SQM/QoS. Change with caution together with"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
msgid "Starting (WAN) Table ID number for tables created by the service."
msgstr ""
@@ -358,49 +353,53 @@ msgstr ""
msgid "Stop"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:47
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:61
msgid "Stopped"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:158
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:172
msgid "Strict enforcement"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:161
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:175
msgid "Strictly enforce policies when their gateway is down"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:185
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:199
msgid "Supported Interfaces"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:258
msgid "Supported Protocols"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:153
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:167
msgid "Suppress/No output"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:172
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm:15
+msgid "The %s represents the default gateway. See the %sREADME%s for details."
+msgstr ""
+
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:186
msgid "The ipset option for local policies"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:164
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:178
msgid "The ipset option for remote policies"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:205
msgid ""
"Time (in seconds) for service to wait for WAN gateway discovery on boot."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:168
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:182
msgid "Use DNSMASQ ipset"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:167
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:175
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:181
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:189
msgid "Use ipset command"
msgstr ""
@@ -412,27 +411,27 @@ msgstr ""
msgid "VPN Policy Routing"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:118
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:132
msgid "VPN and WAN Policy-Based Routing"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:155
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:169
msgid "Verbose output"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:206
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:220
msgid "WAN"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:224
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:229
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:238
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:243
msgid "WAN Table FW Mark"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:219
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
msgid "WAN Table ID"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:234
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
msgid "Web UI Configuration"
msgstr ""
diff --git a/applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json b/applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json
index 64e73de9cc..5cdb67f77d 100644
--- a/applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json
+++ b/applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json
@@ -1,11 +1,36 @@
{
"luci-app-vpn-policy-routing": {
- "description": "Grant UCI access for luci-app-vpn-policy-routing",
+ "description": "Grant UCI and file access for luci-app-vpn-policy-routing",
"read": {
- "uci": [ "vpn-policy-routing" ]
+ "cgi-io": [
+ "exec"
+ ],
+ "file": {
+ "/usr/lib/opkg/status": [
+ "read"
+ ],
+ "/etc/init.d/vpn-policy-routing *": [
+ "exec"
+ ],
+ "/usr/bin/grep *": [
+ "exec"
+ ],
+ "/usr/sbin/grep *": [
+ "exec"
+ ],
+ "/usr/sbin/iptables *": [
+ "exec"
+ ]
+ },
+ "uci": [
+ "network",
+ "vpn-policy-routing"
+ ]
},
"write": {
- "uci": [ "vpn-policy-routing" ]
+ "uci": [
+ "vpn-policy-routing"
+ ]
}
}
-}
+} \ No newline at end of file