diff options
Diffstat (limited to 'applications')
5 files changed, 81 insertions, 76 deletions
diff --git a/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua b/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua index 096724f735..4358374440 100644 --- a/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua +++ b/applications/luci-app-fwknopd/luasrc/model/cbi/fwknopd.lua @@ -1,19 +1,19 @@ -- Copyright 2015 Jonathan Bennett <jbennett@incomsystems.biz> -- Licensed to the public under the GNU General Public License v2. - +tmp = 0 m = Map("fwknopd", translate("Firewall Knock Operator")) s = m:section(TypedSection, "global", translate("Enable Uci/Luci control")) -- Set uci control on or off s.anonymous=true s:option(Flag, "uci_enabled", translate("Enable config overwrite"), translate("When unchecked, the config files in /etc/fwknopd will be used as is, ignoring any settings here.")) -qr = s:option(DummyValue, "note0", "dummy") -qr.template = "fwknopd-qr" -qr:depends("uci_enabled", "1") s = m:section(TypedSection, "access", translate("access.conf stanzas")) -- set the access.conf settings s.anonymous=true s.addremove=true -s.dynamic=true +qr = s:option(DummyValue, "note0", "dummy") +qr.tmp = tmp +qr.template = "fwknopd-qr" +qr:depends("uci_enabled", "1") s:option(Value, "SOURCE", "SOURCE", translate("Use ANY for any source ip")) k1 = s:option(Value, "KEY", "KEY", translate("Define the symmetric key used for decrypting an incoming SPA packet that is encrypted by the fwknop client with Rijndael.")) k1:depends("keytype", translate("Normal Key")) @@ -40,15 +40,13 @@ s:option(Value, "REQUIRE_SOURCE_ADDRESS", "REQUIRE_SOURCE_ADDRESS", translate("F This makes it impossible to use the -s command line argument on the fwknop client command line, so either -R \ has to be used to automatically resolve the external address (if the client behind a NAT) or the client must \ know the external IP and set it via the -a argument.")) -s:option(DummyValue, "note1", translate("Enter custom access.conf variables below:")) s = m:section(TypedSection, "config", translate("fwknopd.conf config options")) s.anonymous=true -s.dynamic=true s:option(Value, "MAX_SPA_PACKET_AGE", "MAX_SPA_PACKET_AGE", translate("Maximum age in seconds that an SPA packet will be accepted. defaults to 120 seconds")) s:option(Value, "PCAP_INTF", "PCAP_INTF", translate("Specify the ethernet interface on which fwknopd will sniff packets.")) s:option(Value, "ENABLE_IPT_FORWARDING", "ENABLE_IPT_FORWARDING", translate("Allow SPA clients to request access to services through an iptables firewall instead of just to it.")) -s:option(DummyValue, "note2", translate("Enter custom fwknopd.conf variables below:")) +s:option(Value, "ENABLE_NAT_DNS", "ENABLE_NAT_DNS", translate("Allow SPA clients to request forwarding destination by DNS name.")) return m diff --git a/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm b/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm index 9e6e8185fa..5773f523e5 100644 --- a/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm +++ b/applications/luci-app-fwknopd/luasrc/view/fwknopd-qr.htm @@ -1 +1,2 @@ -<% print(luci.sys.exec("sh /usr/sbin/gen-qr.sh")) %> +<% print(luci.sys.exec("sh /usr/sbin/gen-qr.sh " .. self.tmp)) %> +<% self.tmp = self.tmp + 1 %> diff --git a/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd index 01b85de25f..65ef012450 100644 --- a/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd +++ b/applications/luci-app-fwknopd/root/etc/uci-defaults/40_luci-fwknopd @@ -16,6 +16,7 @@ uci set fwknopd.@access[0].hkeytype='Base 64 key' uci set fwknopd.@access[0].KEY_BASE64=`fwknopd --key-gen | awk '/^KEY/ {print $2;}'` uci set fwknopd.@access[0].HMAC_KEY_BASE64=`fwknopd --key-gen | awk '/^HMAC/ {print $2;}'` uci set fwknopd.@config[0].ENABLE_IPT_FORWARDING='y' +uci set fwknopd.@config[0].ENABLE_NAT_DNS='y' uci commit fwknopd rm -f /tmp/luci-indexcache diff --git a/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh b/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh index 97493dafed..abca5d3e5a 100644 --- a/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh +++ b/applications/luci-app-fwknopd/root/usr/sbin/gen-qr.sh @@ -1,9 +1,13 @@ #!/bin/sh +entry_num=0 +if [ "$1" != "" ]; then +entry_num=$1 +fi -key_base64=$(uci get fwknopd.@access[0].KEY_BASE64) -key=$(uci get fwknopd.@access[0].KEY) -hmac_key_base64=$(uci get fwknopd.@access[0].HMAC_KEY_BASE64) -hmac_key=$(uci get fwknopd.@access[0].HMAC_KEY) +key_base64=$(uci get fwknopd.@access[$entry_num].KEY_BASE64) +key=$(uci get fwknopd.@access[$entry_num].KEY) +hmac_key_base64=$(uci get fwknopd.@access[$entry_num].HMAC_KEY_BASE64) +hmac_key=$(uci get fwknopd.@access[$entry_num].HMAC_KEY) if [ $key_base64 != "" ]; then qr="KEY_BASE64:$key_base64" diff --git a/applications/luci-app-privoxy/po/zh-cn/privoxy.po b/applications/luci-app-privoxy/po/zh-cn/privoxy.po index 75d1a921cf..778422b8bb 100644 --- a/applications/luci-app-privoxy/po/zh-cn/privoxy.po +++ b/applications/luci-app-privoxy/po/zh-cn/privoxy.po @@ -2,14 +2,14 @@ msgid "" msgstr "" "Project-Id-Version: luci-app-privoxy\n" "POT-Creation-Date: 2015-06-10 20:16+0100\n" -"PO-Revision-Date: 2015-06-10 20:16+0100\n" +"PO-Revision-Date: 2017-01-05 18:01+0800\n" "Last-Translator: maz-1 <ohmygod19993 at gmail dotcom>\n" "Language-Team: \n" -"Language: zh-cn\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.8.11\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" @@ -21,10 +21,10 @@ msgstr "当用户试图访问不受信任的页面时,错误页面所显示的 msgid "" "A URL to documentation about the local Privoxy setup, configuration or " "policies." -msgstr "指向Privoxy安装、设置和规则说明文档的URL" +msgstr "指向 Privoxy 安装、设置和规则说明文档的 URL" msgid "A directory where Privoxy can create temporary files." -msgstr "Privoxy存放临时文件的目录。" +msgstr "Privoxy 存放临时文件的目录。" msgid "Access Control" msgstr "访问控制" @@ -36,18 +36,18 @@ msgid "An alternative directory where the templates are loaded from." msgstr "可选的目录,放在里面的模板会被加载。" msgid "An email address to reach the Privoxy administrator." -msgstr "用于联系privoxy管理员的邮箱地址。" +msgstr "用于联系 Privoxy 管理员的邮箱地址。" msgid "" "Assumed server-side keep-alive timeout (in seconds) if not specified by the " "server." -msgstr "当服务端没有指定超时时间时假定的超时时间(单位秒)。" +msgstr "当服务端没有指定超时时间时假定的超时时间(单位:秒)。" msgid "Boot delay" -msgstr "" +msgstr "启动延时" msgid "CGI user interface" -msgstr "CGI用户界面" +msgstr "CGI 用户界面" msgid "Common Log Format" msgstr "通用日志格式" @@ -57,14 +57,14 @@ msgid "" "proxies. Note that parent proxies can severely decrease your privacy level. " "Also specified here are SOCKS proxies." msgstr "" -"在这里设置http请求所经过的多重代理链。注意父级代理可能严重降低你的隐私安全" -"度。在这里还可以设置SOCKS代理。" +"在这里设置 HTTP 请求所经过的多重代理链。注意:父级代理可能严重降低你的隐私安" +"全度。在这里还可以设置 SOCKS 代理。" msgid "Debug GIF de-animation" msgstr "GIF动画日志" msgid "Debug force feature" -msgstr "force feature日志" +msgstr "Force feature 日志" msgid "Debug redirects" msgstr "重定向日志" @@ -73,7 +73,7 @@ msgid "Debug regular expression filters" msgstr "正则表达式日志" msgid "Delay (in seconds) during system boot before Privoxy start" -msgstr "" +msgstr "Privoxy 自启动延迟时间(单位:秒)" msgid "Directory does not exist!" msgstr "目录不存在!" @@ -82,20 +82,20 @@ msgid "Disabled == Transparent Proxy Mode" msgstr "禁用 == 透明代理模式" msgid "Documentation" -msgstr "" +msgstr "记录信息" msgid "During delay ifup-events are not monitored !" -msgstr "" +msgstr "在延迟期间无法检测到 ifup 事件!" msgid "Enable proxy authentication forwarding" msgstr "允许转发代理认证" msgid "" "Enable/Disable autostart of Privoxy on system startup and interface events" -msgstr "开启/关闭Privoxy在系统启动或者设置界面更改时自动启动。" +msgstr "开启/关闭 Privoxy 在系统启动或接口事件时自动启动。" msgid "Enable/Disable filtering when Privoxy starts." -msgstr "Privoxy启动时开启/关闭过滤。" +msgstr "Privoxy 启动时开启/关闭过滤。" msgid "Enabled" msgstr "已开启" @@ -103,10 +103,10 @@ msgstr "已开启" msgid "" "Enabling this option is NOT recommended if there is no parent proxy that " "requires authentication!" -msgstr "父级代理不需要认证时不推荐开启这个选项!" +msgstr "如果没有需要认证的父级代理时,不推荐开启这个选项!" msgid "File '%s' not found inside Configuration Directory" -msgstr "文件 '%s' 没有在设置目录中找到!" +msgstr "在设置目录中未找到文件 '%S'!" msgid "File not found or empty" msgstr "文件不存在或为空" @@ -115,7 +115,7 @@ msgid "Files and Directories" msgstr "文件和目录" msgid "For help use link at the relevant option" -msgstr "在相应选项下的连接可获取帮助。" +msgstr "点击相应选项的连接可获取帮助。" msgid "Forwarding" msgstr "转发" @@ -123,15 +123,15 @@ msgstr "转发" msgid "" "If enabled, Privoxy hides the 'go there anyway' link. The user obviously " "should not be able to bypass any blocks." -msgstr "如果启用,Privoxy会隐藏'go there anyway'链接。用户显然不应能绕过屏蔽。" +msgstr "如果启用,Privoxy 会隐藏 'go there anyway' 链接,用户就不能绕过屏蔽。" msgid "" "If you intend to operate Privoxy for more users than just yourself, it might " "be a good idea to let them know how to reach you, what you block and why you " "do that, your policies, etc." msgstr "" -"如果除了你还有其他用户通过privoxy连接,让他们知道如何联系你、什么内容被屏蔽" -"了、你为什么要这么做、你所制定的规范等等是一个好主意。" +"如果除了你还有其他用户使用 Privoxy 连接,最好让他们知道如何联系你,你屏蔽什" +"么,你为什么这样做,你的政策等等。" msgid "Invalid email address" msgstr "邮箱地址无效" @@ -140,29 +140,29 @@ msgid "It is NOT recommended for the casual user." msgstr "不推荐新手使用。" msgid "Location of the Privoxy User Manual." -msgstr "Privoxy用户手册位置" +msgstr "Privoxy 用户手册位置" msgid "Log File Viewer" msgstr "日志查看器" msgid "Log all data read from the network" -msgstr "记录所有从网络接收的数据" +msgstr "记录所有接收的网络数据" msgid "Log all data written to the network" -msgstr "记录所有发送给网络的数据" +msgstr "记录所有发送的网络数据" msgid "Log the applying actions" -msgstr "记录被应用的规则" +msgstr "记录配置保存动作" msgid "" "Log the destination for each request Privoxy let through. See also 'Debug " "1024'." -msgstr "记录Privoxy所允许的所有请求。另请参考'Debug 1024'。" +msgstr "记录 Privoxy 允许的所有请求。另请参考 'Debug 1024'。" msgid "" "Log the destination for requests Privoxy didn't let through, and the reason " "why." -msgstr "记录被Privoxy拒绝的请求目标以及拒绝原因。" +msgstr "记录 Privoxy 拒绝的请求目标以及拒绝原因。" msgid "Logging" msgstr "日志" @@ -198,40 +198,40 @@ msgid "Maximum number of client connections that will be served." msgstr "客户端数量上限。" msgid "Maximum size (in KB) of the buffer for content filtering." -msgstr "内容过滤的最大缓冲(单位KB)。" +msgstr "内容过滤的最大缓冲(单位:KB)。" msgid "Miscellaneous" msgstr "杂项" msgid "NOT installed" -msgstr "" +msgstr "未安装" msgid "No trailing '/', please." -msgstr "路径结尾不要加'/' ." +msgstr "路径结尾不要加 '/' 。" msgid "Non-fatal errors - *we highly recommended enabling this*" -msgstr "非致命性错误 - * 建议开启 *" +msgstr "非致命性错误 - * 强烈建议开启 *" msgid "" "Number of seconds after which a socket times out if no data is received." -msgstr "socket连接未收到数据的超时时间。" +msgstr "Socket 连接未收到数据的超时时间。" msgid "" "Number of seconds after which an open connection will no longer be reused." -msgstr "一个开放的连接不再重复使用的超时时间。" +msgstr "开放的连接不再重复使用的超时时间。" msgid "" "Only when using 'external filters', Privoxy has to create temporary files." -msgstr "只有使用外置规则时,privoxy才需要创建临时文件。" +msgstr "只有使用外置规则时,Privoxy 才需要创建临时文件。" msgid "Please install current version !" -msgstr "" +msgstr "请安装当前版本!" msgid "Please press [Read] button" -msgstr "请点击[读取]按钮" +msgstr "请点击 [读取] 按钮" msgid "Please read Privoxy manual for details!" -msgstr "请阅读Privoxy手册以了解详情!" +msgstr "请阅读 Privoxy 手册以了解详情!" msgid "Please update to the current version!" msgstr "请升级到当前版本!" @@ -244,16 +244,16 @@ msgid "" "configuration, help and logging. This section of the configuration file " "tells Privoxy where to find those other files." msgstr "" -"Privoxy可以使用其他一些文件用于附加设置,帮助和日志。这个区域用来告诉Privoxy" -"从哪里找到这些文件。" +"Privoxy 可以使用其他一些文件用于附加设置,帮助和日志。这个区域用来告诉 " +"Privoxy 从哪里找到这些文件。" msgid "" "Privoxy is a non-caching web proxy with advanced filtering capabilities for " "enhancing privacy, modifying web page data and HTTP headers, controlling " "access, and removing ads and other obnoxious Internet junk." msgstr "" -"Privoxy是一个无缓存的网络代理,具有高级过滤功能,能够修改网页数据和HTTP头,控" -"制访问,移除广告等。" +"Privoxy 是一个无缓存的网络代理,具有高级过滤功能,能够修改网页数据和 HTTP 请" +"求头,控制访问,移除广告等。" msgid "Read / Reread log file" msgstr "读取/刷新日志文件" @@ -265,13 +265,13 @@ msgid "Show each connection status" msgstr "显示每个连接的状态" msgid "Show header parsing" -msgstr "Show header parsing" +msgstr "显示请求头 解析" msgid "Software package '%s' is not installed." -msgstr "" +msgstr "软件包 '%s' 未安装" msgid "Software package '%s' is outdated." -msgstr "" +msgstr "软件包 '%s' 已过时" msgid "Start" msgstr "启动" @@ -289,7 +289,7 @@ msgid "Syntax:" msgstr "格式:" msgid "Syntax: Client header names delimited by spaces." -msgstr "格式: Client header names delimited by spaces." +msgstr "格式: 由空格分隔的客户端请求头名称。" msgid "Syntax: target_pattern http_parent[:port]" msgstr "格式: target_pattern http_parent[:port]" @@ -298,7 +298,7 @@ msgid "Syntax: target_pattern socks_proxy[:port] http_parent[:port]" msgstr "格式: target_pattern socks_proxy[:port] http_parent[:port]" msgid "System" -msgstr "" +msgstr "系统" msgid "" "The actions file(s) to use. Multiple actionsfile lines are permitted, and " @@ -307,12 +307,12 @@ msgstr "所使用的规则文件。允许并且推荐使用多个规则文件。 msgid "" "The address and TCP port on which Privoxy will listen for client requests." -msgstr "Privoxy接收客户端请求时监听的地址和TCP端口。" +msgstr "Privoxy 接收客户端请求时监听的地址和 TCP 端口。" msgid "" "The compression level that is passed to the zlib library when compressing " "buffered content." -msgstr "使用zlib压缩缓冲内容时的压缩级别。" +msgstr "使用 zlib 压缩缓冲内容时的压缩级别。" msgid "" "The directory where all logging takes place (i.e. where the logfile is " @@ -334,14 +334,14 @@ msgid "The log file to use. File name, relative to log directory." msgstr "日志文件名称,与日志路径相对。" msgid "The order in which client headers are sorted before forwarding them." -msgstr "转发数据前,client headers的排序。" +msgstr "转发数据前,客户端请求头的排序。" msgid "" "The status code Privoxy returns for pages blocked with +handle-as-empty-" "document." msgstr "" -"当页面因为handle-as-empty-document规则被阻止时返回的状态码(选上为200 OK,不" -"选上为403 Forbidden)" +"当页面因为 handle-as-empty-document 规则被阻止时返回的状态码(选上为 200 OK," +"不选上为 403 Forbidden)" msgid "" "The trust mechanism is an experimental feature for building white-lists and " @@ -361,19 +361,20 @@ msgstr "这个选项仅用于调试,开启后会极大地降低性能。" msgid "" "This option will be removed in future releases as it has been obsoleted by " "the more general header taggers." -msgstr "这个选项在以后的版本中将被移除,因为它被header taggers所取代了。" +msgstr "这个选项在以后的版本中将被移除,因为它被 header taggers 所取代了。" msgid "" "This tab controls the security-relevant aspects of Privoxy's configuration." -msgstr "这个标签用于设置与安全相关的Privoxy选项。" +msgstr "这个标签用于设置与安全相关的 Privoxy 选项。" msgid "" "Through which SOCKS proxy (and optionally to which parent HTTP proxy) " "specific requests should be routed." -msgstr "指定的请求应该通过哪一个SOCKS代理(并且通过哪一个HTTP父代理,可选)" +msgstr "" +"指定的请求应该通过哪一个 SOCKS 代理(并且通过哪一个 HTTP 父代理,可选)" msgid "To which parent HTTP proxy specific requests should be routed." -msgstr "请求应转发至哪一个父级HTTP代理。" +msgstr "请求应转发至哪一个父级 HTTP 代理。" msgid "User customizations" msgstr "用户自定义" @@ -382,10 +383,10 @@ msgid "Value is not a number" msgstr "输入值不是数字" msgid "Value not between 0 and 300" -msgstr "" +msgstr "输入值不在0和300之间" msgid "Value not between 0 and 9" -msgstr "输入值不在0和9之间。" +msgstr "输入值不在0和9之间" msgid "Value not between 1 and 4096" msgstr "输入值不在1和4096之间" @@ -408,7 +409,7 @@ msgstr "被拦截的请求是否应被当作有效的。" msgid "" "Whether or not Privoxy recognizes special HTTP headers to change toggle " "state." -msgstr "Privoxy是否识别特殊的HTTP头以切换状态。" +msgstr "Privoxy 是否识别特殊的 HTTP 请求头以切换状态。" msgid "Whether or not buffered content is compressed before delivery." msgstr "缓冲内容在传递之前是否压缩。" @@ -422,7 +423,7 @@ msgid "Whether or not pipelined requests should be served." msgstr "是否处理管道化的请求。" msgid "Whether or not proxy authentication through Privoxy should work." -msgstr "是否可以通过Privoxy进行代理验证。" +msgstr "是否可以通过 Privoxy 进行代理验证。" msgid "Whether or not the web-based actions file editor may be used." msgstr "是否使用基于网页的规则编辑器。" @@ -431,11 +432,11 @@ msgid "Whether or not the web-based toggle feature may be used." msgstr "是否启用基于网页的切换功能。" msgid "Whether requests to Privoxy's CGI pages can be blocked or redirected." -msgstr "访问Privoxy CGI页面的请求是否可以被拦截或重定向。" +msgstr "访问 Privoxy CGI 页面的请求是否可以被拦截或重定向。" msgid "" "Whether the CGI interface should stay compatible with broken HTTP clients." -msgstr "CGI界面是否应兼容过时的HTTP客户端。" +msgstr "CGI 界面是否应兼容过时的HTTP客户端。" msgid "Whether to run only one server thread." msgstr "是否只运行一个服务线程。" |