diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua index ff45ac70..038cf242 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client.lua @@ -197,7 +197,7 @@ if is_finded("chinadns-ng") then o:depends("pdnsd_enable", "6") o = s:option(Value, "chinadns_forward", translate("Domestic DNS Server")) - o:value("", translate("Disable ChinaDNS-NG")) + o:value("none", translate("Disable ChinaDNS-NG")) o:value("wan", translate("Use DNS from WAN")) o:value("wan_114", translate("Use DNS from WAN and 114DNS")) o:value("114.114.114.114:53", translate("Nanjing Xinfeng 114DNS (114.114.114.114)")) @@ -212,7 +212,7 @@ if is_finded("chinadns-ng") then o.description = translate("Custom DNS Server format as IP:PORT (default: disabled)") o.validate = function(self, value, section) if (section and value) then - if value == "wan" or value == "wan_114" then + if value == "none" or value == "wan" or value == "wan_114" then return value end diff --git a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 75113f35..0c6f6961 100755 --- a/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -589,7 +589,7 @@ get_host_ip() { [ -n "$ip" ] || ip="" local chinadns="$(uci_get_by_type global chinadns_forward)" - if [ -n "$chinadns" ] && [ "$ip" != "$host" ]; then + if [ -n "$chinadns" ] && [ "$chinadns" != "none" ] && [ "$ip" != "$host" ]; then grep -q "$host" "$TMP_DNSMASQ_PATH/chinadns_fixed_server.conf" 2>"/dev/null" || \ echo -e "address=/$host/$ip" >> "$TMP_DNSMASQ_PATH/chinadns_fixed_server.conf" fi @@ -954,7 +954,7 @@ start_dns() { if [ "$run_mode" = "router" ]; then local chinadns="$(uci_get_by_type global chinadns_forward)" - if [ -n "$chinadns" ]; then + if [ -n "$chinadns" ] && [ "$chinadns" != "none" ]; then local wandns="$(ifstatus wan | jsonfilter -e '@["dns-server"][0]' || echo "119.29.29.29")" case "$chinadns" in "wan") chinadns="$wandns" ;; diff --git a/luci-app-ssr-plus/root/usr/bin/ssr-monitor b/luci-app-ssr-plus/root/usr/bin/ssr-monitor index d9732d25..608a4f38 100755 --- a/luci-app-ssr-plus/root/usr/bin/ssr-monitor +++ b/luci-app-ssr-plus/root/usr/bin/ssr-monitor @@ -208,18 +208,20 @@ while [ "1" == "1" ]; do #死循环 fi #chinadns-ng(china) if [ "$(uci -q get "dhcp.@dnsmasq[0]._unused_ssrp_changed")" = "1" ]; then - icount=$(ps_list | grep $TMP_BIN_PATH/chinadns-ng | grep -v grep | wc -l) - if [ "$icount" -lt 1 ]; then #如果进程挂掉就重启它 - logger -t "$NAME" "chinadns-ng tunnel error.restart!" - echolog "chinadns-ng tunnel error.restart!" - chinadns=$(uci_get_by_type global chinadns_forward) - wandns="$(ifstatus wan | jsonfilter -e '@["dns-server"][0]' || echo "119.29.29.29")" - case "$chinadns" in - "wan") chinadns="$wandns" ;; - ""|"wan_114") chinadns="$wandns,114.114.114.114" ;; - esac - kill -9 $(ps_list | grep $TMP_BIN_PATH/chinadns-ng | grep -v grep | awk '{print $1}') >/dev/null 2>&1 - ln_start_bin $(first_type chinadns-ng) chinadns-ng -l $china_dns_port -4 china -p 3 -c ${chinadns/:/#} -t 127.0.0.1#$dns_port -N -f -r + chinadns=$(uci_get_by_type global chinadns_forward) + if [ -n "$chinadns" ] && [ "$chinadns" != "none" ]; then + icount=$(ps_list | grep $TMP_BIN_PATH/chinadns-ng | grep -v grep | wc -l) + if [ "$icount" -lt 1 ]; then #如果进程挂掉就重启它 + logger -t "$NAME" "chinadns-ng tunnel error.restart!" + echolog "chinadns-ng tunnel error.restart!" + wandns="$(ifstatus wan | jsonfilter -e '@["dns-server"][0]' || echo "119.29.29.29")" + case "$chinadns" in + "wan") chinadns="$wandns" ;; + ""|"wan_114") chinadns="$wandns,114.114.114.114" ;; + esac + kill -9 $(ps_list | grep $TMP_BIN_PATH/chinadns-ng | grep -v grep | awk '{print $1}') >/dev/null 2>&1 + ln_start_bin $(first_type chinadns-ng) chinadns-ng -l $china_dns_port -4 china -p 3 -c ${chinadns/:/#} -t 127.0.0.1#$dns_port -N -f -r + fi fi fi done diff --git a/smartdns/Makefile b/smartdns/Makefile index 1e6c3756..acd990de 100644 --- a/smartdns/Makefile +++ b/smartdns/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=smartdns PKG_VERSION:=48.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/pymumu/smartdns/tar.gz/Release$(PKG_VERSION)? @@ -41,7 +41,7 @@ endef define Package/smartdns $(call Package/smartdns/Default) TITLE+= server - DEPENDS:=+i386:libatomic +libopenssl + DEPENDS:=+i386:libatomic +libopenssl +zlib endef define Package/smartdns/description