From fc9f85ffb4568fdbd2162467db4e8603acfcfa96 Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Sat, 3 Aug 2024 23:23:38 +0000 Subject: [PATCH] luci-app-pbr: sync with 1.1.6-20 principal package Signed-off-by: Stan Grishin --- applications/luci-app-pbr/Makefile | 9 +- applications/luci-app-pbr/README.md | 4 + .../luci-static/resources/pbr/status.js | 82 +++- .../resources/view/pbr/overview.js | 74 ++-- .../resources/view/status/include/72_pbr.js | 18 +- .../luci-app-pbr/po/templates/pbr.pot | 365 ++++++++++-------- .../root/usr/libexec/rpcd/luci.pbr | 35 +- 7 files changed, 354 insertions(+), 233 deletions(-) create mode 100644 applications/luci-app-pbr/README.md diff --git a/applications/luci-app-pbr/Makefile b/applications/luci-app-pbr/Makefile index bd5442237080..591e4e323bbb 100644 --- a/applications/luci-app-pbr/Makefile +++ b/applications/luci-app-pbr/Makefile @@ -1,15 +1,16 @@ -# Copyright 2017-2023 MOSSDeF, Stan Grishin (stangri@melmac.ca) -# This is free software, licensed under the GNU General Public License v3. +# Copyright 2017-2024 MOSSDeF, Stan Grishin (stangri@melmac.ca). +# This is free software, licensed under AGPL-3.0-or-later. include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-pbr PKG_LICENSE:=AGPL-3.0-or-later PKG_MAINTAINER:=Stan Grishin -PKG_VERSION:=1.1.4 -PKG_RELEASE:=16 +PKG_VERSION:=1.1.6 +PKG_RELEASE:=20 LUCI_TITLE:=Policy Based Routing Service Web UI +LUCI_URL:=https://github.com/stangri/luci-app-pbr/ LUCI_DESCRIPTION:=Provides Web UI for Policy Based Routing Service. LUCI_DEPENDS:=+luci-base +jsonfilter +pbr diff --git a/applications/luci-app-pbr/README.md b/applications/luci-app-pbr/README.md new file mode 100644 index 000000000000..facd5623dd4e --- /dev/null +++ b/applications/luci-app-pbr/README.md @@ -0,0 +1,4 @@ +# README + +Documentation for this project is available at [https://docs.openwrt.melmac.net/luci-app-pbr/](https://docs.openwrt.melmac.net/luci-app-pbr/). + diff --git a/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js b/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js index 03675128364c..184e1285b1f0 100644 --- a/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js +++ b/applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js @@ -10,8 +10,25 @@ var pkg = { get Name() { return "pbr"; }, + get ReadmeCompat() { + return "1.1.6-16"; + }, get URL() { - return "https://docs.openwrt.melmac.net/" + pkg.Name + "/"; + return ( + "https://docs.openwrt.melmac.net/" + + pkg.Name + + "/" + + (pkg.ReadmeCompat ? pkg.ReadmeCompat + "/" : "") + ); + }, + get DonateURL() { + return ( + "https://docs.openwrt.melmac.net/" + + pkg.Name + + "/" + + (pkg.ReadmeCompat ? pkg.ReadmeCompat + "/" : "") + + "#Donate" + ); }, }; @@ -184,13 +201,21 @@ var status = baseclass.extend({ { class: "cbi-value-title" }, _("Service Gateways") ); - text = _( - "The %s indicates default gateway. See the %sREADME%s for details." - ).format( - "", - '', - "" - ); + text = + _( + "The %s indicates default gateway. See the %sREADME%s for details." + ).format( + "", + '', + "" + ) + + "
" + + _("Please %sdonate%s to support development of this project.").format( + "", + "" + ); var gatewaysDescr = E("div", { class: "cbi-value-description" }, text); var gatewaysText = E("div", {}, reply.gateways); var gatewaysField = E("div", { class: "cbi-value-field" }, [ @@ -228,8 +253,11 @@ var status = baseclass.extend({ warningInvalidOVPNConfig: _( "Invalid OpenVPN config for %s interface" ), - warningOutdatedWebUIApp: _( - "The WebUI application is outdated (version %s), please update it" + warningOutdatedLuciPackage: _( + "The WebUI application (luci-app-pbr) is outdated, please update it" + ), + warningOutdatedPrincipalPackage: _( + "The principal package (pbr) is outdated, please update it" ), warningBadNftCallsInUserFile: _( "Incompatible nft calls detected in user include file, disabling fw4 nft file support." @@ -310,6 +338,10 @@ var status = baseclass.extend({ "Policy '%s' has no source/destination parameters" ), errorPolicyNoInterface: _("Policy '%s' has no assigned interface"), + errorPolicyNoDns: _("Policy '%s' has no assigned DNS"), + errorPolicyProcessNoInterfaceDns: _( + "Interface '%s' has no assigned DNS" + ), errorPolicyUnknownInterface: _( "Policy '%s' has an unknown interface" ), @@ -380,9 +412,9 @@ var status = baseclass.extend({ text += _("Unknown error!") + "
"; } }); - text += _("Errors encountered, please check the %sREADME%s!").format( + text += _("Errors encountered, please check the %sREADME%s").format( '', - "
" + "!
" ); var errorsText = E("div", {}, text); var errorsField = E("div", { class: "cbi-value-field" }, errorsText); @@ -534,6 +566,29 @@ var status = baseclass.extend({ var buttonsDiv = reply.version ? E("div", { class: "cbi-value" }, [buttonsTitle, buttonsField]) : ""; + + var donateTitle = E( + "label", + { class: "cbi-value-title" }, + _("Donate to the Project") + ); + var donateText = E( + "div", + { class: "cbi-value-field" }, + E( + "div", + { class: "cbi-value-description" }, + _("Please %sdonate%s to support development of this project.").format( + "", + "" + ) + ) + ); + + var donateDiv = reply.version + ? E("div", { class: "cbi-value" }, [donateTitle, donateText]) + : ""; + return E("div", {}, [ header, statusDiv, @@ -541,6 +596,7 @@ var status = baseclass.extend({ warningsDiv, errorsDiv, buttonsDiv, + // donateDiv, ]); }); }, @@ -553,6 +609,8 @@ RPC.on("setInitAction", function (reply) { return L.Class.extend({ status: status, + pkg: pkg, + getInitStatus: getInitStatus, getInterfaces: getInterfaces, getPlatformSupport: getPlatformSupport, }); diff --git a/applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js b/applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js index 99f8a502fa70..0b35268ec395 100644 --- a/applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js +++ b/applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js @@ -7,15 +7,7 @@ "require view"; "require pbr.status as pbr"; -var pkg = { - get Name() { - return "pbr"; - }, - - get URL() { - return "https://docs.openwrt.melmac.net/" + pkg.Name + "/"; - }, -}; +var pkg = pbr.pkg; return view.extend({ load: function () { @@ -95,26 +87,6 @@ return view.extend({ o.default = "1"; var text = ""; - if (reply.platform.adguardhome_ipset_support === null) { - text += - _("The %s support is unknown.").format("adguardhome.ipset") + - "
"; - } else if (!reply.platform.adguardhome_ipset_support) { - text += - _("The %s is not supported on this system.").format( - "adguardhome.ipset" - ) + "
"; - } - if (reply.platform.dnsmasq_ipset_support === null) { - text += - _("The %s support is unknown.").format("dnsmasq.ipset") + - "
"; - } else if (!reply.platform.dnsmasq_ipset_support) { - text += - _("The %s is not supported on this system.").format( - "dnsmasq.ipset" - ) + "
"; - } if (reply.platform.dnsmasq_nftset_support === null) { text += _("The %s support is unknown.").format("dnsmasq.nftset") + @@ -279,7 +251,10 @@ return view.extend({ _( "Name, 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." + "the format/syntax and will not be used if fields are left blank. For more information on options, check the %sREADME%s." + ).format( + '', + "" ) ); s.rowcolors = true; @@ -350,6 +325,45 @@ return view.extend({ o.datatype = "network"; o.rmempty = false; + s = m.section( + form.GridSection, + "dns_policy", + _("DNS Policies"), + _( + "Name, local address and remote DNS fields are required. Multiple local " + + "addresses/devices can be space separated. For more information on options, check the %sREADME%s." + ).format( + '', + "" + ) + ); + s.rowcolors = true; + s.sortable = true; + s.anonymous = true; + s.addremove = true; + + o = s.option(form.Flag, "enabled", _("Enabled")); + o.default = "1"; + o.editable = true; + + o = s.option(form.Value, "name", _("Name")); + o.optional = false; + + o = s.option(form.Value, "src_addr", _("Local addresses / devices")); + o.optional = false; + o.datatype = + "list(neg(or(cidr,host,ipmask,ipaddr,macaddr,network,string)))"; + o.rmempty = true; + o.default = ""; + + o = s.option(form.Value, "dest_dns", _("Remote DNS")); + o.optional = false; + o.rmempty = false; + o.datatype = "list(or(cidr,host,network,ipaddr))"; + reply.interfaces.forEach((element) => { + element === "ignore" || o.value(element); + }); + s = m.section( form.NamedSection, "config", diff --git a/applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js b/applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js index 536c3983c3e3..b0654976b38a 100644 --- a/applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js +++ b/applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js @@ -2,27 +2,15 @@ "require rpc"; "require form"; "require baseclass"; +"require pbr.status as pbr"; -var pkg = { - get Name() { - return "pbr"; - }, - get URL() { - return "https://docs.openwrt.melmac.net/" + pkg.Name + "/"; - }, -}; - -var getInitStatus = rpc.declare({ - object: "luci." + pkg.Name, - method: "getInitStatus", - params: ["name"], -}); +var pkg = pbr.pkg; return baseclass.extend({ title: _("Policy Based Routing"), load: function () { - return Promise.all([getInitStatus(pkg.Name)]); + return Promise.all([pbr.getInitStatus(pkg.Name)]); }, render: function (data) { diff --git a/applications/luci-app-pbr/po/templates/pbr.pot b/applications/luci-app-pbr/po/templates/pbr.pot index 945ef55d5c40..3d3323625be9 100644 --- a/applications/luci-app-pbr/po/templates/pbr.pot +++ b/applications/luci-app-pbr/po/templates/pbr.pot @@ -1,201 +1,210 @@ msgid "" msgstr "Content-Type: text/plain; charset=UTF-8" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:215 -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:316 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:240 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:348 msgid "%s" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:277 -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:278 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:305 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:306 msgid "%s binary cannot be found" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:56 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:48 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-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:52 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:40 msgid "Active" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:144 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:116 msgid "AdGuardHome ipset" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:196 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:168 msgid "Add" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:253 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:225 msgid "Add Ignore Target" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:255 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:227 msgid "" "Adds 'ignore' to the list of interfaces for policies. See the %sREADME%s for " "details." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:54 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:46 msgid "Advanced Configuration" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:171 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:143 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-pbr/htdocs/luci-static/resources/view/pbr/overview.js:183 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:155 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-pbr/htdocs/luci-static/resources/view/pbr/overview.js:51 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:43 msgid "Basic Configuration" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:337 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:312 msgid "Chain" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:363 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:395 msgid "Command failed: %s" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:79 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:71 msgid "Condensed output" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:274 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:302 msgid "Config (%s) validation failure" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:76 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:68 msgid "Controls both system log and console output verbosity." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:379 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:393 msgid "Custom User File Includes" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:319 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:351 msgid "Custom user file '%s' not found or empty" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:370 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:331 +msgid "DNS Policies" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:384 msgid "DSCP Tag" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:357 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:371 msgid "DSCP Tagging" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:204 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:176 msgid "Default ICMP Interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:494 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:526 msgid "Disable" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:142 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:162 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:261 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:114 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:134 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:233 msgid "Disabled" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:488 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:520 msgid "Disabling %s service" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:271 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:243 msgid "Display these protocols in protocol column in Web UI." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:238 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:266 msgid "" "Dnsmasq instance (%s) targeted in settings, but it doesn't have its own " "confdir." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:148 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:120 msgid "Dnsmasq ipset" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:152 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:124 msgid "Dnsmasq nft set" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:93 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:85 msgid "Do not enforce policies when their gateway is down" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:475 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:573 +msgid "Donate to the Project" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:507 msgid "Enable" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:163 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:262 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:290 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:392 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:135 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:234 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:265 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:345 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:406 msgid "Enabled" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:469 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:501 msgid "Enabling %s service" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:321 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:353 msgid "Error running custom user file '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:383 -msgid "Errors encountered, please check the %sREADME%s!" +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:415 +msgid "Errors encountered, please check the %sREADME%s" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:238 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:210 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-pbr/htdocs/luci-static/resources/pbr/status.js:359 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:391 msgid "Failed to download '%s'!" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:357 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:389 msgid "Failed to download '%s', HTTPS is not supported!" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:352 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:384 msgid "Failed to install fw4 nft file '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:318 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:350 msgid "Failed to reload '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:348 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:380 msgid "Failed to resolve '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:317 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:349 msgid "Failed to set up '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:325 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:357 msgid "Failed to set up any gateway" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:205 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:177 msgid "Force the ICMP protocol interface." msgstr "" @@ -203,151 +212,173 @@ msgstr "" msgid "Grant UCI and file access for luci-app-pbr" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:160 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:132 msgid "IPv6 Support" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:181 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:153 msgid "Ignored Interfaces" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:64 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:52 msgid "Inactive" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:66 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:54 msgid "Inactive (Disabled)" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:235 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:263 msgid "" "Incompatible nft calls detected in user include file, disabling fw4 nft file " "support." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:197 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:169 msgid "Insert" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:343 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:375 msgid "Insertion failed for IPv4 for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:340 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:372 msgid "Insertion failed for both IPv4 and IPv6 for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:213 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:238 msgid "Installed AdGuardHome (%s) doesn't support 'ipset_file' option." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:346 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:321 msgid "Interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:229 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:343 +msgid "Interface '%s' has no assigned DNS" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:254 msgid "Invalid OpenVPN config for %s interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:350 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:382 msgid "Invalid OpenVPN config for '%s' interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:296 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:271 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:352 msgid "Local addresses / devices" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:302 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:277 msgid "Local ports" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:334 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:366 msgid "Mismatched IP family between in policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:77 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:65 msgid "Mode" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:294 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:269 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:349 msgid "Name" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:280 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:252 msgid "" "Name, 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." +"fields are left blank. For more information on options, check the %sREADME%s." +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:333 +msgid "" +"Name, local address and remote DNS fields are required. Multiple local " +"addresses/devices can be space separated. For more information on options, " +"check the %sREADME%s." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:207 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:179 msgid "No Change" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:171 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:70 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:188 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:58 msgid "Not installed or not found" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:75 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:67 msgid "Output verbosity" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:397 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:411 msgid "Path" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:129 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:215 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:581 +msgid "Please %sdonate%s to support development of this project." +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:101 msgid "Please check the %sREADME%s before changing this option." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:223 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:248 msgid "Please unset 'chain' or set 'chain' to 'PREROUTING' for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:226 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:251 msgid "Please unset 'chain' or set 'chain' to 'prerouting' for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:220 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:245 msgid "Please unset 'proto' or set 'proto' to 'all' for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:217 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:242 msgid "Please unset 'src_addr', 'src_port' and 'dest_port' for policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:278 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:250 msgid "Policies" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:314 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:346 msgid "Policy '%s' has an unknown interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:312 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:341 +msgid "Policy '%s' has no assigned DNS" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:340 msgid "Policy '%s' has no assigned interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:310 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:338 msgid "Policy '%s' has no source/destination parameters" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:354 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:386 msgid "" "Policy '%s' refers to URL which can't be downloaded in 'secure_reload' mode!" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:22 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:10 msgid "Policy Based Routing" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:48 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:40 msgid "Policy Based Routing - Configuration" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:144 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:161 msgid "Policy Based Routing - Status" msgstr "" @@ -355,287 +386,291 @@ msgstr "" msgid "Policy Routing" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:320 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:295 msgid "Protocol" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:346 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:378 msgid "Received empty tid/mark or interface name when setting up routing" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:298 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:326 msgid "Refer to https://docs.openwrt.melmac.net/pbr/#procd_wan_interface" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:308 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:359 +msgid "Remote DNS" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:283 msgid "Remote addresses / domains" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:314 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:289 msgid "Remote ports" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:326 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:358 msgid "Resolver '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:286 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:314 msgid "Resolver set (%s) is not supported on this system" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:210 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:235 msgid "Resolver set (%s) is not supported on this system." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:280 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:308 msgid "" "Resolver set support (%s) requires ipset, but ipset binary cannot be found" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:283 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:311 msgid "" "Resolver set support (%s) requires nftables, but nft binary cannot be found" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:437 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:469 msgid "Restart" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:431 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:463 msgid "Restarting %s service" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:193 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:165 msgid "Rule Create option" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:381 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:395 msgid "" "Run the following user files after setting up but before restarting DNSMASQ. " "See the %sREADME%s for details." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:153 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:170 msgid "Running" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:88 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:80 msgid "See the %sREADME%s for details." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:194 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:166 msgid "Select Add for -A/add and Insert for -I/Insert." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:520 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:552 msgid "Service Control" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:368 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:400 msgid "Service Errors" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:225 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:236 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:197 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:208 msgid "Service FW Mask" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:185 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:202 msgid "Service Gateways" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:148 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:165 msgid "Service Status" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:244 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:272 msgid "Service Warnings" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:359 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:373 msgid "" "Set DSCP tags (in range between 1 and 63) for specific interfaces. See the " "%sREADME%s for details." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:328 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:360 msgid "Skipping IPv6 policy '%s' as IPv6 support is disabled" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:418 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:450 msgid "Start" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:412 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:444 msgid "Starting %s service" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:221 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:193 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-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:75 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:63 msgid "Status" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:456 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:488 msgid "Stop" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:167 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:184 msgid "Stopped (Disabled)." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:165 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:182 msgid "Stopped." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:450 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:482 msgid "Stopping %s service" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:87 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:79 msgid "Strict enforcement" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:94 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:86 msgid "Strictly enforce policies when their gateway is down" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:169 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:141 msgid "Supported Interfaces" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:270 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:242 msgid "Supported Protocols" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:78 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:70 msgid "Suppress/No output" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:320 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:352 msgid "Syntax error in custom user file '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:188 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:206 msgid "The %s indicates default gateway. See the %sREADME%s for details." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:295 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:323 msgid "" "The %s inteface not found, you need to set the 'pbr.config." "procd_wan_interface' option" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:104 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:114 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:124 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:96 msgid "The %s is not supported on this system." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:292 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:320 msgid "The %s service failed to discover WAN gateway" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:289 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:317 msgid "The %s service is currently disabled" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:100 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:110 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:120 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:92 msgid "The %s support is unknown." msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:232 -msgid "The WebUI application is outdated (version %s), please update it" +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:257 +msgid "The WebUI application (luci-app-pbr) is outdated, please update it" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:361 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:393 msgid "The file:// schema requires curl, but it's not detected on this system!" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:301 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:329 msgid "The ipset name '%s' is longer than allowed 31 characters" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:304 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:332 msgid "The nft set name '%s' is longer than allowed 255 characters" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:307 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:260 +msgid "The principal package (pbr) is outdated, please update it" +msgstr "" + +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:335 msgid "Unexpected exit or service termination: '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:380 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:412 msgid "Unknown error!" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:331 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:363 msgid "Unknown packet mark for interface '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:337 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:369 msgid "Unknown protocol in policy '%s'" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:256 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:284 msgid "Unknown warning" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:323 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:355 msgid "" "Use of 'curl' is detected in custom user file '%s', but 'curl' isn't " "installed" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:139 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:111 msgid "Use resolver set support for domains" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:80 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:72 msgid "Verbose output" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:76 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:64 msgid "Version" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:151 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:168 msgid "Version %s" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:219 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:242 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:191 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:214 msgid "WAN Table FW Mark" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:69 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:61 msgid "Web UI Configuration" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:329 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:304 msgid "all" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:157 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:56 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:174 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:44 msgid "fw4 nft file mode" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:155 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:54 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:172 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:42 msgid "iptables mode" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:159 -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:58 +#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:176 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:46 msgid "nft mode" msgstr "" -#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:60 +#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:48 msgid "unknown" msgstr "" diff --git a/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr b/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr index 8cd02c58f4f1..b0316d96bee3 100755 --- a/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr +++ b/applications/luci-app-pbr/root/usr/libexec/rpcd/luci.pbr @@ -11,6 +11,7 @@ # ubus -S call luci.pbr getGateways '{"name": "pbr" }' # ubus -S call luci.pbr getInterfaces '{"name": "pbr" }' +readonly luciCompat='5' readonly pbrFunctionsFile='/etc/init.d/pbr' if [ -s "$pbrFunctionsFile" ]; then # shellcheck source=../../../../../pbr/files/etc/init.d/pbr @@ -20,6 +21,23 @@ else logger -t pbr 'error' "pbr init.d file ($pbrFunctionsFile) not found!" fi +# compatibility with old luci app versions +is_running_iptables() { iptables -t mangle -L | grep -q PBR_PREROUTING >/dev/null 2>&1; } +is_running() { is_running_iptables || is_running_nft; } +check_ipset() { { [ -n "$ipset" ] && "$ipset" help hash:net; } >/dev/null 2>&1; } +check_agh_ipset() { + check_ipset || return 1 + check_agh || return 1 + is_greater_or_equal "$($agh --version | sed 's|AdGuard Home, version v\(.*\)|\1|' | sed 's|-.*||')" '0.107.13' +} +check_dnsmasq_ipset() { + local o; + check_ipset || return 1 + check_dnsmasq || return 1 + o="$(dnsmasq -v 2>/dev/null)" + ! echo "$o" | grep -q 'no-ipset' && echo "$o" | grep -q 'ipset' +} + get_init_list() { local name name="$(basename "$1")" @@ -135,12 +153,15 @@ EOF $(echo "$warnings" | tr \# \\n) EOF fi -# if is_greater "$(opkg_get_version "${name}")" "$(opkg_get_version "luci-app-${name}")"; then -# json_add_object -# json_add_string 'id' 'warningOutdatedWebUIApp' -# json_add_string 'extra' "$(opkg_get_version "luci-app-${name}")" -# json_close_object -# fi + if is_greater "${packageCompat:-0}" "${luciCompat:-0}"; then + json_add_object + json_add_string 'id' 'warningOutdatedLuciPackage' + json_close_object + elif is_greater "${luciCompat:-0}" "${packageCompat:-0}"; then + json_add_object + json_add_string 'id' 'warningOutdatedPrincipalPackage' + json_close_object + fi json_close_array json_close_object json_dump @@ -234,7 +255,7 @@ get_supported_interfaces() { for i in $supported_interface; do is_xray "$i" && ifacesSupported="$ifacesSupported $i" done - [ "$webui_show_ignore_target" -eq "1" ] && ifacesSupported="$ifacesSupported ignore" + [ "$webui_show_ignore_target" -eq '1' ] && ifacesSupported="$ifacesSupported ignore" json_init json_add_object "$packageName" json_add_array 'interfaces'