From 5227fd4edc5bc540514aa525170730918628a555 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Sun, 11 Nov 2018 11:34:02 +0800 Subject: [PATCH] ssr plus: pdnsd in tunnel when running at ip route mode --- package/lean/luci-app-ssr-plus/Makefile | 7 ++++--- .../lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index cf72470dd..07d184da3 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=1 -PKG_RELEASE:=38 +PKG_RELEASE:=39 + PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo include $(INCLUDE_DIR)/package.mk @@ -12,7 +13,7 @@ menu "Optional Packages" depends on PACKAGE_$(PKG_NAME) config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks - bool "Include Shadowsocks" + bool "Include Shadowsocks New Version" default n config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray @@ -20,7 +21,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray default n config PACKAGE_$(PKG_NAME)_INCLUDE_kcptun - bool "Include kcptun" + bool "Include Kcptun" default n config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Server diff --git a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr index 91f9a545c..24e3df258 100755 --- a/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/init.d/shadowsocksr @@ -334,7 +334,11 @@ start_redir() { local dnsstr="$(uci_get_by_type global tunnel_forward 8.8.4.4:53)" local dnsserver=`echo "$dnsstr"|awk -F ':' '{print $1}'` local dnsport=`echo "$dnsstr"|awk -F ':' '{print $2}'` - ipset add gfwlist $dnsserver 2>/dev/null + if [ "$run_mode" = "gfw" ]; then + ipset add gfwlist $dnsserver 2>/dev/null + else + ipset add ss_spec_wan_ac $dnsserver nomatch 2>/dev/null + fi start_pdnsd $dnsserver $dnsport pdnsd_enable_flag=1 fi