| 
					
				 | 
			
			
				@@ -212,18 +212,18 @@ start_dns() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		oversea) ipset add oversea $dnsserver 2>/dev/null ;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		*) ipset add ss_spec_wan_ac $dnsserver nomatch 2>/dev/null ;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		case "$ssrplus_dns" in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			start_pdnsd $dnsserver $dnsport 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			pdnsd_enable_flag=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			pdnsd_enable_flag=2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	case "$ssrplus_dns" in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		start_pdnsd $dnsserver $dnsport 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pdnsd_enable_flag=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	2) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		ln_start_bin $(first_type microsocks) microsocks -i 127.0.0.1 -p $tmp_dns_port ssrplus-dns 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		ln_start_bin $(first_type dns2socks) dns2socks 127.0.0.1:$tmp_dns_port $dnsserver:$dnsport 127.0.0.1:5335 -q 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		pdnsd_enable_flag=2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 gen_service_file() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -603,7 +603,7 @@ load_config() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	nil) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		mode="tcp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	$GLOBAL_SERVER | same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		mode="tcp,udp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		tcp_config_file=$TMP_PATH/tcp-udp-ssr-retcp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		ARG_UDP="-u" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -611,27 +611,20 @@ load_config() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		UDP_RELAY_SERVER=$GLOBAL_SERVER 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if [ "$UDP_RELAY_SERVER" == "$GLOBAL_SERVER" ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			mode="tcp,udp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			tcp_config_file=$TMP_PATH/tcp-udp-ssr-retcp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ARG_UDP="-u" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ARG_OTA="-u" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			mode="udp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			udp_config_file=$TMP_PATH/udp-only-ssr-reudp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ARG_UDP="-U" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ARG_OTA="-U" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			start_udp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ARG_OTA="" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			mode="tcp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		mode="udp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		udp_config_file=$TMP_PATH/udp-only-ssr-reudp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		ARG_UDP="-U" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		ARG_OTA="-U" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		start_udp 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		ARG_OTA="" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		mode="tcp" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case "$LOCAL_SERVER" in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	nil) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		_local="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	$GLOBAL_SERVER | same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		_local="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		LOCAL_SERVER=$GLOBAL_SERVER 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		local_config_file=$TMP_PATH/tcp-udp-ssr-local.json 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -639,35 +632,24 @@ load_config() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		local_enable=0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if [ "$LOCAL_SERVER" == "$GLOBAL_SERVER" ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			_local="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			local_config_file=$TMP_PATH/tcp-udp-ssr-local.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			start_local 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			local_enable=0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			_local="2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			local_config_file=$TMP_PATH/tcp-udp-ssr-local.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			start_local 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		_local="2" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		local_config_file=$TMP_PATH/tcp-udp-ssr-local.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		start_local 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case "$SHUNT_SERVER" in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	nil) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		shunt="0" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	$GLOBAL_SERVER | same) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		shunt="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		SHUNT_SERVER=$GLOBAL_SERVER 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	*) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		if [ "$SHUNT_SERVER" == "$GLOBAL_SERVER" ]; then 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			shunt="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			shunt="$tmp_shunt_port" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			shunt_config_file=$TMP_PATH/shunt-ssr-retcp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			shunt_dns_config_file=$TMP_PATH/shunt-dns-ssr-plus.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			start_shunt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		fi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		shunt="$tmp_shunt_port" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		shunt_config_file=$TMP_PATH/shunt-ssr-retcp.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		shunt_dns_config_file=$TMP_PATH/shunt-dns-ssr-plus.json 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		start_shunt 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		;; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	esac 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	return 0 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -907,7 +889,7 @@ reset() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		set shadowsocksr.@global[0].switch_try_count='3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		set shadowsocksr.@global[0].gfwlist_url='https://cdn.jsdelivr.net/gh/YW5vbnltb3Vz/domain-list-community@release/gfwlist.txt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		set shadowsocksr.@global[0].chnroute_url='https://ispip.clang.cn/all_cn.txt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		set shadowsocksr.@global[0].nfip_url='https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/getflix.txt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		set shadowsocksr.@global[0].nfip_url='https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/NF_only.txt' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		set shadowsocksr.@global[0].adblock_url='https://anti-ad.net/anti-ad-for-dnsmasq.conf' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		add shadowsocksr server_subscribe 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		set shadowsocksr.@server_subscribe[0].proxy='0' 
			 |