From 6b8235721a3bdf8b041e5370eef2e253e5874070 Mon Sep 17 00:00:00 2001 From: Rosy Song Date: Fri, 3 Aug 2018 12:16:39 +0800 Subject: [PATCH] luci-app-nft-qos: add new application This application is for nft-qos package. Signed-off-by: Rosy Song --- applications/luci-app-nft-qos/Makefile | 14 ++ .../luasrc/controller/nft-qos.lua | 51 ++++ .../luasrc/model/cbi/nft-qos/nft-qos.lua | 229 ++++++++++++++++++ .../luasrc/view/nft-qos/rate.htm | 167 +++++++++++++ .../luci-app-nft-qos/po/templates/nft-qos.pot | 161 ++++++++++++ .../luci-app-nft-qos/po/templates/zh_CN.mo | Bin 0 -> 3771 bytes .../luci-app-nft-qos/po/templates/zh_CN.po | 172 +++++++++++++ .../luci-app-nft-qos/po/zh-cn/nft-qos.po | 172 +++++++++++++ 8 files changed, 966 insertions(+) create mode 100644 applications/luci-app-nft-qos/Makefile create mode 100644 applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua create mode 100644 applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua create mode 100644 applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm create mode 100644 applications/luci-app-nft-qos/po/templates/nft-qos.pot create mode 100644 applications/luci-app-nft-qos/po/templates/zh_CN.mo create mode 100644 applications/luci-app-nft-qos/po/templates/zh_CN.po create mode 100644 applications/luci-app-nft-qos/po/zh-cn/nft-qos.po diff --git a/applications/luci-app-nft-qos/Makefile b/applications/luci-app-nft-qos/Makefile new file mode 100644 index 0000000000..01de879937 --- /dev/null +++ b/applications/luci-app-nft-qos/Makefile @@ -0,0 +1,14 @@ +# +# Copyright (C) 2008-2014 The LuCI Team +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=Qos over Nftables +LUCI_DEPENDS:=+nft-qos + +include ../../luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua new file mode 100644 index 0000000000..42043505dc --- /dev/null +++ b/applications/luci-app-nft-qos/luasrc/controller/nft-qos.lua @@ -0,0 +1,51 @@ +-- Copyright 2018 Rosy Song +-- Licensed to the public under the Apache License 2.0. + +module("luci.controller.nft-qos", package.seeall) + +function index() + if not nixio.fs.access("/etc/config/nft-qos") then + return + end + + entry({"admin", "status", "realtime", "rate"}, + template("nft-qos/rate"), _("Rate"), 5).leaf = true + entry({"admin", "status", "realtime", "rate_status"}, + call("action_rate")).leaf = true + entry({"admin", "services", "nft-qos"}, cbi("nft-qos/nft-qos"), + _("Qos over Nftables"), 60) +end + +function _action_rate(rv, n) + local c = io.popen("nft list chain inet nft-qos-monitor " .. n .. " 2>/dev/null") + if c then + for l in c:lines() do + local _, i, p, b = l:match('^%s+ip ([^%s]+) ([^%s]+) counter packets (%d+) bytes (%d+)') + if i and p and b then + -- handle expression + local r = { + rule = { + family = "inet", + table = "nft-qos-monitor", + chain = n, + handle = 0, + expr = { + { match = { right = i } }, + { counter = { packets = p, bytes = b } } + } + } + } + rv[#rv + 1] = r + end + end + c:close() + end +end + +function action_rate() + luci.http.prepare_content("application/json") + local data = { nftables = {} } + _action_rate(data.nftables, "upload") + _action_rate(data.nftables, "download") + luci.http.write_json(data) +end diff --git a/applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua b/applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua new file mode 100644 index 0000000000..61a6d76a7d --- /dev/null +++ b/applications/luci-app-nft-qos/luasrc/model/cbi/nft-qos/nft-qos.lua @@ -0,0 +1,229 @@ +-- Copyright 2018 Rosy Song +-- Licensed to the public under the Apache License 2.0. + +local uci = require("luci.model.uci").cursor() +local wa = require("luci.tools.webadmin") +local fs = require("nixio.fs") +local ipc = require("luci.ip") + +local def_rate_dl = uci:get("nft-qos", "default", "static_rate_dl") +local def_rate_ul = uci:get("nft-qos", "default", "static_rate_ul") +local def_unit_dl = uci:get("nft-qos", "default", "static_unit_dl") +local def_unit_ul = uci:get("nft-qos", "default", "static_unit_ul") + +local def_up = uci:get("nft-qos", "default", "dynamic_bw_up") +local def_down = uci:get("nft-qos", "default", "dynamic_bw_down") + +local limit_enable = uci:get("nft-qos", "default", "limit_enable") +local limit_type = uci:get("nft-qos", "default", "limit_type") +local enable_priority = uci:get("nft-qos", "default", "priority_enable") + +local has_ipv6 = fs.access("/proc/net/ipv6_route") + +m = Map("nft-qos", translate("Qos over Nftables")) + +-- +-- Taboptions +-- +s = m:section(TypedSection, "default", translate("NFT-QoS Settings")) +s.addremove = false +s.anonymous = true + +s:tab("limit", "Limit Rate") +s:tab("priority", "Traffic Priority") + +-- +-- Static +-- +o = s:taboption("limit", Flag, "limit_enable", translate("Limit Enable"), translate("Enable Limit Rate Feature")) +o.default = limit_enable or o.enabled +o.rmempty = false + +o = s:taboption("limit", ListValue, "limit_type", translate("Limit Type"), translate("Type of Limit Rate")) +o.default = limit_static or "static" +o:depends("limit_enable","1") +o:value("static", "Static") +o:value("dynamic", "Dynamic") + +o = s:taboption("limit", Value, "static_rate_dl", translate("Default Download Rate"), translate("Default value for download rate")) +o.datatype = "uinteger" +o.default = def_rate_dl or '50' +o:depends("limit_type","static") + +o = s:taboption("limit", ListValue, "static_unit_dl", translate("Default Download Unit"), translate("Default unit for download rate")) +o.default = def_unit_dl or "kbytes" +o:depends("limit_type","static") +o:value("bytes", "Bytes/s") +o:value("kbytes", "KBytes/s") +o:value("mbytes", "MBytes/s") + +o = s:taboption("limit", Value, "static_rate_ul", translate("Default Upload Rate"), translate("Default value for upload rate")) +o.datatype = "uinteger" +o.default = def_rate_ul or '50' +o:depends("limit_type","static") + +o = s:taboption("limit", ListValue, "static_unit_ul", translate("Default Upload Unit"), translate("Default unit for upload rate")) +o.default = def_unit_ul or "kbytes" +o:depends("limit_type","static") +o:value("bytes", "Bytes/s") +o:value("kbytes", "KBytes/s") +o:value("mbytes", "MBytes/s") + +-- +-- Dynamic +-- +o = s:taboption("limit", Value, "dynamic_bw_down", translate("Download Bandwidth (Mbps)"), translate("Default value for download bandwidth")) +o.default = def_up or '100' +o.datatype = "uinteger" +o:depends("limit_type","dynamic") + +o = s:taboption("limit", Value, "dynamic_bw_up", translate("Upload Bandwidth (Mbps)"), translate("Default value for upload bandwidth")) +o.default = def_down or '100' +o.datatype = "uinteger" +o:depends("limit_type","dynamic") + +o = s:taboption("limit", Value, "dynamic_cidr", translate("Target Network (IPv4/MASK)"), translate("Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc")) +o.datatype = "cidr4" +ipc.routes({ family = 4, type = 1 }, function(rt) o.default = rt.dest end) +o:depends("limit_type","dynamic") + +if has_ipv6 then + o = s:taboption("limit", Value, "dynamic_cidr6", translate("Target Network6 (IPv6/MASK)"), translate("Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc")) + o.datatype = "cidr6" + o:depends("limit_type","dynamic") +end + +o = s:taboption("limit", DynamicList, "limit_whitelist", translate("White List for Limit Rate")) +o.datatype = "ipaddr" +o:depends("limit_enable","1") + +-- +-- Priority +-- +o = s:taboption("priority", Flag, "priority_enable", translate("Enable Traffic Priority"), translate("Enable this feature")) +o.default = enable_priority or o.enabled +o.rmempty = false + +o = s:taboption("priority", ListValue, "priority_netdev", translate("Default Network Interface"), translate("Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc")) +o:depends("priority_enable", "1") +wa.cbi_add_networks(o) + +-- +-- Static Limit Rate - Download Rate +-- +if limit_enable == "1" and limit_type == "static" then + +x = m:section(TypedSection, "download", translate("Static QoS-Download Rate")) +x.anonymous = true +x.addremove = true +x.template = "cbi/tblsection" + +o = x:option(Value, "hostname", translate("Hostname")) +o.datatype = "hostname" +o.default = 'undefined' + +if has_ipv6 then + o = x:option(Value, "ipaddr", translate("IP Address(V4 / V6)")) +else + o = x:option(Value, "ipaddr", translate("IP Address(V4 Only)")) +end +o.datatype = "ipaddr" +if nixio.fs.access("/tmp/dhcp.leases") or nixio.fs.access("/var/dhcp6.leases") then + o.titleref = luci.dispatcher.build_url("admin", "status", "overview") +end + +o = x:option(Value, "macaddr", translate("MAC (optional)")) +o.rmempty = true +o.datatype = "macaddr" + +o = x:option(Value, "rate", translate("Rate")) +o.default = def_rate_dl or '50' +o.size = 4 +o.datatype = "uinteger" + +o = x:option(ListValue, "unit", translate("Unit")) +o.default = def_unit_dl or "kbytes" +o:value("bytes", "Bytes/s") +o:value("kbytes", "KBytes/s") +o:value("mbytes", "MBytes/s") + +-- +-- Static Limit Rate - Upload Rate +-- +y = m:section(TypedSection, "upload", translate("Static QoS-Upload Rate")) +y.anonymous = true +y.addremove = true +y.template = "cbi/tblsection" + +o = y:option(Value, "hostname", translate("Hostname")) +o.datatype = "hostname" +o.default = 'undefined' + +if has_ipv6 then + o = y:option(Value, "ipaddr", translate("IP Address(V4 / V6)")) +else + o = y:option(Value, "ipaddr", translate("IP Address(V4 Only)")) +end +o.datatype = "ipaddr" +if nixio.fs.access("/tmp/dhcp.leases") or nixio.fs.access("/var/dhcp6.leases") then + o.titleref = luci.dispatcher.build_url("admin", "status", "overview") +end + +o = y:option(Value, "macaddr", translate("MAC (optional)")) +o.rmempty = true +o.datatype = "macaddr" + +o = y:option(Value, "rate", translate("Rate")) +o.default = def_rate_ul or '50' +o.size = 4 +o.datatype = "uinteger" + +o = y:option(ListValue, "unit", translate("Unit")) +o.default = def_unit_ul or "kbytes" +o:value("bytes", "Bytes/s") +o:value("kbytes", "KBytes/s") +o:value("mbytes", "MBytes/s") + +end + +-- +-- Traffic Priority Settings +-- +if enable_priority == "1" then + +s = m:section(TypedSection, "priority", translate("Traffic Priority Settings")) +s.anonymous = true +s.addremove = true +s.template = "cbi/tblsection" + +o = s:option(ListValue, "protocol", translate("Protocol")) +o.default = "tcp" +o:value("tcp", "TCP") +o:value("udp", "UDP") +o:value("udplite", "UDP-Lite") +o:value("sctp", "SCTP") +o:value("dccp", "DCCP") + +o = s:option(ListValue, "priority", translate("Priority")) +o.default = "1" +o:value("-400", "1") +o:value("-300", "2") +o:value("-225", "3") +o:value("-200", "4") +o:value("-150", "5") +o:value("-100", "6") +o:value("0", "7") +o:value("50", "8") +o:value("100", "9") +o:value("225", "10") +o:value("300", "11") + +o = s:option(Value, "service", translate("Service"), translate("e.g. https, 23, (separator is comma)")) +o.default = '?' + +o = s:option(Value, "comment", translate("Comment")) +o.default = '?' + +end + +return m diff --git a/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm b/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm new file mode 100644 index 0000000000..5f9cb57d20 --- /dev/null +++ b/applications/luci-app-nft-qos/luasrc/view/nft-qos/rate.htm @@ -0,0 +1,167 @@ +<%# + Copyright 2018 Rosy Song + Licensed to the public under the Apache License 2.0. +-%> + +<%+header%> + + + +

