From 28ce4f638c01447d40490c2c084d2e2dc2a5fc93 Mon Sep 17 00:00:00 2001 From: softwaredownload Date: Wed, 28 Jun 2017 18:54:10 -0400 Subject: [PATCH] Updates for youtube: added -u for ss-redir in /etc/init.d/shadowsocks, redirect udp port 443 to local port 7654 in /usr/bin/shadowsocks-firewall --- openwrt/default/etc/init.d/shadowsocks | 2 +- openwrt/default/usr/bin/shadowsocks-firewall | 3 +++ openwrt/dir505/usr/bin/shadowsocks-firewall | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openwrt/default/etc/init.d/shadowsocks b/openwrt/default/etc/init.d/shadowsocks index e4f43ae..28edfe2 100644 --- a/openwrt/default/etc/init.d/shadowsocks +++ b/openwrt/default/etc/init.d/shadowsocks @@ -13,7 +13,7 @@ start() { sed -i 's/114.114.114.114/127.0.0.1#3210/' /etc/dnsmasq.d/gfwlist.conf /etc/init.d/dnsmasq restart - service_start /usr/bin/ss-redir -b 0.0.0.0 -c /etc/shadowsocks.json -f /var/run/shadowsocks.pid + service_start /usr/bin/ss-redir -b 0.0.0.0 -c /etc/shadowsocks.json -f /var/run/shadowsocks.pid -u service_start /usr/bin/ss-tunnel -b 0.0.0.0 -c /etc/shadowsocks.json -l 3210 -L 8.8.8.8:53 -u /usr/bin/shadowsocks-firewall } diff --git a/openwrt/default/usr/bin/shadowsocks-firewall b/openwrt/default/usr/bin/shadowsocks-firewall index fa42187..53a9025 100644 --- a/openwrt/default/usr/bin/shadowsocks-firewall +++ b/openwrt/default/usr/bin/shadowsocks-firewall @@ -17,6 +17,9 @@ iptables -t nat -A SHADOWSOCKS -d 1.0.9.8 -j RETURN iptables -t nat -A SHADOWSOCKS -p tcp --dport 1935 -j REDIRECT --to-ports 7654 iptables -t nat -A SHADOWSOCKS -p udp --dport 1935 -j REDIRECT --to-ports 7654 +# for youtube +iptables -t nat -A SHADOWSOCKS -p udp --dport 443 -j REDIRECT --to-ports 7654 + # Ignore LANs IP address iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN diff --git a/openwrt/dir505/usr/bin/shadowsocks-firewall b/openwrt/dir505/usr/bin/shadowsocks-firewall index 9c0ab99..462be94 100644 --- a/openwrt/dir505/usr/bin/shadowsocks-firewall +++ b/openwrt/dir505/usr/bin/shadowsocks-firewall @@ -16,6 +16,9 @@ iptables -t nat -A SHADOWSOCKS -d 1.0.9.8 -j RETURN iptables -t nat -A SHADOWSOCKS -p tcp --dport 1935 -j REDIRECT --to-ports 7654 iptables -t nat -A SHADOWSOCKS -p udp --dport 1935 -j REDIRECT --to-ports 7654 +# for youtube +iptables -t nat -A SHADOWSOCKS -p udp --dport 443 -j REDIRECT --to-ports 7654 + # Ignore LANs IP address iptables -t nat -A SHADOWSOCKS -d 0.0.0.0/8 -j RETURN iptables -t nat -A SHADOWSOCKS -d 10.0.0.0/8 -j RETURN