diff --git a/package/ctcgfw/luci-app-openclash/Makefile b/package/ctcgfw/luci-app-openclash/Makefile index 1a7934c723..e31e86053c 100644 --- a/package/ctcgfw/luci-app-openclash/Makefile +++ b/package/ctcgfw/luci-app-openclash/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-openclash -PKG_VERSION:=0.40.2 +PKG_VERSION:=0.40.3 PKG_RELEASE:=beta PKG_MAINTAINER:=vernesong diff --git a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash index 1101a338a6..c5be99517f 100755 --- a/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash +++ b/package/ctcgfw/luci-app-openclash/files/etc/init.d/openclash @@ -988,6 +988,16 @@ lan_ac() } +wan_ac() +{ + if [ -z "$1" ]; then + return + fi + + ipset add "$2" "$1" 2>/dev/null + +} + firewall_redirect_exclude() { local section="$1" @@ -1040,7 +1050,6 @@ CONFIG_NAME=$(echo "$CONFIG_FILE" |awk -F '/' '{print $5}' 2>/dev/null) do_run_mode() { en_mode=$(uci get openclash.config.en_mode 2>/dev/null) - proxy_mode=$(uci get openclash.config.proxy_mode 2>/dev/null) if [ "$en_mode" = "fake-ip-tun" ]; then en_mode_tun="1" @@ -1085,33 +1094,47 @@ do_run_core() if [ "$en_mode_tun" = "1" ] || [ "$en_mode_tun" = "3" ]; then ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null core_type="Tun" + echo "检测到配置了【Tun】内核专属功能,调用【Tun】内核启动..." >$START_LOG + sleep 2 fi if [ "$en_mode_tun" = "2" ]; then ln -s /etc/openclash/core/clash_game /etc/openclash/clash 2>/dev/null core_type="Game" + echo "检测到配置了【Game】内核专属功能,调用【Game】内核启动..." >$START_LOG + sleep 2 fi if [ "$proxy_mode" = "script" ] || [ "$rule_source" = "ConnersHua" ] || [ "$rule_source" = "lhie1" ]; then ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null core_type="Tun" + echo "检测到配置了【Tun】内核专属功能,调用【Tun】内核启动..." >$START_LOG + sleep 2 fi if [ -n "$(grep "^ \{0,\}rule-providers:" "$RULE_PROVIDER_FILE" 2>/dev/null)" ] && [ -n "$(grep "^ \{0,\}behavior" "$RULE_PROVIDER_FILE" 2>/dev/null |grep -v "^ \{0,\}#")" ]; then ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null core_type="Tun" + echo "检测到配置了【Tun】内核专属功能,调用【Tun】内核启动..." >$START_LOG + sleep 2 fi if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash" ] && [ -z "$core_type" ]; then ln -s /etc/openclash/core/clash /etc/openclash/clash 2>/dev/null + echo "未检测到特殊配置,调用【Dev】内核启动..." >$START_LOG + sleep 2 fi if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash_tun" ] && [ "$core_type" != "Game" ]; then ln -s /etc/openclash/core/clash_tun /etc/openclash/clash 2>/dev/null + echo "检测到【Dev】内核未安装,调用【Tun】内核启动..." >$START_LOG + sleep 2 fi if [ ! -f "/etc/openclash/clash" ] && [ -f "/etc/openclash/core/clash_game" ] && [ "$core_type" != "Tun" ]; then ln -s /etc/openclash/core/clash_game /etc/openclash/clash 2>/dev/null + echo "检测到【Dev】内核未安装,调用【Game】内核启动..." >$START_LOG + sleep 2 fi #权限检查 @@ -1183,6 +1206,12 @@ if [ "$operation_mode" = "redir-host" ] && [ "$en_mode" = "redir-host" ]; then fi fi +if [ -n "$(uci get openclash.config.wan_ac_black_ips 2>/dev/null)" ]; then + ipset create wan_ac_black_ips hash:net + config_load "openclash" + config_list_foreach "config" "wan_ac_black_ips" wan_ac "wan_ac_black_ips" +fi + #local ipset create localnetwork hash:net ipset add localnetwork 0.0.0.0/8 @@ -1205,6 +1234,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then iptables -t nat -N openclash iptables -t nat -F openclash iptables -t nat -A openclash -m set --match-set localnetwork dst -j RETURN + iptables -t nat -A openclash -m set --match-set wan_ac_black_ips dst -j RETURN >/dev/null 2>&1 iptables -t nat -A openclash -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1 iptables -t nat -A openclash -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1 if [ "$en_mode" = "redir-host" ]; then @@ -1223,6 +1253,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 3 ]; then ip route add local 0.0.0.0/0 dev lo table "$PROXY_ROUTE_TABLE" iptables -t mangle -N openclash iptables -t mangle -A openclash -m set --match-set localnetwork dst -j RETURN + iptables -t mangle -A openclash -m set --match-set wan_ac_black_ips dst -j RETURN >/dev/null 2>&1 iptables -t mangle -A openclash -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1 iptables -t mangle -A openclash -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1 if [ "$en_mode" = "redir-host" ]; then @@ -1308,6 +1339,7 @@ if [ -n "$en_mode_tun" ]; then config_load "firewall" config_foreach firewall_redirect_exclude "redirect" #其他流量 + iptables -t mangle -A openclash -m set --match-set wan_ac_black_ips dst -j RETURN >/dev/null 2>&1 iptables -t mangle -A openclash -m set --match-set lan_ac_black_ips src -j RETURN >/dev/null 2>&1 iptables -t mangle -A openclash -m set ! --match-set lan_ac_white_ips src -j RETURN >/dev/null 2>&1 if [ "$en_mode" = "redir-host" ]; then @@ -1407,6 +1439,7 @@ revert_firewall() ipset destroy china_ip_route >/dev/null 2>&1 ipset destroy lan_ac_white_ips >/dev/null 2>&1 ipset destroy lan_ac_black_ips >/dev/null 2>&1 + ipset destroy wan_ac_black_ips >/dev/null 2>&1 } get_config() @@ -1417,6 +1450,7 @@ get_config() da_password=$(uci get openclash.config.dashboard_password 2>/dev/null) cn_port=$(uci get openclash.config.cn_port 2>/dev/null) proxy_port=$(uci get openclash.config.proxy_port 2>/dev/null) + proxy_mode=$(uci get openclash.config.proxy_mode 2>/dev/null) ipv6_enable=$(uci get openclash.config.ipv6_enable 2>/dev/null) http_port=$(uci get openclash.config.http_port 2>/dev/null) socks_port=$(uci get openclash.config.socks_port 2>/dev/null) diff --git a/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version b/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version index 29d5e938c4..2132727d71 100644 --- a/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version +++ b/package/ctcgfw/luci-app-openclash/files/etc/openclash/openclash_version @@ -1,2 +1,2 @@ -v0.40.2-beta -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXMAAAAqCAMAAAB2kksrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4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Gd7gOf78Nfr8Nfr4Mfb4Mfb0JersJe7sJeroIebk6OjqqqqrU1NTV1dWrq6tISEg9PT2pqak7OzuAgIB+fn7w9/s8PDzC3u5JSUmCqcCBgYGEvN3q6uqEvd1MTEzz8/P19fX09PSDvNzB3u5/f3/v9PfB3e2Fvt6JiYng6u/B3e7o6OiEtNBVos9kq9OErMLA1N/W1tYFZ6Chv9BHm8yDq8ILdK9Inc1Gm8vD3+8Lerng6vBortfC3++Du9wFa6YlhLoEVYNEmcoKbqgKeLcVaJcGdbQnhrzv9voZg8DB1+OiyN6Eu9oJcKyDr8iTu9F/uNiFvd6yz9+ErcVFia9TU1MPgMEQgcJZWVlaWlpfX19bW1tcXFxNTU1eXl5PT09QUFBYWFhdXV1OTk7///////+fcikrAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAADApJREFUeNrsWAtYVGUaPsN4AWREHEpkvKGJOpCJDiBe0vWCCWKZqy5qopZrmlReyyxzd0Vohr20F3bX2hK5DhgDoyIXCfKuWdrNct3uF6ttm13XDcR46fv/c5lzBjCercfnmXl8n4fzf9f3O+f9Z845g9DaWrNyyGVfwF+9AJsfdbS2Cq3xGy/7Bv7sFdgc1irUDGvyEfzJO7DZIaz0Fcmb/ugleFQY9q2v4Bdegs3Ctzc0v97wIc3/4y0QvvEZ3ND8+uPf3gLhfz6DG5pffzztLRD+6zP4jbegXc31UVFRP1v146syX6+frzir9PrO9Bj1xk6yP9MRnhYGDRgktJ/bsGGxZC0OGDAgYLFnnkXb6R2AAc/83xAueSJmdg044ufEXPqB0EfpNX4N5ij2ZIzsDMXLeLmTw57tAIvf4JfzxuJ2crOADaJ1zsGKHOc06XvEVoQJHn2keUfjnt0wYMOz10QbzY2VQHCxwRBBo/Q/VPMoRKld2wjEK1sLRP64mv+tA7yN+3oP7X0f3m6bOkcXuZBbC4Evhg79QnYl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lIFdrcLfL1WVlYKe7wHeLkEdrYDdLUEdbYDdLQDdbUOgMAOf8ASg8MSg8RXV1cShMQAcrIThMUGd7gOf78Nfr8Nfr4Mfb4Mfb0Je7sJersIebkJero6OjqqqqrU1NTV1dWrq6tISEipqanw9/s7OzuAgIB+fn7C3u5JSUmBgYGEvN3q6uqEvd1MTEz19fXz8/Ph7/fB3u709PSDvNx/f3/v9PeCqcDB3e2Fvt7g6vDg6u+JiYnA1N/B3e7o6OhVos+EtNBGm8tkqtLW1tYFZ6BHm8wUXomDq8JInc2ErMILerlortcFa6ZEmcoLdK/g7vYlhLqFvd6Dr8gGdbSDu9wnhrwKebjD3++iyN7v9voZg8DB1+PR3+iEu9rC3+8JcKsVaJeAudlWl7xUja2Fvd3B1eAIWIhTU1MPgMEQgcJZWVlaWlpfX19bW1tcXFxNTU1eXl5PT09QUFBYWFhdXV1OTk7///////9mizwyAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAADBFJREFUeNrsVwlUVNcZfsigg9sQBqECo2jc0AcqmjgOm0usiBFNcKm1GJNolERN4hbN3lZEBtK0aUtbsyE7jAEUWQ0a3GOMJtFqk2bfTJritNYGxPDR/9733sx7AxhOk+M5M8fvHN791++/77sz7w1Ce3v18qGXPQF/cQOMfczW3i60x2y47Bn4k1tgbGC7UD26xUPwR/fAWJuw3FMkb/mDm+AxYfR3noJfugnGCt/d0Px6w4M0/7e7QPjWY3BD8+uPf7kLhP96DG5ofv3xnLtA+I/H4Pfugk4110VERPx85Y+vymKdbrHDWanTdafHqDN2k/35rvBcQM/HegZ0nnvooVWytcq3Tx/fVR0L+nQW7oM+z//fEC65ImpuNThi5kdd+oHQReg0fjXmO+wZGN8dijfwRjeHvdAFVn3Eb+ejVZ3kvIClknXGxopsZ7T5LZIUtj4ufaR5V+NeWNpn6QvXRAfNjZWAX7HBEEajdD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HDu5UXmW9Vwn3ZkiwFzd7J27VIcUkovjnIQeUYvG66ZuL27cLWjrCIJpMp2iJ7JYmmxJKtbWIJ2dJVqrE46ltLbjeZbhfbmC2K2jzrFrX0baIoqpxEmlXSqiFvLYk2UVurZhAbIs1wVpbIAQ7NfZ1NOeuwE07q++pPJkhO/5SUtWrxHF7/dX37ruvvCEtiJiRTVH9yrYvkxNL/7K1U70ispRl91yVLQ5JpXgoLMsqg7ckpa79XczfFM+4CodVj8Ky7wIM0/527QLjiMfiNu8CDNP+tu0BY3OYp+JWb4EHB/4bm1xlfC/Ue80H/tXvgwU+E9gFRzZ4BN5E8sF1ob6/39wzV/+wGePDrT9rb/yfAAOjJ35BTdVw0AAAAAElFTkSuQmCC \ No newline at end of file diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-file-manage.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-file-manage.lua index 5576994b6a..2ae467126b 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-file-manage.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/proxy-provider-file-manage.lua @@ -102,6 +102,7 @@ o.inputtitle = translate("Delete All File") o.inputstyle = "remove" o.write = function() luci.sys.call("rm -rf /etc/openclash/proxy_provider/* >/dev/null 2>&1") + HTTP.redirect(DISP.build_url("admin", "services", "openclash", "proxy-provider-file-manage")) end o = a:option(Button, "Apply") diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-file-manage.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-file-manage.lua index 5283a2b249..26264a7566 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-file-manage.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-file-manage.lua @@ -102,6 +102,7 @@ o.inputtitle = translate("Delete All File") o.inputstyle = "remove" o.write = function() luci.sys.call("rm -rf /etc/openclash/rule_provider/* >/dev/null 2>&1") + HTTP.redirect(DISP.build_url("admin", "services", "openclash", "rule-providers-file-manage")) end o = a:option(Button, "Apply") diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-manage.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-manage.lua index df0f155b9d..5305392069 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-manage.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-manage.lua @@ -107,7 +107,7 @@ e.inputstyle="reset" Button.render(e,t,a) end btnrm.write=function(a,t) -fs.unlink("/etc/openclash/rule_provider/"..e[t].filename) +fs.unlink("/etc/openclash/rule_provider/"..e[t].lfilename) HTTP.redirect(DISP.build_url("admin", "services", "openclash", "rule-providers-manage")) end diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua index 187f3f2e73..b78b29cc0b 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/rule-providers-settings.lua @@ -11,18 +11,18 @@ local uci = require "luci.model.uci".cursor() m = Map(openclash, translate("Rule Providers and Groups")) m.pageaction = false -m.description=translate("注意事项:
游戏代理为测试功能,不保证可用性 \ +m.description=translate("注意事项:
游戏代理为测试功能,不保证规则可用性 \
准备步骤:\ -
1、在《服务器与策略组管理》页面创建您准备使用的游戏策略组和游戏节点,并应用配置(节点添加时必须选择要加入的策略组),策略组类型建议:FallBack,游戏节点必须支持UDP \ -
2、点击《游戏规则管理》按钮进入游戏规则列表下载您要使用的游戏规则 \ -
3、在此页面上方设置您已下载的游戏规则的对应策略组并保存设置 \ +
1、在《服务器与策略组管理》页面创建您准备使用的策略组和节点,并应用配置(节点添加时必须选择要加入的策略组),策略组类型建议:FallBack,游戏节点必须支持UDP \ +
2、点击《管理第三个游戏规则》或者《管理第三方规则集》按钮进入规则列表下载您要使用的规则 \ +
3、在此页面设置您已下载的规则的对应配置文件、策略组并保存设置 \
\ -
在普通模式下使用: \ +
在普通模式下使用(仅游戏规则): \
1、在《全局设置》-《模式设置》-《运行模式》中选择普通模式并启用UDP流量代理,然后重新启动 \
\
在TUN模式下使用: \ -
1、在全局设置-版本更新标签先下载对应模式内核 \ -
2、在《全局设置》-《模式设置》-《运行模式》中选择TUN模式或者游戏模式并重新启动 \ +
1、在全局设置-版本更新标签先下载、安装对应模式内核 \ +
2、在《全局设置》-《模式设置》-《运行模式》中选择混合模式、TUN模式或者游戏模式并重新启动 \
\
本页设置时如策略组为空,请先到《服务器与策略组管理》页面进行添加 \
\ diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua index 000b7475de..03c577c5c1 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/servers.lua @@ -167,7 +167,13 @@ end o = s:option(DummyValue, "udp", translate("UDP Support")) function o.cfgvalue(...) - return Value.cfgvalue(...) or translate("None") + if Value.cfgvalue(...) == "true" then + return translate("支持") + elseif Value.cfgvalue(...) == "false" then + return translate("不支持") + else + return translate("None") + end end o = s:option(DummyValue,"server",translate("Ping Latency")) diff --git a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua index 971b72efd2..7bb1eeb54b 100644 --- a/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua +++ b/package/ctcgfw/luci-app-openclash/files/usr/lib/lua/luci/model/cbi/openclash/settings.lua @@ -72,7 +72,7 @@ o:value("gvisor", translate("Gvisor")) o.default = "system" o = s:taboption("op_mode", ListValue, "proxy_mode", font_red..bold_on..translate("Proxy Mode")..bold_off..font_off) -o.description = translate("Select Proxy Mode") +o.description = translate("Select Proxy Mode, Use Script Mode Could Prevent Proxy BT traffics If Rules Support, eg.lhie1's") o:value("rule", translate("Rule Proxy Mode")) o:value("global", translate("Global Proxy Mode")) o:value("direct", translate("Direct Proxy Mode")) @@ -243,7 +243,7 @@ end ---- Access Control if op_mode == "redir-host" then -o = s:taboption("lan_ac", ListValue, "lan_ac_mode", translate("Access Control Mode")) +o = s:taboption("lan_ac", ListValue, "lan_ac_mode", translate("LAN Access Control Mode")) o:value("0", translate("Black List Mode")) o:value("1", translate("White List Mode")) o.default=0 @@ -267,6 +267,10 @@ luci.ip.neighbors({ family = 4 }, function(entry) end) end +o = s:taboption("lan_ac", DynamicList, "wan_ac_black_ips", translate("WAN Bypassed Host List")) +o.datatype = "ipaddr" +o.description = translate("In The Fake-IP Mode, Only Pure IP Requests Are Supported") + ---- Rules Settings if op_mode == "fake-ip" then o = s:taboption("rules", ListValue, "enable_custom_clash_rules", font_red..bold_on..translate("Custom Clash Rules(Access Control)")..bold_off..font_off) diff --git a/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po b/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po index a3e96a28aa..ea431fab4a 100644 --- a/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po +++ b/package/ctcgfw/luci-app-openclash/i18n/zh_Hans/openclash.zh-cn.po @@ -134,8 +134,8 @@ msgstr "选择运行模式,Redir-Host模式下无法代理路由器自身流 msgid "Proxy Mode" msgstr "*代理模式" -msgid "Select Proxy Mode" -msgstr "选择默认代理模式" +msgid "Select Proxy Mode, Use Script Mode Could Prevent Proxy BT traffics If Rules Support, eg.lhie1's" +msgstr "选择默认代理模式,如果规则支持,使用脚本模式可以阻止代理BT流量,比如lhie1规则" msgid "Rule Proxy Mode" msgstr "Rule【策略代理】" @@ -972,8 +972,8 @@ msgstr "切换" msgid "Access Control" msgstr "访问控制" -msgid "Access Control Mode" -msgstr "访问控制模式" +msgid "LAN Access Control Mode" +msgstr "局域网访问控制模式" msgid "Black List Mode" msgstr "黑名单模式" @@ -987,6 +987,12 @@ msgstr "不走代理的局域网LAN IP" msgid "LAN Proxied Host List" msgstr "走代理的局域网LAN IP" +msgid "WAN Bypassed Host List" +msgstr "不走代理的WAN IP" + +msgid "In The Fake-IP Mode, Only Pure IP Requests Are Supported" +msgstr "在Fake-IP模式下,只支持过滤纯IP类型的请求" + msgid "Rule Match Proxy Mode" msgstr "*仅代理命中规则流量"