<%:Realtime Rate%>

+ +
<%:This page gives an overview over currently download/upload rate.%>
+ +
+ <%:Realtime Download Rate%> +
+
+
+
<%:IP Address%>
+
<%:Download Rate%>
+
<%:Bytes Total%>
+
<%:Packets Total%>
+
+
+
+ <%:Collecting data...%> +
+
+
+
+
+ +
+ <%:Realtime Upload Rate%> +
+
+
+
<%:IP Address%>
+
<%:Upload Rate%>
+
<%:Bytes Total%>
+
<%:Packets Total%>
+
+
+
+ <%:Collecting data...%> +
+
+
+
+
+ +<%+footer%> diff --git a/applications/luci-app-nft-qos/po/templates/nft-qos.pot b/applications/luci-app-nft-qos/po/templates/nft-qos.pot new file mode 100644 index 0000000000..b6f105461a --- /dev/null +++ b/applications/luci-app-nft-qos/po/templates/nft-qos.pot @@ -0,0 +1,161 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "Bytes Total" +msgstr "" + +msgid "Collecting data..." +msgstr "" + +msgid "Comment" +msgstr "" + +msgid "Default Download Rate" +msgstr "" + +msgid "Default Download Unit" +msgstr "" + +msgid "Default Network Interface" +msgstr "" + +msgid "Default Upload Rate" +msgstr "" + +msgid "Default Upload Unit" +msgstr "" + +msgid "Default unit for download rate" +msgstr "" + +msgid "Default unit for upload rate" +msgstr "" + +msgid "Default value for download bandwidth" +msgstr "" + +msgid "Default value for download rate" +msgstr "" + +msgid "Default value for upload bandwidth" +msgstr "" + +msgid "Default value for upload rate" +msgstr "" + +msgid "Download Bandwidth (Mbps)" +msgstr "" + +msgid "Download Rate" +msgstr "" + +msgid "Dynamic Rate Limit" +msgstr "" + +msgid "Enable Limit Rate Feature" +msgstr "" + +msgid "Enable Traffic Priority" +msgstr "" + +msgid "Enable this feature" +msgstr "" + +msgid "Hostname" +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "Limit Enable" +msgstr "" + +msgid "Limit Type" +msgstr "" + +msgid "MAC (optional)" +msgstr "" + +msgid "MB" +msgstr "" + +msgid "NFT-QoS Settings" +msgstr "" + +msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc" +msgstr "" + +msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc" +msgstr "" + +msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc" +msgstr "" + +msgid "No information available" +msgstr "" + +msgid "Packets Total" +msgstr "" + +msgid "Priority" +msgstr "" + +msgid "Protocol" +msgstr "" + +msgid "Qos over Nftables" +msgstr "" + +msgid "Rate" +msgstr "" + +msgid "Rate Limit" +msgstr "" + +msgid "Realtime Rate" +msgstr "" + +msgid "Service" +msgstr "" + +msgid "Static QoS-Download Rate" +msgstr "" + +msgid "Static QoS-Upload Rate" +msgstr "" + +msgid "Target Network (IPv4/MASK)" +msgstr "" + +msgid "Target Network6 (IPv6/MASK)" +msgstr "" + +msgid "This page gives an overview over currently download/upload rate." +msgstr "" + +msgid "Traffic Priority" +msgstr "" + +msgid "Traffic Priority Settings" +msgstr "" + +msgid "Type of Limit Rate" +msgstr "" + +msgid "Unit" +msgstr "" + +msgid "Upload Bandwidth (Mbps)" +msgstr "" + +msgid "Upload Rate" +msgstr "" + +msgid "White List for Limit Rate" +msgstr "" + +msgid "e.g. https, 23, (separator is comma)" +msgstr "" + +msgid "kB" +msgstr "" diff --git a/applications/luci-app-nft-qos/po/templates/zh_CN.mo b/applications/luci-app-nft-qos/po/templates/zh_CN.mo new file mode 100644 index 0000000000000000000000000000000000000000..8021277956eb6732af0b7b76fafa5e6610cf3411 GIT binary patch literal 3771 zcma)+TWlOx8OIN8xfvQDrBEn^Lt0uJyt`i4EbfMg#<9~{je{FI5DBE}c=xP5WIVH) z8QZwx!A?`(QpYYhO6)jk+~(FGJ1Nb@vb|~FS|P+s-zpJac4l`ao}d!EAo2fZ&fe@0 zINCG6{m$h(-|d_`+aEZ=&|>J{LjTjJ7;6WAb3Z<4=N@3}3*ZvC9b5)K3%(CN41TD1 z2mA))Pr!%3ZJ!Rf1N=7R7)bgLf=_@J_#N;hxC6WeJ_ddalAeEo4}#l26P(LI8h;x6 zI@kfyITHLFI1JW+N5C(F(@I_dw?V!D-UnU>zYN|2+rSUOIJgZ?Jp;CbkASa$bp9ep z`mZRy3w{Oi1_)Q#pFukJBaqhL0r6vh!-w>I0)7pA5K6uYJ^?-o{sep$`~^t%EP~|U zGDva$03`h%gXHgDLCV8FL0WhJ=Yu#t29jSb;NQVEko<3kQKY90gp2Hul3xPJE=$SB z6wj*hcR;f5kBXiezYmAgzDE_C6gxo5LkgsGUj|_U8&~tMgH$J1K(gn3HUAL^SJ+=b z+UF_$1Ntq8$?YAa;VNO-6R}$Sxxa>E&xAZKK-?*MEj2=bbfllrF=oB+*6a#8h zOH{|y{QC=1JyR^G(Vf5*VYMWnQLMj*PC2CdU@gOrw0XDb2%YUQbzLSL&FJMx;fQcJ zjG_L1X*jG^ro@2m@K$rk&`pu#2ZSTHjvh3$^4k5<88WTIyxnl5l@f{a`h)4MI@DN| zh5@MKDbwP~;;~lcv8CyOKws75pwI_o_2wR7B!{%5(^oS5E{pz)5_QDAR8(0}G`OXB zCa>-2N!xX7Qv`<%(XS=^aPoaxKf>2$h#p-ALNLBp3TMEQ#hGqPq*B<^X=$dVIm5+q zr%$taO09j~v>m9Hti6-(P9`mB+sxO`1N}n2v^Xa3kzAzH`mov) zeWo!SjWvg(;f6?KQ$3G1gd4*R5TddFwRJaIJl=v9iDBm+w0Jxki8eN?ohH`|6j8q* z2e}v&nobdBog#5qI>q8IMYGc~9W!C->_yY&=Ag9r{**%-Y~~j|eN?IrNTEAgzYK0e zm$U{oRC$+!lM)>93son(VnS8BudrKKz0%>u5ZAVM4mL$Pc6Yr{$Ev4doaSQ1IZAh0 z^h(~V4dM<9!?$)&lS6^oi2=*P-PMOn*C$d@qG49dUdi*#1LgEnnQ${zQIyQTsLG8k zMPBLN&-*k#V0LhogCg`D_p7DPang1@Z+yC**V-~IEaBk7!?gsS9#O{*x8M=N3t~7S zvLenM`D-VV)`e#5zG;}}?Y9xhP zkva_R6Gra<0vGC*q91Zcdq-P&2THJ}bfP5;J0-19n~^Y+DDgON?$Ml@L!sxSA$?Qh zywj9Pyi-)KKZ0%>hSD~j93cbr0ZZtiy{JGt&W*G$+Pk7VdGL2v!_JaLasG1OOMCX$ zFn9T6e(H!fvhJO@#=PaX+{Me@+|9!2G05KZ3iIB*To|8Xh4oYUmGjxvWBE*`F!Dz3 z`1oCh-02h9%(R-wWnRy%FM7u>xHE5+)=p(N&TZOW9;)8HaJ2HYt#e!U1X|!r*&7+fjb!e|h&y{VaJDc%>rUKs zr{2iFl2H@hjnTsROm^dx`|3n)?UEYJzc-&1pa>cR z)k?^{v+kZf#&VNy=Vr%(Wwq`M4xX%fVDl@ta~Y)5Kh`^O-OaoS&vK_%ymRA~sjBDM z+sE9CN9ynKy1LiK@)t+lwYl8f<@}|i?!-K)^7CEZe$R(Cw>*g-`@a<3>)BO$ygw{? zi<92z>+bmln38>O$s4`Of(mwDdsS6;MX;x5@+&KNce_eYZfN>g;1y%E*BH447mUP1{sTZ$KTGK8?CFF zAB_30@TL{{s}~AOHwtIo^k!zWw@+u+#@x*B+{x+es$a~%eXY_A3dZUPN(v#!Uz$+q zF9%{%6{;c$s*G|P)Rww@>IDCSm5aZ^Ikj&-gPO%2R;;Ab%gbv~F@=$n?#wNBVyv(* I=fArD0gvwRfdBvi literal 0 HcmV?d00001 diff --git a/applications/luci-app-nft-qos/po/templates/zh_CN.po b/applications/luci-app-nft-qos/po/templates/zh_CN.po new file mode 100644 index 0000000000..6914e619f7 --- /dev/null +++ b/applications/luci-app-nft-qos/po/templates/zh_CN.po @@ -0,0 +1,172 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.7\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: zh_CN\n" + +msgid "Bytes Total" +msgstr "字节总数" + +msgid "Collecting data..." +msgstr "正在收集数据" + +msgid "Comment" +msgstr "注释" + +msgid "Default Download Rate" +msgstr "默认下载速率" + +msgid "Default Download Unit" +msgstr "默认下载速率单位" + +msgid "Default Network Interface" +msgstr "默认网络接口" + +msgid "Default Upload Rate" +msgstr "默认上传速率" + +msgid "Default Upload Unit" +msgstr "默认上传速率单位" + +msgid "Default unit for download rate" +msgstr "默认的下载速率单位" + +msgid "Default unit for upload rate" +msgstr "默认的上传速率单位" + +msgid "Default value for download bandwidth" +msgstr "下载带宽的默认值" + +msgid "Default value for download rate" +msgstr "下载速率的默认值" + +msgid "Default value for upload bandwidth" +msgstr "上传带宽的默认值" + +msgid "Default value for upload rate" +msgstr "上传速率的默认值" + +msgid "Download Bandwidth (Mbps)" +msgstr "下载带宽 (Mbps)" + +msgid "Download Rate" +msgstr "下载速率" + +msgid "Dynamic Rate Limit" +msgstr "动态QoS" + +msgid "Enable Limit Rate Feature" +msgstr "开启速率限制功能" + +msgid "Enable Traffic Priority" +msgstr "开启流量优先级" + +msgid "Enable this feature" +msgstr "开启这个功能" + +msgid "Hostname" +msgstr "主机名" + +msgid "IP Address" +msgstr "IP地址" + +msgid "Limit Enable" +msgstr "限速开启" + +msgid "Limit Type" +msgstr "限速类型" + +msgid "MAC (optional)" +msgstr "物理地址(可选)" + +msgid "MB" +msgstr "MB" + +msgid "NFT-QoS Settings" +msgstr "NFT-QoS 设置" + +msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc" +msgstr "流量整形的目标网络接口, 例如, br-lan, eth0.1, eth0, etc" + +msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc" +msgstr "将要应用规则的网络, 例如, 192.168.1.0/24, 10.2.0.0/16, 等等" + +msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc" +msgstr "将要应用规则的网络, 例如, AAAA::BBBB/64, CCCC::1/128, 等等" + +msgid "No information available" +msgstr "没有更多的信息" + +msgid "Packets Total" +msgstr "数据包总数" + +msgid "Priority" +msgstr "优先级" + +msgid "Protocol" +msgstr "协议" + +msgid "Qos over Nftables" +msgstr "QoS Nftables版" + +msgid "Rate" +msgstr "速率" + +msgid "Rate Limit" +msgstr "速率限制" + +msgid "Realtime Rate" +msgstr "实时速率显示" + +msgid "Service" +msgstr "服务/端口" + +msgid "Static QoS-Download Rate" +msgstr "静态QoS-下载速率" + +msgid "Static QoS-Upload Rate" +msgstr "静态QoS-上传速率" + +msgid "Target Network (IPv4/MASK)" +msgstr "目标网络(IPv4地址/掩码)" + +msgid "Target Network6 (IPv6/MASK)" +msgstr "目标网络v6(IPv6地址/掩码)" + +msgid "This page gives an overview over currently download/upload rate." +msgstr "该页面提供了当前上传和下载速率的一个总览" + +msgid "Traffic Priority" +msgstr "流量优先级" + +msgid "Traffic Priority Settings" +msgstr "流量优先级设置" + +msgid "Type of Limit Rate" +msgstr "限速的类型" + +msgid "Unit" +msgstr "单位" + +msgid "Upload Bandwidth (Mbps)" +msgstr "上传带宽 (Mbps)" + +msgid "Upload Rate" +msgstr "上传速率" + +msgid "White List for Limit Rate" +msgstr "限速白名单" + +msgid "e.g. https, 23, (separator is comma)" +msgstr "例如, https, 23 (用逗号分隔)" + +msgid "kB" +msgstr "kB" diff --git a/applications/luci-app-nft-qos/po/zh-cn/nft-qos.po b/applications/luci-app-nft-qos/po/zh-cn/nft-qos.po new file mode 100644 index 0000000000..b2e972c316 --- /dev/null +++ b/applications/luci-app-nft-qos/po/zh-cn/nft-qos.po @@ -0,0 +1,172 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.3\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: zh_CN\n" + +msgid "Bytes Total" +msgstr "字节总数" + +msgid "Collecting data..." +msgstr "正在收集数据" + +msgid "Comment" +msgstr "注释" + +msgid "Default Download Rate" +msgstr "默认下载速率" + +msgid "Default Download Unit" +msgstr "默认下载速率单位" + +msgid "Default Network Interface" +msgstr "默认网络接口" + +msgid "Default Upload Rate" +msgstr "默认上传速率" + +msgid "Default Upload Unit" +msgstr "默认上传速率单位" + +msgid "Default unit for download rate" +msgstr "默认的下载速率单位" + +msgid "Default unit for upload rate" +msgstr "默认的上传速率单位" + +msgid "Default value for download bandwidth" +msgstr "下载带宽的默认值" + +msgid "Default value for download rate" +msgstr "下载速率的默认值" + +msgid "Default value for upload bandwidth" +msgstr "上传带宽的默认值" + +msgid "Default value for upload rate" +msgstr "上传速率的默认值" + +msgid "Download Bandwidth (Mbps)" +msgstr "下载带宽 (Mbps)" + +msgid "Download Rate" +msgstr "下载速率" + +msgid "Dynamic Rate Limit" +msgstr "动态QoS" + +msgid "Enable Limit Rate Feature" +msgstr "开启速率限制功能" + +msgid "Enable Traffic Priority" +msgstr "开启流量优先级" + +msgid "Enable this feature" +msgstr "开启这个功能" + +msgid "Hostname" +msgstr "主机名" + +msgid "IP Address" +msgstr "IP地址" + +msgid "Limit Enable" +msgstr "限速开启" + +msgid "Limit Type" +msgstr "限速类型" + +msgid "MAC (optional)" +msgstr "物理地址(可选)" + +msgid "MB" +msgstr "MB" + +msgid "NFT-QoS Settings" +msgstr "NFT-QoS 设置" + +msgid "Network Interface for Traffic Shaping, e.g. br-lan, eth0.1, eth0, etc" +msgstr "流量整形的目标网络接口, 例如, br-lan, eth0.1, eth0, etc" + +msgid "Network to be apply, e.g. 192.168.1.0/24, 10.2.0.0/16, etc" +msgstr "将要应用规则的网络, 例如, 192.168.1.0/24, 10.2.0.0/16, 等等" + +msgid "Network to be apply, e.g. AAAA::BBBB/64, CCCC::1/128, etc" +msgstr "将要应用规则的网络, 例如, AAAA::BBBB/64, CCCC::1/128, 等等" + +msgid "No information available" +msgstr "没有更多的信息" + +msgid "Packets Total" +msgstr "数据包总数" + +msgid "Priority" +msgstr "优先级" + +msgid "Protocol" +msgstr "协议" + +msgid "Qos over Nftables" +msgstr "QoS Nftables版" + +msgid "Rate" +msgstr "速率" + +msgid "Rate Limit" +msgstr "速率限制" + +msgid "Realtime Rate" +msgstr "实时速率显示" + +msgid "Service" +msgstr "服务/端口" + +msgid "Static QoS-Download Rate" +msgstr "静态QoS-下载速率" + +msgid "Static QoS-Upload Rate" +msgstr "静态QoS-上传速率" + +msgid "Target Network (IPv4/MASK)" +msgstr "目标网络(IPv4地址/掩码)" + +msgid "Target Network6 (IPv6/MASK)" +msgstr "目标网络v6(IPv6地址/掩码)" + +msgid "This page gives an overview over currently download/upload rate." +msgstr "该页面提供了当前上传和下载速率的一个总览" + +msgid "Traffic Priority" +msgstr "流量优先级" + +msgid "Traffic Priority Settings" +msgstr "流量优先级设置" + +msgid "Type of Limit Rate" +msgstr "限速的类型" + +msgid "Unit" +msgstr "单位" + +msgid "Upload Bandwidth (Mbps)" +msgstr "上传带宽 (Mbps)" + +msgid "Upload Rate" +msgstr "上传速率" + +msgid "White List for Limit Rate" +msgstr "限速白名单" + +msgid "e.g. https, 23, (separator is comma)" +msgstr "例如, https, 23 (用逗号分隔)" + +msgid "kB" +msgstr "kB" -- 2.30.2