var o = s.taboption(tab, multiple ? this.CBIDynamicMultiValueList : form.Value, name, label, description);
o.modalonly = true;
- o.datatype = 'list(neg(ipmask))';
+ o.datatype = 'list(neg(ipmask("true")))';
o.placeholder = multiple ? _('-- add IP --') : _('any');
if (family != null) {
o = fwtool.addIPOption(s, 'advanced', 'src_ip', _('Source IP address'),
_('Only match incoming traffic from this IP or range.'), 'ipv4', hosts);
o.rmempty = true;
- o.datatype = 'neg(ipmask4)';
+ o.datatype = 'neg(ipmask4("true"))';
o = s.taboption('advanced', form.Value, 'src_port', _('Source port'),
_('Only match incoming traffic originating from the given source port or port range on the client host'));
o = fwtool.addLocalIPOption(s, 'advanced', 'src_dip', _('External IP address'),
_('Only match incoming traffic directed at the given IP address.'), devs);
- o.datatype = 'neg(ipmask4)';
+ o.datatype = 'neg(ipmask4("true"))';
o.rmempty = true;
o = s.taboption('general', form.Value, 'src_dport', _('External port'),
o = fwtool.addIPOption(s, 'general', 'src_ip', _('Source address'),
_('Match forwarded traffic from this IP or range.'), 'ipv4', hosts);
o.rmempty = true;
- o.datatype = 'neg(ipmask4)';
+ o.datatype = 'neg(ipmask4("true"))';
o = s.taboption('general', form.Value, 'src_port', _('Source port'),
_('Match forwarded traffic originating from the given source port or port range.'));
o = fwtool.addIPOption(s, 'general', 'dest_ip', _('Destination address'),
_('Match forwarded traffic directed at the given IP address.'), 'ipv4', hosts);
o.rmempty = true;
- o.datatype = 'neg(ipmask4)';
+ o.datatype = 'neg(ipmask4("true"))';
o = s.taboption('general', form.Value, 'dest_port', _('Destination port'),
_('Match forwarded traffic directed at the given destination port or port range.'));
};
o.write = function(section_id, formvalue) {
var name = uci.get('firewall', section_id, 'name'),
- cfgvalue = this.cfgvalue(section_id);
+ cfgvalue = this.cfgvalue(section_id),
+ oldNetworks = L.toArray(cfgvalue),
+ newNetworks = L.toArray(formvalue);
- if (typeof(cfgvalue) == 'string' && Array.isArray(formvalue) && (cfgvalue == formvalue.join(' ')))
+ oldNetworks.sort();
+ newNetworks.sort();
+
+ if (oldNetworks.join(' ') == newNetworks.join(' '))
return;
var tasks = [ firewall.getZone(name) ];
if (Array.isArray(formvalue))
- for (var i = 0; i < formvalue.length; i++) {
- var netname = formvalue[i];
- tasks.push(network.getNetwork(netname).then(function(net) {
+ for (var i = 0; i < newNetworks.length; i++) {
+ var netname = newNetworks[i];
+ tasks.push(network.getNetwork(netname).then(L.bind(function(netname, net) {
return net || network.addNetwork(netname, { 'proto': 'none' });
- }));
+ }, this, netname)));
}
return Promise.all(tasks).then(function(zone_networks) {
o.multiple = true;
o = s.taboption('advanced', form.DynamicList, 'subnet', _('Covered subnets'), _('Use this option to classify zone traffic by source or destination subnet instead of networks or devices.'));
- o.datatype = 'neg(cidr)';
+ o.datatype = 'neg(cidr("true"))';
o.modalonly = true;
o.multiple = true;
o.depends('auto_helper', '0');
o.modalonly = true;
for (var i = 0; i < ctHelpers.length; i++)
- o.value(ctHelpers[i].name, '<span class="hide-close">%s (%s)</span><span class="hide-open">%s</span>'.format(ctHelpers[i].description, ctHelpers[i].name.toUpperCase(), ctHelpers[i].name.toUpperCase()));
+ o.value(ctHelpers[i].name, E('<span><span class="hide-close">%s (%s)</span><span class="hide-open">%s</span></span>'.format(ctHelpers[i].description, ctHelpers[i].name.toUpperCase(), ctHelpers[i].name.toUpperCase())));
o = s.taboption('advanced', form.Flag, 'log', _('Enable logging on this zone'));
o.modalonly = true;
end
la = la or "127.0.0.1"
lp = lp or n + 5053
- packageStatus = packageStatus .. translatef("Running: %s DoH at %s:%s", getProviderName(url), la, lp) .. "\n"
+ packageStatus = packageStatus .. translatef("%s DoH at %s:%s", getProviderName(url), la, lp) .. "\n"
else
break
end
h = m:section(TypedSection, "_dummy", translatef("Service Status [%s %s]", packageName, packageVersion))
h.template = "cbi/nullsection"
ss = h:option(DummyValue, "_dummy", translate("Service Status"))
-if packageStatusCode == -1 then
- ss.template = packageName .. "/status"
- ss.value = packageStatus
-else
- if packageStatusCode == 0 then
- ss.template = packageName .. "/status"
- else
- ss.template = packageName .. "/status-textarea"
- end
- ss.value = packageStatus
- buttons = h:option(DummyValue, "_dummy")
+ss.template = packageName .. "/status"
+ss.value = packageStatus
+if packageStatusCode ~= -1 then
+ buttons = h:option(DummyValue, "_dummy", translate("Service Control"))
buttons.template = packageName .. "/buttons"
end
end
-%>
-<div class="cbi-value"><label class="cbi-value-title">Service Control</label>
+<%+cbi/valueheader%>
<div class="cbi-value-field">
<input type="button" class="btn cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>"
onclick="button_action(this)" />
onclick="button_action(this)" />
<span id="btn_disable_spinner" class="btn_spinner"></span>
</div>
-</div>
+<%+cbi/valuefooter%>
<%-if not btn_start_status then%>
<script type="text/javascript">document.getElementById("btn_start").disabled = true;</script>
<%+cbi/valueheader%>
-<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
<%+cbi/valuefooter%>
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:91
+msgid "%s DoH at %s:%s"
+msgstr ""
+
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:72
msgid "%s is not installed or not found"
msgstr ""
msgid "Cloudflare (Security Protection)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:124
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:117
msgid "Configuration"
msgstr ""
msgid "DNSPod.cn Public DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:191
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:184
msgid "DSCP Codepoint"
msgstr ""
msgid "Disable"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:132
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:125
msgid "Do not update configs"
msgstr ""
msgid "For more information on different options check"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:134
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
msgid "Force Router DNS"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:136
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:129
msgid "Force Router DNS server to all local devices"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:134
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:127
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
msgstr ""
msgid "Google"
msgstr ""
+#: applications/luci-app-https-dns-proxy/root/usr/share/rpcd/acl.d/luci-app-https-dns-proxy.json:3
+msgid "Grant UCI and file access for luci-app-https-dns-proxy"
+msgstr ""
+
#: applications/luci-app-https-dns-proxy/luasrc/https-dns-proxy/providers/net.idnet.doh.lua:3
msgid "IDNet.net (UK)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:125
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:118
msgid ""
"If update option is selected, the 'DNS forwardings' section of %sDHCP and DNS"
"%s will be automatically updated to use selected DoH providers (%smore "
"information%s)."
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:140
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:133
msgid "Instances"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:135
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:128
msgid "Let local devices use their own DNS servers if set"
msgstr ""
msgid "LibreDNS (No Ads)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:174
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:167
msgid "Listen Address"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:187
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:180
msgid "Listen Port"
msgstr ""
msgid "OpenDNS (Family Shield)"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:195
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:188
msgid "Proxy Server"
msgstr ""
msgid "Reload"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:147
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:140
msgid "Resolver"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:91
-msgid "Running: %s DoH at %s:%s"
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:113
+msgid "Service Control"
msgstr ""
#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:109
msgid "Unknown Provider"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:129
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:122
msgid "Update %s config"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:125
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:118
msgid "Update DNSMASQ Config on Start/Stop"
msgstr ""
-#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:126
+#: applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua:119
msgid "Update all configs"
msgstr ""
ss = h:option(DummyValue, "_dummy", translate("Service Status"))
ss.template = "simple-adblock/status"
if tmpfsStatus == "statusSuccess" then
- ss.value = translatef("%s is blocking %s domains (with %s).", packageVersion, getFileLines(outputFile), targetDNS)
+ ss.value = translatef("Blocking %s domains (with %s).", getFileLines(outputFile), targetDNS)
else
ss.value = statusTable[tmpfsStatus]
end
end
if tmpfsError then
es = h:option(DummyValue, "_dummy", translate("Collected Errors"))
- es.template = "simple-adblock/error"
+ es.template = "simple-adblock/status"
es.value = ""
local err, e, url
for err in tmpfsError:gmatch("[%p%w]+") do
end
end
if packageVersion ~= "" then
- buttons = h:option(DummyValue, "_dummy")
+ buttons = h:option(DummyValue, "_dummy", translate("Service Control"))
buttons.template = packageName .. "/buttons"
end
end
end
-%>
-<div class="cbi-value"><label class="cbi-value-title">Service Control</label>
+<%+cbi/valueheader%>
<div class="cbi-value-field">
<input type="button" class="btn cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>"
onclick="button_action(this)" />
onclick="button_action(this)" />
<span id="btn_disable_spinner" class="btn_spinner"></span>
</div>
-</div>
+<%+cbi/valuefooter%>
<%-if not btn_start_status then%>
<script type="text/javascript">document.getElementById("btn_start").disabled = true;</script>
<%+cbi/valueheader%>
-<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
<%+cbi/valuefooter%>
msgid "%s Error: %s %s"
msgstr ""
-#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:198
-msgid "%s is blocking %s domains (with %s)."
-msgstr ""
-
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:129
msgid "%s is not installed or not found"
msgstr ""
msgid "Blocked Hosts URLs"
msgstr ""
+#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:198
+msgid "Blocking %s domains (with %s)."
+msgstr ""
+
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:188
msgid "Cache file containing %s domains found."
msgstr ""
msgid "Forces Router DNS use on local devices, also known as DNS Hijacking."
msgstr ""
+#: applications/luci-app-simple-adblock/root/usr/share/rpcd/acl.d/luci-app-simple-adblock.json:3
+msgid "Grant UCI and file access for luci-app-simple-adblock"
+msgstr ""
+
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:293
msgid "IPv6 Support"
msgstr ""
msgid "Run service after set delay on boot."
msgstr ""
+#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:223
+msgid "Service Control"
+msgstr ""
+
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:172
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:182
#: applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua:195
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:=74
include ../../luci.mk
-local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md"
-
local packageName = "vpn-policy-routing"
+local readmeURL = "https://docs.openwrt.melmac.net/" .. packageName .. "/"
local uci = require "luci.model.uci".cursor()
local sys = require "luci.sys"
local util = require "luci.util"
end
if serviceErrors and serviceErrors ~= "" then
errors = h:option(DummyValue, "_dummy", translate("Service Errors"))
- errors.template = packageName .. "/status-textarea"
+ errors.template = packageName .. "/status"
errors.value = serviceErrors
end
if serviceWarnings and serviceWarnings ~= "" then
warnings = h:option(DummyValue, "_dummy", translate("Service Warnings"))
- warnings.template = packageName .. "/status-textarea"
+ warnings.template = packageName .. "/status"
warnings.value = serviceWarnings
end
if packageVersion ~= "" then
- buttons = h:option(DummyValue, "_dummy")
+ buttons = h:option(DummyValue, "_dummy", translate("Service Control"))
buttons.template = packageName .. "/buttons"
end
se:value("1", translate("Strictly enforce policies when their gateway is down"))
se.default = 1
-dest_ipset = config:taboption("basic", ListValue, "dest_ipset", translate("The ipset option for remote policies"),
- translatef("Please check the %sREADME%s before changing this option.", "<a href=\"" .. readmeURL .. "#service-configuration-settings" .. "\" target=\"_blank\">", "</a>"))
-dest_ipset:value("", translate("Disabled"))
-dest_ipset:value("ipset", translate("Use ipset command"))
-dest_ipset:value("dnsmasq.ipset", translate("Use DNSMASQ ipset"))
-dest_ipset.default = ""
-dest_ipset.rmempty = true
-
-src_ipset = config:taboption("basic", ListValue, "src_ipset", translate("The ipset option for local policies"),
+resolver_ipset = config:taboption("basic", ListValue, "resolver_ipset", translate("Use resolver's ipset for domains"),
translatef("Please check the %sREADME%s before changing this option.", "<a href=\"" .. readmeURL .. "#service-configuration-settings" .. "\" target=\"_blank\">", "</a>"))
-src_ipset:value("0", translate("Disabled"))
-src_ipset:value("1", translate("Use ipset command"))
+resolver_ipset:value("none", translate("Disabled"))
+resolver_ipset:value("dnsmasq.ipset", translate("DNSMASQ ipset"))
+resolver_ipset.default = "dnsmasq.ipset"
ipv6 = config:taboption("basic", ListValue, "ipv6_enabled", translate("IPv6 Support"))
ipv6:value("0", translate("Disabled"))
timeout.optional = false
timeout.rmempty = true
+dest_ipset = config:taboption("advanced", ListValue, "dest_ipset", translate("The ipset option for remote policies"),
+ translatef("Please check the %sREADME%s before changing this option.", "<a href=\"" .. readmeURL .. "#service-configuration-settings" .. "\" target=\"_blank\">", "</a>"))
+dest_ipset:value("0", translate("Disabled"))
+dest_ipset:value("1", translate("Use ipset command"))
+dest_ipset.default = "0"
+
+src_ipset = config:taboption("advanced", ListValue, "src_ipset", translate("The ipset option for local policies"),
+ translatef("Please check the %sREADME%s before changing this option.", "<a href=\"" .. readmeURL .. "#service-configuration-settings" .. "\" target=\"_blank\">", "</a>"))
+src_ipset:value("0", translate("Disabled"))
+src_ipset:value("1", translate("Use ipset command"))
+src_ipset.default = "0"
+
insert = config:taboption("advanced", ListValue, "iptables_rule_option", translate("IPTables rule option"), translate("Select Append for -A and Insert for -I."))
insert:value("append", translate("Append"))
insert:value("insert", translate("Insert"))
insert.default = "append"
-iprule = config:taboption("advanced", ListValue, "iprule_enabled", translate("IP Rules Support"), translate("Add an ip rule, not an iptables entry for policies with just the local address. Use with caution to manipulte policies priorities."))
-iprule:value("0", translate("Disabled"))
-iprule:value("1", translate("Enabled"))
-
icmp = config:taboption("advanced", ListValue, "icmp_interface", translate("Default ICMP Interface"), translate("Force the ICMP protocol interface."))
icmp:value("", translate("No Change"))
icmp:value("wan", translate("WAN"))
end)
icmp.rmempty = true
-append_local = config:taboption("advanced", Value, "append_src_rules", translate("Append local IP Tables rules"), translate("Special instructions to append iptables rules for local IPs/netmasks/devices."))
-append_local.rmempty = true
-
-append_remote = config:taboption("advanced", Value, "append_dest_rules", translate("Append remote IP Tables rules"), translate("Special instructions to append iptables rules for remote IPs/netmasks."))
-append_remote.rmempty = true
-
wantid = config:taboption("advanced", Value, "wan_tid", translate("WAN Table ID"), translate("Starting (WAN) Table ID number for tables created by the service."))
wantid.rmempty = true
wantid.placeholder = "201"
webui_chain_column:value("0", translate("Disabled"))
webui_chain_column:value("1", translate("Enabled"))
+webui_show_ignore_target = config:taboption("webui", ListValue, "webui_show_ignore_target", translate("Add IGNORE Target"), translate("Adds `IGNORE` to the list of interfaces for policies, allowing you to skip further processing by VPN Policy Routing."))
+webui_show_ignore_target:value("0", translate("Disabled"))
+webui_show_ignore_target:value("1", translate("Enabled"))
+
webui_sorting = config:taboption("webui", ListValue, "webui_sorting", translate("Show Up/Down Buttons"), translate("Shows the Up/Down buttons for policies, allowing you to move a policy up or down in the list."))
webui_sorting:value("0", translate("Disabled"))
webui_sorting:value("1", translate("Enabled"))
webui_sorting.default = "1"
-
-- Policies
p = m:section(TypedSection, "policy", translate("Policies"), translate("Comment, interface and at least one other field are required. Multiple local and remote addresses/devices/domains and ports can be space separated. Placeholders below represent just the format/syntax and will not be used if fields are left blank."))
p.template = "cbi/tblsection"
gw:value(name, name:upper())
end
end)
+enc = tonumber(uci:get("vpn-policy-routing", "config", "webui_show_ignore_target"))
+if enc and enc ~= 0 then
+ gw:value("ignore", "IGNORE")
+end
dscp = m:section(NamedSection, "config", "vpn-policy-routing", translate("DSCP Tagging"),
translatef("Set DSCP tags (in range between 1 and 63) for specific interfaces. See the %sREADME%s for details.", "<a href=\"" .. readmeURL .. "#dscp-tag-based-policies" .. "\" target=\"_blank\">", "</a>"))
<%-
local packageName = "vpn-policy-routing"
+ local uci = require "luci.model.uci".cursor()
+ local sys = require "luci.sys"
local serviceRunning, serviceEnabled = false, false;
- if luci.sys.call("iptables -t mangle -L | grep -q VPR_PREROUTING") == 0 then
+ if sys.call("iptables -t mangle -L | grep -q VPR_PREROUTING") == 0 then
serviceRunning = true
end
- if luci.model.uci.cursor():get(packageName, "config", "enabled") == "1" then
+ if uci:get(packageName, "config", "enabled") == "1" then
serviceEnabled = true
end
end
-%>
-<div class="cbi-value"><label class="cbi-value-title">Service Control</label>
+<%+cbi/valueheader%>
<div class="cbi-value-field">
- <input type="button" class="cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>"
+ <input type="button" class="btn cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>"
onclick="button_action(this)" />
<span id="btn_start_spinner" class="btn_spinner"></span>
- <input type="button" class="cbi-button cbi-button-apply" id="btn_action" name="action" value="<%:Restart%>"
+ <input type="button" class="btn cbi-button cbi-button-apply" id="btn_action" name="action" value="<%:Restart%>"
onclick="button_action(this)" />
<span id="btn_action_spinner" class="btn_spinner"></span>
- <input type="button" class="cbi-button cbi-button-reset" id="btn_stop" name="stop" value="<%:Stop%>"
+ <input type="button" class="btn cbi-button cbi-button-reset" id="btn_stop" name="stop" value="<%:Stop%>"
onclick="button_action(this)" />
<span id="btn_stop_spinner" class="btn_spinner"></span>
- <input type="button" class="cbi-button cbi-button-apply" id="btn_enable" name="enable" value="<%:Enable%>"
+ <input type="button" class="btn cbi-button cbi-button-apply" id="btn_enable" name="enable" value="<%:Enable%>"
onclick="button_action(this)" />
<span id="btn_enable_spinner" class="btn_spinner"></span>
- <input type="button" class="cbi-button cbi-button-reset" id="btn_disable" name="disable" value="<%:Disable%>"
+ <input type="button" class="btn cbi-button cbi-button-reset" id="btn_disable" name="disable" value="<%:Disable%>"
onclick="button_action(this)" />
<span id="btn_disable_spinner" class="btn_spinner"></span>
</div>
-</div>
+<%+cbi/valuefooter%>
<%-if not btn_start_status then%>
<script type="text/javascript">document.getElementById("btn_start").disabled = true;</script>
<%+cbi/valueheader%>
-<textarea rows="<%=select(2, self:cfgvalue(section):gsub('\n', '\n'))%>"
- style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:20px;width:50em;padding:none;margin:6px;resize:none;overflow:hidden;"
- disabled="disabled"><%=self:cfgvalue(section):gsub('\n', '\n')%>
-</textarea>
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
+<br />
<div>
- <%- 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>")%>
+ <%- local readmeURL = "https://docs.openwrt.melmac.net/vpn-policy-routing/" -%>
+ <%=translatef("The %s indicates 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
--- /dev/null
+<%#
+Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
+This is free software, licensed under the Apache License, Version 2.0
+-%>
+
+<%+cbi/valueheader%>
+
+<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+
+<%+cbi/valuefooter%>
<%#
-Copyright 2017-2018 Dirk Brenken (dev@brenken.org)
+Copyright 2017-2019 Stan Grishin (stangri@melmac.net)
This is free software, licensed under the Apache License, Version 2.0
-%>
<%+cbi/valueheader%>
-<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" />
+<div style="font-weight:bold;">
+ <%=self:cfgvalue(section):gsub('\n', '<br />' )%>
+</div>
<%+cbi/valuefooter%>
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:63
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:62
msgid "%s (disabled)"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:58
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:57
msgid "%s (strict mode)"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:52
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:51
msgid "%s is not installed or not found"
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:189
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:214
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:259
+msgid "Add IGNORE Target"
+msgstr ""
+
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:259
msgid ""
-"Add an ip rule, not an iptables entry for policies with just the local "
-"address. Use with caution to manipulte policies priorities."
+"Adds `IGNORE` to the list of interfaces for policies, allowing you to skip "
+"further processing by VPN Policy Routing."
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:188
msgid "Advanced Configuration"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:199
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
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:202
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:194
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:210
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
msgid "Append"
msgstr ""
-#: 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:230
-msgid "Append remote IP Tables rules"
-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:163
msgid "Basic Configuration"
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:197
msgid "Boot Time-out"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:338
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:335
msgid "Chain"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:289
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:286
msgid "Comment"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:272
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:269
msgid ""
"Comment, interface and at least one other field are required. Multiple local "
"and remote addresses/devices/domains and ports can be space separated. "
"fields are left blank."
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:167
msgid "Condensed output"
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:158
msgid "Configuration"
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:165
msgid "Controls both system log and console output verbosity."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:372
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:373
msgid "Custom User File Includes"
msgstr ""
-#: 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:180
+msgid "DNSMASQ ipset"
+msgstr ""
+
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:366
msgid "DSCP Tag"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:360
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:361
msgid "DSCP Tagging"
msgstr ""
msgid "Default ICMP Interface"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:57
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:59
msgid "Disable"
msgstr ""
-#: 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
+#: 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:184
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:203
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:245
+#: 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:256
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:260
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:264
msgid "Disabled"
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:252
msgid "Display these protocols in protocol column in Web UI."
msgstr ""
-#: 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:173
msgid "Do not enforce policies when their gateway is down"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:54
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:56
msgid "Enable"
msgstr ""
-#: 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
+#: 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:246
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:257
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:261
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
+#: 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:380
msgid "Enabled"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:243
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
msgid ""
"FW Mask used by the service. High mask is used to avoid conflict with SQM/"
"QoS. Change with caution together with"
msgid "Force the ICMP protocol interface."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:214
-msgid "IP Rules Support"
+#: applications/luci-app-vpn-policy-routing/root/usr/share/rpcd/acl.d/luci-app-vpn-policy-routing.json:3
+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:209
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
msgid "IPTables rule option"
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:183
msgid "IPv6 Support"
msgstr ""
-#: 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:194
msgid "Ignored Interfaces"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:211
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:215
msgid "Insert"
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:344
msgid "Interface"
msgstr ""
msgid "Loading"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:294
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:291
msgid "Local addresses / devices"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:301
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:298
msgid "Local ports"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:291
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:288
msgid "Name"
msgstr ""
msgid "No Change"
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:165
msgid "Output verbosity"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:382
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:383
msgid "Path"
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:187
+#: 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:202
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:208
msgid "Please check the %sREADME%s before changing this option."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:272
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:269
msgid "Policies"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:318
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:315
msgid "Protocol"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:306
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:303
msgid "Remote addresses / domains"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:311
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:308
msgid "Remote ports"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:44
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:46
msgid "Restart"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:373
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:374
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:56
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:55
msgid "Running"
msgstr ""
-#: 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:172
msgid "See the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:209
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:213
msgid "Select Append for -A and Insert for -I."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:144
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:153
+msgid "Service Control"
+msgstr ""
+
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:143
msgid "Service Errors"
msgstr ""
-#: 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
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:232
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
msgid "Service FW Mask"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:139
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:138
msgid "Service Gateways"
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:134
msgid "Service Status"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:134
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:133
msgid "Service Status [%s %s]"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:149
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:148
msgid "Service Warnings"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:361
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:362
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:261
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:255
msgid "Show Chain Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:250
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
msgid "Show Enable Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:254
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
msgid "Show Protocol Column"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:263
msgid "Show Up/Down Buttons"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:265
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:263
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:261
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:255
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:250
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:244
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:254
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:248
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: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:230
-msgid "Special instructions to append iptables rules for remote IPs/netmasks."
-msgstr ""
-
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:41
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:43
msgid "Start"
msgstr ""
-#: 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:232
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:233
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
msgid "Starting (WAN) Table ID number for tables created by the service."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:47
+#: applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm:49
msgid "Stop"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:61
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:60
msgid "Stopped"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:172
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:171
msgid "Strict enforcement"
msgstr ""
-#: 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:174
msgid "Strictly enforce policies when their gateway is down"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:199
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:191
msgid "Supported Interfaces"
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:252
msgid "Supported Protocols"
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:166
msgid "Suppress/No output"
msgstr ""
#: 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."
+msgid "The %s indicates default gateway. See the %sREADME%s for details."
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:186
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:207
msgid "The ipset option for local policies"
msgstr ""
-#: 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
msgid "The ipset option for remote policies"
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:197
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:182
-msgid "Use DNSMASQ ipset"
+#: 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:210
+msgid "Use ipset command"
msgstr ""
-#: 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"
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:177
+msgid "Use resolver's ipset for domains"
msgstr ""
#: applications/luci-app-vpn-policy-routing/luasrc/controller/vpn-policy-routing.lua:4
msgid "VPN Policy Routing"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:132
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:131
msgid "VPN and WAN Policy-Based Routing"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:169
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:168
msgid "Verbose output"
msgstr ""
msgid "WAN"
msgstr ""
-#: 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
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:232
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:237
msgid "WAN Table FW Mark"
msgstr ""
-#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:233
+#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:227
msgid "WAN Table ID"
msgstr ""
-#: 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:242
msgid "Web UI Configuration"
msgstr ""
switch (len) {
case 28:
if (!strncmp(duid, "00010001", 8))
- p = duid + 8;
+ p = duid + 16;
break;
z = uci.add('firewall', 'zone');
uci.set('firewall', z, 'name', name);
- uci.set('firewall', z, 'network', ' ');
uci.set('firewall', z, 'input', d.getInput() || 'DROP');
uci.set('firewall', z, 'output', d.getOutput() || 'DROP');
uci.set('firewall', z, 'forward', d.getForward() || 'DROP');
return false;
newNetworks.push(network);
- this.set('network', newNetworks.join(' '));
+ this.set('network', newNetworks);
return true;
},
deleteNetwork: function(network) {
var oldNetworks = this.getNetworks(),
- newNetworks = oldNetworks.filter(function(net) { return net != network });
+ newNetworks = oldNetworks.filter(function(net) { return net != network });
if (newNetworks.length > 0)
- this.set('network', newNetworks.join(' '));
+ this.set('network', newNetworks);
else
this.set('network', null);
},
clearNetworks: function() {
- this.set('network', ' ');
+ this.set('network', null);
},
getDevices: function() {
}
}
+ rv.sort(function(a, b) {
+ if (a.metric != b.metric)
+ return (a.metric - b.metric);
+
+ if (a.interface < b.interface)
+ return -1;
+ else if (a.interface > b.interface)
+ return 1;
+
+ return 0;
+ });
+
return rv;
}, this));
},
_('valid IPv6 prefix value (0-128)'));
},
- cidr: function() {
- return this.assert(this.apply('cidr4') || this.apply('cidr6'), _('valid IPv4 or IPv6 CIDR'));
+ cidr: function(negative) {
+ return this.assert(this.apply('cidr4', null, [negative]) || this.apply('cidr6', null, [negative]),
+ _('valid IPv4 or IPv6 CIDR'));
},
- cidr4: function() {
- var m = this.value.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/(\d{1,2})$/);
- return this.assert(m && this.factory.parseIPv4(m[1]) && this.apply('ip4prefix', m[2]), _('valid IPv4 CIDR'));
+ cidr4: function(negative) {
+ var m = this.value.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/(-)?(\d{1,2})$/);
+ return this.assert(m && this.factory.parseIPv4(m[1]) && (negative || !m[2]) && this.apply('ip4prefix', m[3]),
+ _('valid IPv4 CIDR'));
},
- cidr6: function() {
- var m = this.value.match(/^([0-9a-fA-F:.]+)\/(\d{1,3})$/);
- return this.assert(m && this.factory.parseIPv6(m[1]) && this.apply('ip6prefix', m[2]), _('valid IPv6 CIDR'));
+ cidr6: function(negative) {
+ var m = this.value.match(/^([0-9a-fA-F:.]+)\/(-)?(\d{1,3})$/);
+ return this.assert(m && this.factory.parseIPv6(m[1]) && (negative || !m[2]) && this.apply('ip6prefix', m[3]),
+ _('valid IPv6 CIDR'));
},
ipnet4: function() {
return this.assert(!(!v6 || v6[0] || v6[1] || v6[2] || v6[3]), _('valid IPv6 host id'));
},
- ipmask: function() {
- return this.assert(this.apply('ipmask4') || this.apply('ipmask6'),
+ ipmask: function(negative) {
+ return this.assert(this.apply('ipmask4', null, [negative]) || this.apply('ipmask6', null, [negative]),
_('valid network in address/netmask notation'));
},
- ipmask4: function() {
- return this.assert(this.apply('cidr4') || this.apply('ipnet4') || this.apply('ip4addr'),
+ ipmask4: function(negative) {
+ return this.assert(this.apply('cidr4', null, [negative]) || this.apply('ipnet4') || this.apply('ip4addr'),
_('valid IPv4 network'));
},
- ipmask6: function() {
- return this.assert(this.apply('cidr6') || this.apply('ipnet6') || this.apply('ip6addr'),
+ ipmask6: function(negative) {
+ return this.assert(this.apply('cidr6', null, [negative]) || this.apply('ipnet6') || this.apply('ip6addr'),
_('valid IPv6 network'));
},