diff options
9 files changed, 213 insertions, 100 deletions
diff --git a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua index 602076ce0e..7ab84ab7fa 100644 --- a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua +++ b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua @@ -22,6 +22,12 @@ if not fs.access(res_input) then luci.sys.call("env -i /bin/uclient-fetch --no-check-certificate -O " .. res_input .. " " .. url .. " >/dev/null 2>&1") end +if not uci:get_first("dnscrypt-proxy", "global") then + uci:add("dnscrypt-proxy", "global") + uci:save("dnscrypt-proxy") + uci:commit("dnscrypt-proxy") +end + for line in io.lines(res_input) do local name = line:match("^[%w_.-]*") res_list[#res_list + 1] = { name = name } @@ -39,8 +45,6 @@ function m.on_after_commit(self) luci.sys.call("env -i /etc/init.d/dnscrypt-proxy restart >/dev/null 2>&1") end --- Trigger selection - s = m:section(TypedSection, "global", translate("General options")) s.anonymous = true @@ -83,6 +87,26 @@ if dump then end t.rmempty = true +-- Extra options + +ds = s:option(DummyValue, "_dummy", translate("Extra options"), + translate("Options for further tweaking in case the defaults are not suitable for you.")) +ds.template = "cbi/nullsection" + +btn = s:option(Button, "", translate("Create custom config file"), + translate("Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS upstream timeouts with multiple DNSCrypt instances. ") + .. translatef("For further information " + .. "<a href=\"%s\" target=\"_blank\">" + .. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt")) +btn.inputtitle = translate("Create Config File") +btn.inputstyle = "apply" +btn.disabled = false +function btn.write(self, section, value) + if not fs.access("/etc/resolv-crypt.conf") then + luci.sys.call("env -i echo 'options timeout:1' > '/etc/resolv-crypt.conf'") + end +end + -- Mandatory options per instance s = m:section(TypedSection, "dnscrypt-proxy", translate("Instance options")) @@ -90,8 +114,7 @@ s.anonymous = true s.addremove = true o1 = s:option(Value, "address", translate("IP Address"), - translate("The local IP address.")) -o1.datatype = "ip4addr" + translate("The local IPv4 or IPv6 address. The latter one should be specified within brackets, e.g. '[::1]'.")) o1.default = address or "127.0.0.1" o1.rmempty = false diff --git a/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po b/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po index 9008d89540..0328df2279 100644 --- a/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po +++ b/applications/luci-app-dnscrypt-proxy/po/ja/dnscrypt-proxy.po @@ -34,6 +34,20 @@ msgstr "" msgid "Configuration of the DNSCrypt-Proxy package." msgstr "DNSCrypt-Proxy パッケージの設定です。" +msgid "" +"Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS " +"upstream timeouts with multiple DNSCrypt instances." +msgstr "" +"複数の DNSCrypt インスタンスで DNS アップストリーム タイムアウトの設定値を共" +"用するため、 'options timeout:1' を含めた '/etc/resolv-crypt.conf' を作成しま" +"す。" + +msgid "Create Config File" +msgstr "設定ファイルの作成" + +msgid "Create custom config file" +msgstr "カスタム設定ファイルの作成" + msgid "DNS Query Logfile" msgstr "DNS クエリ ログファイル" @@ -64,6 +78,9 @@ msgstr "DNSCrypt-Proxy の高速化のため、キャッシュ機能を有効化 msgid "Ephemeral Keys" msgstr "一時的なキー" +msgid "Extra options" +msgstr "拡張オプション" + msgid "File Checksum" msgstr "ファイル チェックサム" @@ -115,6 +132,10 @@ msgstr "" msgid "Name of the remote DNS service for resolving queries." msgstr "クエリの名前解決を行う、リモートの DNS サービス名です。" +msgid "" +"Options for further tweaking in case the defaults are not suitable for you." +msgstr "デフォルト設定が適切でない場合、追加で設定するためのオプションです。" + msgid "Overview" msgstr "概要" @@ -149,8 +170,12 @@ msgstr "スタートアップ トリガ" msgid "The listening port for DNS queries." msgstr "DNS クエリを待ち受けるポートです。" -msgid "The local IP address." -msgstr "ローカル IP アドレスです。" +msgid "" +"The local IPv4 or IPv6 address. The latter one should be specified within " +"brackets, e.g. '[::1]'." +msgstr "" +"ローカルの IPv4 または IPv6 アドレスです。 IPv6 アドレスの場合、ブラケット " +"\"[ ]\" を含めて記述される必要があります(例: '[::1]')。" msgid "" "The value for this property is the blocklist type and path to the file, e." diff --git a/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot b/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot index 98e6526b41..ea83e7a184 100644 --- a/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot +++ b/applications/luci-app-dnscrypt-proxy/po/templates/dnscrypt-proxy.pot @@ -21,6 +21,17 @@ msgstr "" msgid "Configuration of the DNSCrypt-Proxy package." msgstr "" +msgid "" +"Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS " +"upstream timeouts with multiple DNSCrypt instances." +msgstr "" + +msgid "Create Config File" +msgstr "" + +msgid "Create custom config file" +msgstr "" + msgid "DNS Query Logfile" msgstr "" @@ -51,6 +62,9 @@ msgstr "" msgid "Ephemeral Keys" msgstr "" +msgid "Extra options" +msgstr "" + msgid "File Checksum" msgstr "" @@ -95,6 +109,10 @@ msgstr "" msgid "Name of the remote DNS service for resolving queries." msgstr "" +msgid "" +"Options for further tweaking in case the defaults are not suitable for you." +msgstr "" + msgid "Overview" msgstr "" @@ -127,7 +145,9 @@ msgstr "" msgid "The listening port for DNS queries." msgstr "" -msgid "The local IP address." +msgid "" +"The local IPv4 or IPv6 address. The latter one should be specified within " +"brackets, e.g. '[::1]'." msgstr "" msgid "" diff --git a/applications/luci-app-mwan3/po/ja/mwan3.po b/applications/luci-app-mwan3/po/ja/mwan3.po index 89fa5ea02d..72c5dddab9 100644 --- a/applications/luci-app-mwan3/po/ja/mwan3.po +++ b/applications/luci-app-mwan3/po/ja/mwan3.po @@ -88,6 +88,9 @@ msgstr "" msgid "Enabled" msgstr "有効" +msgid "Enter value in hex, starting with <code>0x</code>" +msgstr "<code>0x</code> で始まる16進数の値を入力してください。" + msgid "Error collecting troubleshooting information" msgstr "トラブルシューティング情報の収集エラー" @@ -95,11 +98,14 @@ msgid "Errors" msgstr "エラー" msgid "Expect interface state on up event" -msgstr "" +msgstr "Up イベント時に予想されるインターフェースの状態です。" msgid "Failure interval" msgstr "障害検出 インターバル" +msgid "Firewall mask" +msgstr "ファイアウォール マスク" + msgid "Flush conntrack table" msgstr "" @@ -107,10 +113,10 @@ msgid "Flush global firewall conntrack table on interface events" msgstr "" msgid "Globals" -msgstr "" +msgstr "全般" msgid "Globals mwan3 options" -msgstr "" +msgstr "MWAN3 全般オプション" msgid "Hotplug Script" msgstr "ホットプラグ スクリプト" @@ -131,7 +137,7 @@ msgid "IPv6" msgstr "IPv6" msgid "Initial state" -msgstr "" +msgstr "初期状態" msgid "Interface" msgstr "インターフェース" @@ -299,7 +305,7 @@ msgid "Offline" msgstr "オフライン" msgid "Online" -msgstr "" +msgstr "オンライン" msgid "Online (tracking active)" msgstr "オンライン(追跡実行中)" @@ -320,7 +326,7 @@ msgid "Ping interval" msgstr "Ping インターバル" msgid "Ping interval during failure detection" -msgstr "障害検出動作中の Ping 実行間隔です。" +msgstr "障害検出中の Ping 実行間隔です。" msgid "Ping interval during failure recovering" msgstr "障害復旧中の Ping 実行間隔です。" @@ -370,12 +376,6 @@ msgstr "障害復旧 インターバル" msgid "Restart MWAN" msgstr "MWAN の再起動" -msgid "Restore default hotplug script" -msgstr "デフォルトのホットプラグ スクリプトの復元" - -msgid "Restore..." -msgstr "復元..." - msgid "Rule" msgstr "ルール" @@ -443,6 +443,31 @@ msgstr "" "に対して Ping の送信が行われます。常にオンラインとする場合、空欄のままにしま" "す。" +msgid "" +"This section allows you to modify the content of \"/etc/mwan3.user\".<br /" +">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This " +"file is interpreted as a shell script.<br />The first line of the script " +"must be "#!/bin/sh" without quotes.<br />Lines beginning with # are " +"comments and are not executed.<br />Put your custom mwan3 action here, they " +"will<br />be executed with each netifd hotplug interface event<br />on " +"interfaces for which mwan3 is enabled.<br /><br />There are three main " +"environment variables that are passed to this script.<br /><br />$ACTION " +"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which " +"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name " +"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />" +msgstr "" +"このセクションでは、 \"/etc/mwan3.user\" の内容を変更することができます。" +"<br />このファイルは、 sysupgrade 時に保持されます。<br /><br />注意: <br />" +"このファイルは、シェルスクリプトとして解釈されます。<br />スクリプトの1行目" +"は、"#!bin/sh" である必要があります(クォーテーション不要)。<br /># " +"で始まる行はコメントであり、実行されません。<br />mwan3 のカスタム動作をここ" +"に入力してください。これらは、 mwan3 が有効なインターフェースの<br />netifd " +"ホットプラグ インターフェース イベント毎に実行されます。<br /><br />主に3つの" +"環境変数が利用可能です。<br /><br />$ACTION - \"ifup\" および \"ifdown\"<br /" +">$INTERFACE - Up または Down が行われたインターフェース名(例: \"wan\" や " +"\"wwan\")<br />$DEVICE - Up または Down が行われた物理デバイス名(例: " +"\"eth0\" や \"wwan0\")<br /><br />" + msgid "This section allows you to modify the contents of /etc/config/mwan3" msgstr "" "このセクションでは、 /etc/config/mwan3 の内容を変更することができます。" @@ -455,32 +480,15 @@ msgid "This section allows you to modify the contents of /etc/config/wireless" msgstr "" "このセクションでは、 /etc/config/wireless の内容を変更することができます。" -msgid "" -"This section allows you to modify the contents of /etc/hotplug.d/iface/16-" -"mwancustom<br />This is useful for running system commands and/or scripts " -"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The " -"first line of the script must be "#!/bin/sh" without quotes<br /" -">Lines beginning with # are comments and are not executed<br /><br /" -">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />" -"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the " -"device name attached to the interface (eth0.1, eth1, etc.)" -msgstr "" -"このセクションでは、 /etc/hotplug.d/iface/16-mwancustom の内容を変更すること" -"ができます。<br />これは、インターフェースの ifup または ifdown ホットプラグ " -"イベント時にシステムコマンドまたはスクリプト、もしくはその両方を実行すること" -"に役立ちます。<br /><br />注意:<br />スクリプトの1行目は、"#!bin/sh" " -"である必要があります(クオーテーション不要)。<br /># で始まる行はコメントと" -"して認識され、実行されません。<br /><br />利用可能な変数:<br />$ACTION - ホッ" -"トプラグ イベント (ifup, ifdown)<br />$INTERFACE - インターフェース名(wan1, " -"wan2, その他)<br />$DEVICE - インターフェースにアタッチされたデバイスの名前" -"(eth0.1, eth1, その他)" - msgid "Tracking IP" msgstr "追跡 IP" msgid "Tracking hostname or IP address" msgstr "追跡ホスト名または IP アドレス" +msgid "Tracking method" +msgstr "追跡方式" + msgid "Tracking reliability" msgstr "追跡の信頼性" @@ -505,6 +513,8 @@ msgid "" "Use the IP address of this interface as source IP address for traffic " "initiated by the router itself" msgstr "" +"ルーター自身によって発生するトラフィックのアクセス元 IP アドレスとして、この" +"インターフェースの IP アドレスが使用されます。" msgid "View the contents of /etc/protocols for protocol descriptions" msgstr "プロトコルの説明については、 /etc/protocols の内容を確認してください。" @@ -653,10 +663,3 @@ msgstr "停止" msgid "unreachable (reject)" msgstr "unreachable (reject)" - -#~ msgid "" -#~ "This IP address will be pinged to dermine if the link is up or down. " -#~ "Leave blank to assume interface is always online" -#~ msgstr "" -#~ "これらは、リンクの Up または Down を判定するために Ping が送信されるIP ア" -#~ "ドレスです。常にオンラインとする場合、空欄のままにします。" diff --git a/applications/luci-app-mwan3/po/templates/mwan3.pot b/applications/luci-app-mwan3/po/templates/mwan3.pot index 9e17c3d040..e63d8adc2e 100644 --- a/applications/luci-app-mwan3/po/templates/mwan3.pot +++ b/applications/luci-app-mwan3/po/templates/mwan3.pot @@ -73,6 +73,9 @@ msgstr "" msgid "Enabled" msgstr "" +msgid "Enter value in hex, starting with <code>0x</code>" +msgstr "" + msgid "Error collecting troubleshooting information" msgstr "" @@ -85,6 +88,9 @@ msgstr "" msgid "Failure interval" msgstr "" +msgid "Firewall mask" +msgstr "" + msgid "Flush conntrack table" msgstr "" @@ -330,12 +336,6 @@ msgstr "" msgid "Restart MWAN" msgstr "" -msgid "Restore default hotplug script" -msgstr "" - -msgid "Restore..." -msgstr "" - msgid "Rule" msgstr "" @@ -389,6 +389,20 @@ msgid "" "down. Leave blank to assume interface is always online" msgstr "" +msgid "" +"This section allows you to modify the content of \"/etc/mwan3.user\".<br /" +">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This " +"file is interpreted as a shell script.<br />The first line of the script " +"must be "#!/bin/sh" without quotes.<br />Lines beginning with # are " +"comments and are not executed.<br />Put your custom mwan3 action here, they " +"will<br />be executed with each netifd hotplug interface event<br />on " +"interfaces for which mwan3 is enabled.<br /><br />There are three main " +"environment variables that are passed to this script.<br /><br />$ACTION " +"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which " +"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name " +"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />" +msgstr "" + msgid "This section allows you to modify the contents of /etc/config/mwan3" msgstr "" @@ -398,17 +412,6 @@ msgstr "" msgid "This section allows you to modify the contents of /etc/config/wireless" msgstr "" -msgid "" -"This section allows you to modify the contents of /etc/hotplug.d/iface/16-" -"mwancustom<br />This is useful for running system commands and/or scripts " -"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The " -"first line of the script must be "#!/bin/sh" without quotes<br /" -">Lines beginning with # are comments and are not executed<br /><br /" -">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />" -"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the " -"device name attached to the interface (eth0.1, eth1, etc.)" -msgstr "" - msgid "Tracking IP" msgstr "" diff --git a/applications/luci-app-mwan3/po/zh-cn/mwan3.po b/applications/luci-app-mwan3/po/zh-cn/mwan3.po index 3c505d8477..b133e8b1d9 100644 --- a/applications/luci-app-mwan3/po/zh-cn/mwan3.po +++ b/applications/luci-app-mwan3/po/zh-cn/mwan3.po @@ -76,6 +76,9 @@ msgstr "当 Ping 成功次数达到这个数值后,已经被认为离线的接 msgid "Enabled" msgstr "启用" +msgid "Enter value in hex, starting with <code>0x</code>" +msgstr "" + msgid "Error collecting troubleshooting information" msgstr "收集故障排除信息时出错" @@ -88,6 +91,9 @@ msgstr "" msgid "Failure interval" msgstr "故障检测间隔" +msgid "Firewall mask" +msgstr "" + msgid "Flush conntrack table" msgstr "刷新连接跟踪表" @@ -350,12 +356,6 @@ msgstr "故障恢复间隔" msgid "Restart MWAN" msgstr "重启 MWAN" -msgid "Restore default hotplug script" -msgstr "恢复默认的 hotplug 脚本" - -msgid "Restore..." -msgstr "恢复..." - msgid "Rule" msgstr "规则" @@ -416,6 +416,20 @@ msgid "" "down. Leave blank to assume interface is always online" msgstr "通过 ping 此主机或 IP 地址来确定链路是否在线。留空则认为接口始终在线" +msgid "" +"This section allows you to modify the content of \"/etc/mwan3.user\".<br /" +">The file is also preserved during sysupgrade.<br /><br />Notes:<br />This " +"file is interpreted as a shell script.<br />The first line of the script " +"must be "#!/bin/sh" without quotes.<br />Lines beginning with # are " +"comments and are not executed.<br />Put your custom mwan3 action here, they " +"will<br />be executed with each netifd hotplug interface event<br />on " +"interfaces for which mwan3 is enabled.<br /><br />There are three main " +"environment variables that are passed to this script.<br /><br />$ACTION " +"Either \"ifup\" or \"ifdown\"<br />$INTERFACE Name of the interface which " +"went up or down (e.g. \"wan\" or \"wwan\")<br />$DEVICE Physical device name " +"which interface went up or down (e.g. \"eth0\" or \"wwan0\")<br /><br />" +msgstr "" + msgid "This section allows you to modify the contents of /etc/config/mwan3" msgstr "这里允许你修改 /etc/config/mwan3 的内容" @@ -425,29 +439,15 @@ msgstr "这里允许你修改 /etc/config/network 的内容" msgid "This section allows you to modify the contents of /etc/config/wireless" msgstr "这里允许你修改 /etc/config/wireless 的内容" -msgid "" -"This section allows you to modify the contents of /etc/hotplug.d/iface/16-" -"mwancustom<br />This is useful for running system commands and/or scripts " -"based on interface ifup or ifdown hotplug events<br /><br />Notes:<br />The " -"first line of the script must be "#!/bin/sh" without quotes<br /" -">Lines beginning with # are comments and are not executed<br /><br /" -">Available variables:<br />$ACTION is the hotplug event (ifup, ifdown)<br />" -"$INTERFACE is the interface name (wan1, wan2, etc.)<br />$DEVICE is the " -"device name attached to the interface (eth0.1, eth1, etc.)" -msgstr "" -"这里允许你修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接口 " -"ifup 或 ifdown Hotplug 事件时运行系统命令或脚本<br /><br />注意:<br />脚本的" -"第一行必须是 "#!/bin/sh" 不含引号<br />以#开头的行是注释,不会执行" -"<br /><br />可用变量:<br />$ACTION 是 Hotplug 事件(ifup, ifdown)<br />" -"$INTERFACE 是接口名称(wan1、wan2 等)<br />$DEVICE 是连接到接口的设备名称 " -"(eth0.1、eth1 等)" - msgid "Tracking IP" msgstr "追踪的 IP" msgid "Tracking hostname or IP address" msgstr "追踪的主机或 IP 地址" +msgid "Tracking method" +msgstr "" + msgid "Tracking reliability" msgstr "追踪可靠性" @@ -590,3 +590,26 @@ msgstr "" msgid "unreachable (reject)" msgstr "不可达(拒绝)" + +#~ msgid "Restore default hotplug script" +#~ msgstr "恢复默认的 hotplug 脚本" + +#~ msgid "Restore..." +#~ msgstr "恢复..." + +#~ msgid "" +#~ "This section allows you to modify the contents of /etc/hotplug.d/iface/16-" +#~ "mwancustom<br />This is useful for running system commands and/or scripts " +#~ "based on interface ifup or ifdown hotplug events<br /><br />Notes:<br /" +#~ ">The first line of the script must be "#!/bin/sh" without " +#~ "quotes<br />Lines beginning with # are comments and are not executed<br /" +#~ "><br />Available variables:<br />$ACTION is the hotplug event (ifup, " +#~ "ifdown)<br />$INTERFACE is the interface name (wan1, wan2, etc.)<br />" +#~ "$DEVICE is the device name attached to the interface (eth0.1, eth1, etc.)" +#~ msgstr "" +#~ "这里允许你修改 /etc/hotplug.d/iface/16-mwancustom 的内容<br />这可以在接" +#~ "口 ifup 或 ifdown Hotplug 事件时运行系统命令或脚本<br /><br />注意:<br />" +#~ "脚本的第一行必须是 "#!/bin/sh" 不含引号<br />以#开头的行是注释," +#~ "不会执行<br /><br />可用变量:<br />$ACTION 是 Hotplug 事件(ifup, ifdown)" +#~ "<br />$INTERFACE 是接口名称(wan1、wan2 等)<br />$DEVICE 是连接到接口的设" +#~ "备名称 (eth0.1、eth1 等)" diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua index 5df59cb0ad..9985790174 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua @@ -19,7 +19,7 @@ m = Map("shadowsocks-libev", local sdata = m:get('ss_rules') if not sdata then m:set('ss_rules', nil, 'ss_rules') - m:set('ss_rules', 'ss_rules', 'disabled', true) + m:set('ss_rules', 'disabled', true) end s = m:section(NamedSection, "ss_rules", "ss_rules") @@ -39,8 +39,12 @@ ss.values_redir(o, 'udp') o = s:taboption('general', ListValue, "local_default", translate("Local-out default"), - translate("Default action for locally generated packets")) + translate("Default action for locally generated TCP packets")) ss.values_actions(o) +o = s:taboption('general', DynamicList, "ifnames", + translate("Ingress interfaces"), + translate("Only apply rules on packets from these network interfaces")) +ss.values_ifnames(o) s:taboption('general', Value, "ipt_args", translate("Extra arguments"), translate("Passes additional arguments to iptables. Use with care!")) @@ -74,5 +78,9 @@ s:taboption('dstip', FileBrowser, "dst_ips_forward_file", translate("Dst ip forward file"), translate("File containing ip addresses for the purposes as with <em>Dst ip forward</em>")) o.datatype = "file" +o = s:taboption('dstip', ListValue, "dst_default", + translate("Dst default"), + translate("Default action for packets whose destination addresses do not match any of the destination ip list")) +ss.values_actions(o) return m diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua index 6608ee8d35..650ff6356e 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -14,8 +14,10 @@ module("luci.model.shadowsocks-libev", function(m) end) function values_actions(o) - for _, a in ipairs(actions) do - o:value(a) + o:value("bypass") + o:value("forward") + if o.option ~= "dst_default" then + o:value("checkdst") end end @@ -43,7 +45,6 @@ function values_serverlist(o) end function values_ipaddr(o) - local keys, vals = {}, {} for _, v in ipairs(nw:get_interfaces()) do for _, a in ipairs(v:ipaddrs()) do o:value(a:host():string(), '%s (%s)' %{ a:host(), v:shortname() }) @@ -51,6 +52,14 @@ function values_ipaddr(o) end end +function values_ifnames(o) + for _, v in ipairs(nw:get_interfaces()) do + if v.dev then + o:value(v.dev.name) + end + end +end + function options_client(s, tab) local o @@ -226,17 +235,13 @@ modes = { "udp_only", } -actions = { - "bypass", - "forward", - "checkdst", -} - methods = { -- aead "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", + "chacha20-ietf-poly1305", + "xchacha20-ietf-poly1305", -- stream "table", "rc4", diff --git a/applications/luci-app-uhttpd/luasrc/model/cbi/uhttpd/uhttpd.lua b/applications/luci-app-uhttpd/luasrc/model/cbi/uhttpd/uhttpd.lua index 03821ad9b5..883e1bb631 100644 --- a/applications/luci-app-uhttpd/luasrc/model/cbi/uhttpd/uhttpd.lua +++ b/applications/luci-app-uhttpd/luasrc/model/cbi/uhttpd/uhttpd.lua @@ -202,14 +202,17 @@ o = ucs:taboption("advanced", Value, "max_requests", translate("Maximum number o o.optional = true o.datatype = "uinteger" -local s = m:section(NamedSection, "px5g", "cert", translate("uHTTPd Self-signed Certificate Parameters")) +local s = m:section(TypedSection, "cert", translate("uHTTPd Self-signed Certificate Parameters")) + +s.template = "cbi/tsection" +s.anonymous = true o = s:option(Value, "days", translate("Valid for # of Days")) o.default = 730 o.datatype = "uinteger" o = s:option(Value, "bits", translate("Length of key in bits")) -o.default = 1024 +o.default = 2048 o.datatype = "min(1024)" o = s:option(Value, "commonname", translate("Server Hostname"), translate("a.k.a CommonName")) @@ -222,6 +225,6 @@ o = s:option(Value, "state", translate("State")) o.default = "Unknown" o = s:option(Value, "location", translate("Location")) -o.default = "Somewhere" +o.default = "Unknown" return m |