diff --git a/Makefile b/Makefile index 33f41bb..3c7192a 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-shadowsocks PKG_VERSION:=2.0.2 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_LICENSE:=GPLv3 PKG_LICENSE_FILES:=LICENSE diff --git a/files/root/etc/init.d/shadowsocks b/files/root/etc/init.d/shadowsocks index d852790..49a6c21 100644 --- a/files/root/etc/init.d/shadowsocks +++ b/files/root/etc/init.d/shadowsocks @@ -143,6 +143,7 @@ ss_pre() { for server in $(config_foreach get_server_ips servers); do cat <<-EOF >> $tmpDNSconf ipset=/${server}/ss_spec_dst_sp + server=/${server}/# server=/${server}/162.14.21.56 server=/${server}/162.14.21.178 server=/${server}/114.114.114.114 @@ -152,6 +153,8 @@ ss_pre() { EOF done + ( grep -q 'no-resolv' /etc/dnsmasq.conf /var/etc/dnsmasq.conf.* 2>/dev/null) && sed "/\/#$/d" -i $tmpDNSconf + ( grep -q 'no-resolv' /etc/dnsmasq.d/* /var/dnsmasq.d/* 2>/dev/null) && sed "/\/#$/d" -i $tmpDNSconf ( sort -u $tmpDNSconf | sed '/\/\//d; /\/127.0.0.1\//d' > $DNSconf ) && rm -f $tmpDNSconf echo "server=/${WATCHDOG_ENDPOINT}/127.0.0.1#$(uci_get_by_type port_forward local_port 5300)" >> $DNSconf