This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
iptables -t nat -F | |
#create a new chain named SHADOWSOCKS | |
iptables -t nat -N SHADOWSOCKS | |
ips=(google.com www.google.com www.google.com.hk 74.125.203.0/24 64.233.188.0/24 114.134.80.0/24 64.18.0.0/20 64.233.160.0/19 66.102.0.0/20 66.249.80.0/20 72.14.192.0/18 74.125.0.0/16 108.177.8.0/21 173.194.0.0/16 207.126.144.0/20 209.85.128.0/17 216.58.192.0/19 216.239.32.0/19) | |
for ip in "${ips[@]}";do | |
iptables -t nat -A SHADOWSOCKS -p tcp -d $ip -j REDIRECT --to-ports 1081 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#==============================================================# | |
# Description: bench test script # | |
# Author: Teddysun <i@teddysun.com> # | |
# modify: wwng <wwng@2333.me> # | |
# Thanks: LookBack <admin@dwhd.org> # | |
# Visit: https://teddysun.com # | |
#==============================================================# | |
get_opsy() { | |
[ -f /etc/os-release ] && awk -F'[= "]' '/PRETTY_NAME/{print $3,$4,$5}' /etc/os-release && return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 规则配置仅供参考,适用于 Surge iOS & Mac; | |
# 包含 Proxy Group、URL Rewrite 特性; | |
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计; | |
# 屏蔽 Hao123、百度联盟广告以及部分运营商网页漂浮广告; | |
# Surge for Mac 简明指南 http://bit.ly/1TATRaG | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0/96 | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
loglevel = notify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 规则配置仅供参考,适用于 Surge Mac (1.3.2) 及其后续版本; | |
# 包含 Proxy Group、URL Rewrite 特性; | |
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计; | |
# 屏蔽 Hao123、百度联盟广告以及部分运营商网页漂浮广告; | |
# Surge for Mac 简明指南 http://bit.ly/1TATRaG | |
[General] | |
# warning, notify, info, verbose | |
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
loglevel = notify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[General] | |
#我的注释都是 # 开头,所以如果你用 vim,直接 :g/^#/d 就可以一次性清除所有注释 | |
#开头这段skip包含以下几个目的:1,私网IP跳过,提高内网性能;2,苹果的一些服务跳过,比如公共热点wifi要先测试captive.apple.com。可解决很多内网的 TCP毛病,例如 kodi remote软件无法遥控 | |
skip-proxy = 10.0.0.0/8,169.254/16,172.16.0.0/12,192.168.0.0/16,224.0.0.0/4, localhost, *.local,api.smoot.apple.com,configuration.apple.com,xp.apple.com,smp-device-content.apple.com,guzzoni.apple.com,captive.apple.com,*.ess.apple.com,*.push.apple.com,*.push-apple.com.akadns.net | |
#下面这一段则是完全跳过 Surge,最重要的一个是让 UDP包可以传输,解决很多内网毛病,例如DLNA,NFS或者btsync等组播类/UDP类应用 | |
bypass-tun = 10.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0/4, 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 5 |