diff options
Diffstat (limited to 'applications/luci-app-firewall')
29 files changed, 115 insertions, 10 deletions
diff --git a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rules.lua b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rules.lua index c533491977..22dec5ee6b 100644 --- a/applications/luci-app-firewall/luasrc/model/cbi/firewall/rules.lua +++ b/applications/luci-app-firewall/luasrc/model/cbi/firewall/rules.lua @@ -89,17 +89,31 @@ local function rule_proto_txt(self, s) end local function rule_src_txt(self, s) - local z = ft.fmt_zone(self.map:get(s, "src"), translate("any zone")) - local a = ft.fmt_ip(self.map:get(s, "src_ip"), translate("any host")) + local z = ft.fmt_zone(self.map:get(s, "src")) local p = ft.fmt_port(self.map:get(s, "src_port")) local m = ft.fmt_mac(self.map:get(s, "src_mac")) - if p and m then - return translatef("From %s in %s with source %s and %s", a, z, p, m) - elseif p or m then - return translatef("From %s in %s with source %s", a, z, p or m) + -- Forward/Input + if z and #z > 0 then + local a = ft.fmt_ip(self.map:get(s, "src_ip"), translate("any host")) + if p and m then + return translatef("From %s in %s with source %s and %s", a, z, p, m) + elseif p or m then + return translatef("From %s in %s with source %s", a, z, p or m) + else + return translatef("From %s in %s", a, z) + end + + -- Output else - return translatef("From %s in %s", a, z) + local a = ft.fmt_ip(self.map:get(s, "src_ip"), translate("any router IP")) + if p and m then + return translatef("From %s on <var>this device</var> with source %s and %s", a, p, m) + elseif p or m then + return translatef("From %s on <var>this device</var> with source %s", a, p or m) + else + return translatef("From %s on <var>this device</var>", a) + end end end @@ -158,7 +172,7 @@ target = s:option(DummyValue, "target", translate("Action")) target.rawhtml = true target.width = "20%" function target.cfgvalue(self, s) - local t = ft.fmt_target(self.map:get(s, "target"), self.map:get(s, "dest")) + local t = ft.fmt_target(self.map:get(s, "target"), self.map:get(s, "src"), self.map:get(s, "dest")) local l = ft.fmt_limit(self.map:get(s, "limit"), self.map:get(s, "limit_burst")) diff --git a/applications/luci-app-firewall/luasrc/tools/firewall.lua b/applications/luci-app-firewall/luasrc/tools/firewall.lua index 2d89bfa2a6..055342bfb3 100644 --- a/applications/luci-app-firewall/luasrc/tools/firewall.lua +++ b/applications/luci-app-firewall/luasrc/tools/firewall.lua @@ -198,8 +198,18 @@ function fmt_limit(limit, burst) end end -function fmt_target(x, dest) - if dest and #dest > 0 then +function fmt_target(x, src, dest) + if not src or #src == 0 then + if x == "ACCEPT" then + return _("Accept output") + elseif x == "REJECT" then + return _("Refuse output") + elseif x == "NOTRACK" then + return _("Do not track output") + else --if x == "DROP" then + return _("Discard output") + end + elseif dest and #dest > 0 then if x == "ACCEPT" then return _("Accept forward") elseif x == "REJECT" then diff --git a/applications/luci-app-firewall/po/ca/firewall.po b/applications/luci-app-firewall/po/ca/firewall.po index 2ccffca9a7..b206fce1e4 100644 --- a/applications/luci-app-firewall/po/ca/firewall.po +++ b/applications/luci-app-firewall/po/ca/firewall.po @@ -314,6 +314,9 @@ msgstr "Altre..." msgid "Output" msgstr "Sortida" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Passa paràmetres addicionals al iptables. Utilitzeu-ho amb cura!" diff --git a/applications/luci-app-firewall/po/cs/firewall.po b/applications/luci-app-firewall/po/cs/firewall.po index 4cbf356d0b..3ecd433a7d 100644 --- a/applications/luci-app-firewall/po/cs/firewall.po +++ b/applications/luci-app-firewall/po/cs/firewall.po @@ -309,6 +309,9 @@ msgstr "Ostatní ..." msgid "Output" msgstr "Výstup" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Předává další argumenty iptables. Používat opatrně!" diff --git a/applications/luci-app-firewall/po/de/firewall.po b/applications/luci-app-firewall/po/de/firewall.po index 0ee6007dd6..e39d4f8566 100644 --- a/applications/luci-app-firewall/po/de/firewall.po +++ b/applications/luci-app-firewall/po/de/firewall.po @@ -307,6 +307,9 @@ msgstr "Anderes..." msgid "Output" msgstr "Ausgang" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "Gibt zusätzliche Kommandozeilenargumente an iptables weiter. Mit Vorsicht " diff --git a/applications/luci-app-firewall/po/el/firewall.po b/applications/luci-app-firewall/po/el/firewall.po index 9ddd4c9db1..783fcd462c 100644 --- a/applications/luci-app-firewall/po/el/firewall.po +++ b/applications/luci-app-firewall/po/el/firewall.po @@ -306,6 +306,9 @@ msgstr "Άλλο..." msgid "Output" msgstr "Έξοδος" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/en/firewall.po b/applications/luci-app-firewall/po/en/firewall.po index f0fe0b3782..9d9166d68f 100644 --- a/applications/luci-app-firewall/po/en/firewall.po +++ b/applications/luci-app-firewall/po/en/firewall.po @@ -305,6 +305,9 @@ msgstr "" msgid "Output" msgstr "Output" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/es/firewall.po b/applications/luci-app-firewall/po/es/firewall.po index 000853e9bd..e96fecad99 100644 --- a/applications/luci-app-firewall/po/es/firewall.po +++ b/applications/luci-app-firewall/po/es/firewall.po @@ -312,6 +312,9 @@ msgstr "Otros..." msgid "Output" msgstr "Salida" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Pasa más parámetros a IPTables. ¡Usar con cuidado!" diff --git a/applications/luci-app-firewall/po/fr/firewall.po b/applications/luci-app-firewall/po/fr/firewall.po index 74c28b8836..4a34064868 100644 --- a/applications/luci-app-firewall/po/fr/firewall.po +++ b/applications/luci-app-firewall/po/fr/firewall.po @@ -307,6 +307,9 @@ msgstr "Autre..." msgid "Output" msgstr "Sortie" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/he/firewall.po b/applications/luci-app-firewall/po/he/firewall.po index 0416661c26..5511e8ab10 100644 --- a/applications/luci-app-firewall/po/he/firewall.po +++ b/applications/luci-app-firewall/po/he/firewall.po @@ -296,6 +296,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/hu/firewall.po b/applications/luci-app-firewall/po/hu/firewall.po index 33a305ce8e..30c242913d 100644 --- a/applications/luci-app-firewall/po/hu/firewall.po +++ b/applications/luci-app-firewall/po/hu/firewall.po @@ -313,6 +313,9 @@ msgstr "Egyéb..." msgid "Output" msgstr "Kimenet" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "További argumentumok küldése az iptables részére. Használja körültekintően!" diff --git a/applications/luci-app-firewall/po/it/firewall.po b/applications/luci-app-firewall/po/it/firewall.po index 4808d12475..e26c504b95 100644 --- a/applications/luci-app-firewall/po/it/firewall.po +++ b/applications/luci-app-firewall/po/it/firewall.po @@ -311,6 +311,9 @@ msgstr "Altri..." msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Passa comandi addizionali a iptables. Usare con cura!" diff --git a/applications/luci-app-firewall/po/ja/firewall.po b/applications/luci-app-firewall/po/ja/firewall.po index 27109904ba..d4cf84c956 100644 --- a/applications/luci-app-firewall/po/ja/firewall.po +++ b/applications/luci-app-firewall/po/ja/firewall.po @@ -316,6 +316,9 @@ msgstr "その他のプロトコル" msgid "Output" msgstr "送信" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "iptablesにパススルーする追加の引数を設定してください。ただし、注意して設定し" diff --git a/applications/luci-app-firewall/po/ko/firewall.po b/applications/luci-app-firewall/po/ko/firewall.po index dd4f96197a..5c3d02c1e2 100644 --- a/applications/luci-app-firewall/po/ko/firewall.po +++ b/applications/luci-app-firewall/po/ko/firewall.po @@ -304,6 +304,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "iptables 명령에 추가 인자들을 더합니다. 조심해 사용하세요!" diff --git a/applications/luci-app-firewall/po/ms/firewall.po b/applications/luci-app-firewall/po/ms/firewall.po index 58aea1fd0b..9688622ba4 100644 --- a/applications/luci-app-firewall/po/ms/firewall.po +++ b/applications/luci-app-firewall/po/ms/firewall.po @@ -295,6 +295,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/no/firewall.po b/applications/luci-app-firewall/po/no/firewall.po index 2a13b6b3cd..d59fec3646 100644 --- a/applications/luci-app-firewall/po/no/firewall.po +++ b/applications/luci-app-firewall/po/no/firewall.po @@ -308,6 +308,9 @@ msgstr "Andre..." msgid "Output" msgstr "Utdata" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Sender flere argumenter til iptables. Bruk med forsiktighet!" diff --git a/applications/luci-app-firewall/po/pl/firewall.po b/applications/luci-app-firewall/po/pl/firewall.po index a08a1e5606..7c087ef02b 100644 --- a/applications/luci-app-firewall/po/pl/firewall.po +++ b/applications/luci-app-firewall/po/pl/firewall.po @@ -316,6 +316,9 @@ msgstr "Inne..." msgid "Output" msgstr "Wyjście (Output)" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "Przekazuje dodatkowe argumenty do iptables. Zachowaj szczególną ostrożność!" diff --git a/applications/luci-app-firewall/po/pt-br/firewall.po b/applications/luci-app-firewall/po/pt-br/firewall.po index 7da028bee4..bfcdd54d9b 100644 --- a/applications/luci-app-firewall/po/pt-br/firewall.po +++ b/applications/luci-app-firewall/po/pt-br/firewall.po @@ -313,6 +313,9 @@ msgstr "Outro..." msgid "Output" msgstr "Saída" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Passa argumentos adicionais para o iptables. Use com cuidado!" diff --git a/applications/luci-app-firewall/po/pt/firewall.po b/applications/luci-app-firewall/po/pt/firewall.po index 543489e1ad..2536b7a369 100644 --- a/applications/luci-app-firewall/po/pt/firewall.po +++ b/applications/luci-app-firewall/po/pt/firewall.po @@ -314,6 +314,9 @@ msgstr "Outro..." msgid "Output" msgstr "Saída" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "Passa argumentos adicionais para o iptables. Usar com cuidado!" diff --git a/applications/luci-app-firewall/po/ro/firewall.po b/applications/luci-app-firewall/po/ro/firewall.po index 937efe722b..dbae338229 100644 --- a/applications/luci-app-firewall/po/ro/firewall.po +++ b/applications/luci-app-firewall/po/ro/firewall.po @@ -300,6 +300,9 @@ msgstr "Altele..." msgid "Output" msgstr "Ieşire" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/ru/firewall.po b/applications/luci-app-firewall/po/ru/firewall.po index 528756d7e3..a441c5a709 100644 --- a/applications/luci-app-firewall/po/ru/firewall.po +++ b/applications/luci-app-firewall/po/ru/firewall.po @@ -318,6 +318,9 @@ msgstr "Другое..." msgid "Output" msgstr "Исходящий трафик" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "Передаёт дополнительные аргументы таблице iptables. Используйте с " diff --git a/applications/luci-app-firewall/po/sk/firewall.po b/applications/luci-app-firewall/po/sk/firewall.po index a382bde7db..c6952faa35 100644 --- a/applications/luci-app-firewall/po/sk/firewall.po +++ b/applications/luci-app-firewall/po/sk/firewall.po @@ -296,6 +296,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/sv/firewall.po b/applications/luci-app-firewall/po/sv/firewall.po index d5f6a2d8a5..0301c25b5a 100644 --- a/applications/luci-app-firewall/po/sv/firewall.po +++ b/applications/luci-app-firewall/po/sv/firewall.po @@ -302,6 +302,9 @@ msgstr "Andra..." msgid "Output" msgstr "Utmatning" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/templates/firewall.pot b/applications/luci-app-firewall/po/templates/firewall.pot index 6ff4c3ca0f..d2691cc44a 100644 --- a/applications/luci-app-firewall/po/templates/firewall.pot +++ b/applications/luci-app-firewall/po/templates/firewall.pot @@ -289,6 +289,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/tr/firewall.po b/applications/luci-app-firewall/po/tr/firewall.po index 1dd1e6f9cf..9c5adb1cd2 100644 --- a/applications/luci-app-firewall/po/tr/firewall.po +++ b/applications/luci-app-firewall/po/tr/firewall.po @@ -296,6 +296,9 @@ msgstr "" msgid "Output" msgstr "" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/uk/firewall.po b/applications/luci-app-firewall/po/uk/firewall.po index 86ff65edf1..55c3ae8702 100644 --- a/applications/luci-app-firewall/po/uk/firewall.po +++ b/applications/luci-app-firewall/po/uk/firewall.po @@ -312,6 +312,9 @@ msgstr "Інше..." msgid "Output" msgstr "Вихідний" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" "Передача додаткових аргументів для IPTables. Використовуйте з обережністю!" diff --git a/applications/luci-app-firewall/po/vi/firewall.po b/applications/luci-app-firewall/po/vi/firewall.po index bd33afcd09..0eba33f760 100644 --- a/applications/luci-app-firewall/po/vi/firewall.po +++ b/applications/luci-app-firewall/po/vi/firewall.po @@ -306,6 +306,9 @@ msgstr "" msgid "Output" msgstr "Output" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "" diff --git a/applications/luci-app-firewall/po/zh-cn/firewall.po b/applications/luci-app-firewall/po/zh-cn/firewall.po index 46da547c08..df730a223e 100644 --- a/applications/luci-app-firewall/po/zh-cn/firewall.po +++ b/applications/luci-app-firewall/po/zh-cn/firewall.po @@ -301,6 +301,9 @@ msgstr "其它..." msgid "Output" msgstr "出站数据" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "传递到 iptables 的额外参数。小心使用!" diff --git a/applications/luci-app-firewall/po/zh-tw/firewall.po b/applications/luci-app-firewall/po/zh-tw/firewall.po index 1fbe970ddb..93af452d05 100644 --- a/applications/luci-app-firewall/po/zh-tw/firewall.po +++ b/applications/luci-app-firewall/po/zh-tw/firewall.po @@ -301,6 +301,9 @@ msgstr "其它..." msgid "Output" msgstr "出站資料" +msgid "Output zone" +msgstr "" + msgid "Passes additional arguments to iptables. Use with care!" msgstr "傳遞到 iptables 的額外引數。小心使用!" |