diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 7f8da6392..ef7e3bbca 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=4.75-2 +PKG_VERSION:=4.75-3 PKG_RELEASE:= PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index d38b034b5..f1dbc90a7 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -370,22 +370,20 @@ o.rmempty = false if api.is_finded("chinadns-ng") then o = s:taboption("DNS", Flag, "chinadns_ng", translate("ChinaDNS-NG"), translate("The effect is better, but will increase the memory.")) o.default = "0" - chinadns_ng_default_tag = s:taboption("DNS", ListValue, "chinadns_ng_default_tag", translate("ChinaDNS-NG Domain Default Tag")) - chinadns_ng_default_tag.default = "smart" - chinadns_ng_default_tag:value("smart", translate("Smart DNS")) - chinadns_ng_default_tag:value("gfw", translate("Remote DNS")) - chinadns_ng_default_tag:value("chn", translate("Direct DNS")) - chinadns_ng_default_tag.description = "" +local _depends = {tcp_proxy_mode = "proxy"} if api.is_finded("chinadns-ng") then - o:depends("chinadns_ng", false) + _depends["chinadns_ng"] = false end +o:depends(_depends) o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect.")) o.inputstyle = "remove" diff --git a/luci-app-passwall/root/usr/share/passwall/app.sh b/luci-app-passwall/root/usr/share/passwall/app.sh index ed557afb7..a4d279e74 100755 --- a/luci-app-passwall/root/usr/share/passwall/app.sh +++ b/luci-app-passwall/root/usr/share/passwall/app.sh @@ -1701,10 +1701,10 @@ UDP_PROXY_MODE=$(config_t_get global udp_proxy_mode proxy) [ "${UDP_PROXY_MODE}" != "disable" ] && UDP_PROXY_MODE="proxy" LOCALHOST_TCP_PROXY_MODE=$(config_t_get global localhost_tcp_proxy_mode default) LOCALHOST_UDP_PROXY_MODE=$(config_t_get global localhost_udp_proxy_mode default) +[ "${LOCALHOST_TCP_PROXY_MODE}" == "default" ] && LOCALHOST_TCP_PROXY_MODE=$TCP_PROXY_MODE +[ "${LOCALHOST_UDP_PROXY_MODE}" == "default" ] && LOCALHOST_UDP_PROXY_MODE=$UDP_PROXY_MODE [ "${LOCALHOST_TCP_PROXY_MODE}" != "disable" ] && LOCALHOST_TCP_PROXY_MODE="proxy" [ "${LOCALHOST_UDP_PROXY_MODE}" != "disable" ] && LOCALHOST_UDP_PROXY_MODE="proxy" -[ "$LOCALHOST_TCP_PROXY_MODE" == "default" ] && LOCALHOST_TCP_PROXY_MODE=$TCP_PROXY_MODE -[ "$LOCALHOST_UDP_PROXY_MODE" == "default" ] && LOCALHOST_UDP_PROXY_MODE=$UDP_PROXY_MODE DNS_SHUNT="dnsmasq" DNS_MODE=$(config_t_get global dns_mode dns2tcp) DNS_CACHE=$(config_t_get global dns_cache 0)