Skip to content

Instantly share code, notes, and snippets.

@tru2dagame
Forked from janlay/README.md
Created October 4, 2015 17:39
Show Gist options
  • Save tru2dagame/be6b126932bc420ef8fa to your computer and use it in GitHub Desktop.
Save tru2dagame/be6b126932bc420ef8fa to your computer and use it in GitHub Desktop.
Yet another config for Surge.app
# This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.
[General]
# warning, notify, info, verbose
loglevel = notify
[Proxy]
# http, https, socks5
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://server/custom.module
[Rule]
# Block privacy trackers
DOMAIN-KEYWORD,umeng.co,REJECT
DOMAIN-SUFFIX,log.mmstat.com,REJECT
DOMAIN-SUFFIX,doubleclick.net,REJECT
DOMAIN-SUFFIX,monitor.uu.qq.com,REJECT
DOMAIN-SUFFIX,beacon.qq.com,REJECT
DOMAIN-SUFFIX,pingma.qq.com,REJECT
# Accelerate most visited sites
DOMAIN-SUFFIX,cn,DIRECT
DOMAIN-SUFFIX,qq.com,DIRECT
DOMAIN-KEYWORD,alipay,DIRECT
DOMAIN-KEYWORD,taobao,DIRECT
DOMAIN-KEYWORD,baidu,DIRECT
DOMAIN-SUFFIX,ls.apple.com,DIRECT
DOMAIN-SUFFIX,apple.com,Proxy
DOMAIN-SUFFIX,icloud.com,Proxy
# Force some domains which are fucked by GFW while resolving DNS, or apps don't respect the system proxy
DOMAIN-KEYWORD,google,Proxy,tcp-force
DOMAIN-KEYWORD,facebook,Proxy,tcp-force
DOMAIN-KEYWORD,youtube,Proxy,tcp-force
DOMAIN-KEYWORD,twitter,Proxy,tcp-force
DOMAIN-KEYWORD,gmail,Proxy,tcp-force
# Fix incorrect GeopIP data
DOMAIN-SUFFIX,twimg.com,Proxy
# Workaround for some apps
# Instagram
DOMAIN-KEYWORD,instagram,Proxy,tcp-force
# Telegram
IP-CIDR,91.108.56.0/22,Proxy,tcp-force
IP-CIDR,91.108.4.0/22,Proxy,tcp-force
IP-CIDR,109.239.140.0/24,Proxy,tcp-force
IP-CIDR,149.154.160.0/20,Proxy,tcp-force
# LAN, debugging rules should above this line
IP-CIDR,192.168.0.0/16,DIRECT
IP-CIDR,10.0.0.0/8,DIRECT
IP-CIDR,172.16.0.0/12,DIRECT
IP-CIDR,127.0.0.0/8,DIRECT
# Detect local network
GEOIP,CN,DIRECT
# Use proxy for all others
FINAL,Proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment