diff --git a/Makefile b/Makefile index 9b5df810..4880052a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-clash -PKG_VERSION:=v1.7.5.1 +PKG_VERSION:=v1.7.5.2 PKG_MAINTAINER:=frainzy1477 include $(INCLUDE_DIR)/package.mk diff --git a/README.md b/README.md index c8b5150d..17d879bb 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ A rule based custom proxy for Openwrt based on Clash.
- - + + @@ -20,8 +20,8 @@ - Upload ipk file to tmp folder - cd /tmp - opkg update -- opkg install luci-app-clash_v1.7.5.1_all.ipk -- opkg install luci-app-clash_v1.7.5.1_all.ipk --force-depends +- opkg install luci-app-clash_v1.7.5.2_all.ipk +- opkg install luci-app-clash_v1.7.5.2_all.ipk --force-depends ## Uninstall - opkg remove luci-app-clash diff --git a/luasrc/model/cbi/clash/dns/dns.lua b/luasrc/model/cbi/clash/dns/dns.lua index 683274f7..a046399e 100644 --- a/luasrc/model/cbi/clash/dns/dns.lua +++ b/luasrc/model/cbi/clash/dns/dns.lua @@ -28,8 +28,8 @@ y.default = 0 y.description = translate("Enable Tun and make sure you are using tun supported core") y = s:option(ListValue, "stack", translate("Stack")) -y:value("system", translate("System")) -y:value("gvisor", translate("Gvisor")) +y:value("system", translate("system")) +y:value("gvisor", translate("gvisor")) y.description = translate("Select Stack Mode") y:depends("tun_mode", 1) @@ -76,7 +76,7 @@ o.cfgvalue = function(...) end o = s:option(ListValue, "type", translate("Protocol")) -o:value("none", translate("None")) +o:value("none", translate("No Protocol")) o:value("tcp://", translate("TCP")) o:value("udp://", translate("UDP")) o:value("tls://", translate("TLS")) @@ -161,7 +161,7 @@ o:value("nameserver", translate("NameServer")) o:value("fallback", translate("FallBack")) o = s:option(ListValue, "protocol", translate("Protocol")) -o:value("none", translate("None")) +o:value("none", translate("No Protocol")) o:value("tcp://", translate("TCP")) o:value("udp://", translate("UDP")) o:value("tls://", translate("TLS")) diff --git a/po/zh-cn/clash.po b/po/zh-cn/clash.po index cead5bf4..4db8daa3 100644 --- a/po/zh-cn/clash.po +++ b/po/zh-cn/clash.po @@ -1275,4 +1275,7 @@ msgid "New Version" msgstr "最新内核版本" msgid "Download Update" -msgstr "下载最新版本客户端" \ No newline at end of file +msgstr "下载最新版本客户端" + +msgid "No Protocol" +msgstr "不带协议" \ No newline at end of file diff --git a/root/usr/share/clash/luci_version b/root/usr/share/clash/luci_version index 7125d2e3..bde14877 100644 --- a/root/usr/share/clash/luci_version +++ b/root/usr/share/clash/luci_version @@ -1 +1 @@ -v1.7.5.1 +v1.7.5.2 diff --git a/root/usr/share/clash/yum_change.sh b/root/usr/share/clash/yum_change.sh index 07e336f8..098d95b1 100644 --- a/root/usr/share/clash/yum_change.sh +++ b/root/usr/share/clash/yum_change.sh @@ -135,12 +135,18 @@ dnshijack_set() return fi - if [ -z "$port" ]; then + + if [ "$type" == "none" ] && [ ! -z "$port" ]; then + echo " - $ip:$port">>/tmp/dnshijack.yaml + elif [ "$type" == "none" ] && [ -z "$port" ]; then + echo " - $ip">>/tmp/dnshijack.yaml + elif [ -z "$port" ]; then echo " - $type$ip">>/tmp/dnshijack.yaml else echo " - $type$ip:$port">>/tmp/dnshijack.yaml fi - + + } config_load "clash" config_foreach dnshijack_set "dnshijack" @@ -261,18 +267,29 @@ dnsservers_set() return fi + + + if [ "$ser_type" == "nameserver" ]; then - if [ -z "$ser_port" ]; then - echo " - $protocol$ser_address" >>/tmp/nameservers.yaml - else - echo " - $protocol$ser_address:$ser_port" >>/tmp/nameservers.yaml - fi + if [ "$protocol" == "none" ] && [ ! -z "$ser_port" ]; then + echo " - $ser_address:$ser_port" >>/tmp/nameservers.yaml + elif [ "$protocol" == "none" ] && [ -z "$ser_port" ]; then + echo " - $ser_address" >>/tmp/nameservers.yaml + elif [ -z "$ser_port" ]; then + echo " - $protocol$ser_address" >>/tmp/nameservers.yaml + else + echo " - $protocol$ser_address:$ser_port" >>/tmp/nameservers.yaml + fi elif [ "$ser_type" == "fallback" ]; then - if [ -z "$ser_port" ]; then - echo " - $protocol$ser_address" >>/tmp/fallback.yaml - else - echo " - $protocol$ser_address:$ser_port" >>/tmp/fallback.yaml - fi + if [ "$protocol" == "none" ] && [ ! -z "$ser_port" ]; then + echo " - $ser_address:$ser_port" >>/tmp/fallback.yaml + elif [ "$protocol" == "none" ] && [ -z "$ser_port" ]; then + echo " - $ser_address" >>/tmp/fallback.yaml + elif [ -z "$ser_port" ]; then + echo " - $protocol$ser_address" >>/tmp/fallback.yaml + else + echo " - $protocol$ser_address:$ser_port" >>/tmp/fallback.yaml + fi fi }