Skip to content

Instantly share code, notes, and snippets.

@debiansid
Last active June 20, 2018 02:40
Show Gist options
  • Save debiansid/4dbdf1646964b03b21014423e82b39ff to your computer and use it in GitHub Desktop.
Save debiansid/4dbdf1646964b03b21014423e82b39ff to your computer and use it in GitHub Desktop.
surge-cn.conf
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 127.0.0.1, localhost, *.local
ipv6 = false
allow-wifi-access = false
dns-server = 114.114.114.114, 223.5.5.5, system
[Rule]
# Apple
USER-AGENT,*com.apple.mobileme.fmip1,DIRECT
USER-AGENT,*WeatherFoundation*,DIRECT
USER-AGENT,%E5%9C%B0%E5%9B%BE*,DIRECT // Maps
USER-AGENT,%E8%AE%BE%E7%BD%AE*,DIRECT // Settings
USER-AGENT,com.apple.geod*,DIRECT
USER-AGENT,com.apple.Maps,DIRECT
USER-AGENT,FindMyFriends*,DIRECT
USER-AGENT,FindMyiPhone*,DIRECT
USER-AGENT,FMDClient*,DIRECT
USER-AGENT,FMFD*,DIRECT
USER-AGENT,fmflocatord*,DIRECT
USER-AGENT,geod*,DIRECT
USER-AGENT,locationd*,DIRECT
USER-AGENT,Maps*,DIRECT
DOMAIN,api.smoot.apple.com,DIRECT
DOMAIN,captive.apple.com,DIRECT
DOMAIN,configuration.apple.com,DIRECT
DOMAIN,guzzoni.apple.com,DIRECT
DOMAIN,smp-device-content.apple.com,DIRECT
DOMAIN,xp.apple.com,DIRECT
DOMAIN-SUFFIX,ess.apple.com,DIRECT
DOMAIN-SUFFIX,push-apple.com.akadns.net,DIRECT
DOMAIN-SUFFIX,push.apple.com,DIRECT
DOMAIN,aod.itunes.apple.com,DIRECT // Apple Music Streaming
DOMAIN,api.smoot.apple.cn,DIRECT
DOMAIN,gs-loc.apple.com,DIRECT // Maps
DOMAIN,mvod.itunes.apple.com,DIRECT // Apple Music Streaming
DOMAIN,streamingaudio.itunes.apple.com,DIRECT // Apple Music Streaming
DOMAIN-SUFFIX,cdn-apple.com,DIRECT
DOMAIN-SUFFIX,lcdn-locator.apple.com,DIRECT // Maps
DOMAIN-SUFFIX,lcdn-registration.apple.com,DIRECT // Maps
DOMAIN-SUFFIX,ls.apple.com,DIRECT // Maps
DOMAIN-SUFFIX,mzstatic.com,Proxy // App Store & iTunes Images
DOMAIN-SUFFIX,aaplimg.com,Proxy
DOMAIN-SUFFIX,apple.co,Proxy
DOMAIN-SUFFIX,apple.com,Proxy
DOMAIN-SUFFIX,icloud-content.com,Proxy
DOMAIN-SUFFIX,icloud.com,Proxy
DOMAIN-SUFFIX,itunes.com,Proxy
DOMAIN-SUFFIX,itunes.apple.com,Proxy
DOMAIN-SUFFIX,lookup-api.apple.com,Proxy // Dictionary
DOMAIN-SUFFIX,me.com,Proxy
PROCESS-NAME,storedownloadd,Proxy // Mac App Store
USER-AGENT,com.apple.appstored*,Proxy // iOS App Store
# China Apps
USER-AGENT,MicroMessenger Client,DIRECT
USER-AGENT,MobileAsset*,DIRECT
USER-AGENT,WeChat*,DIRECT
USER-AGENT,MApi*,DIRECT // Dianping
# China
DOMAIN-KEYWORD,alipay,DIRECT
DOMAIN-KEYWORD,taobao,DIRECT
DOMAIN-KEYWORD,alicdn,DIRECT
DOMAIN-SUFFIX,cn,DIRECT
DOMAIN-KEYWORD,baidu,DIRECT
# Misc
DOMAIN,ip.bjango.com,DIRECT // iStat Menu IP Test
# Battle.net
DOMAIN-SUFFIX,blizzard.com,DIRECT
DOMAIN-SUFFIX,battle.net,DIRECT
# Taiwan
DOMAIN-SUFFIX,tw,Proxy
# Against DNS pollution
DOMAIN-KEYWORD,google,Proxy,force-remote-dns
DOMAIN-SUFFIX,gstatic.com,Proxy,force-remote-dns
DOMAIN-KEYWORD,gmail,Proxy,force-remote-dns
DOMAIN-KEYWORD,youtube,Proxy,force-remote-dns
DOMAIN-KEYWORD,facebook,Proxy,force-remote-dns
DOMAIN-SUFFIX,fb.me,Proxy,force-remote-dns
DOMAIN-SUFFIX,fbcdn.net,Proxy,force-remote-dns
DOMAIN-KEYWORD,twitter,Proxy,force-remote-dns
DOMAIN-KEYWORD,instagram,Proxy,force-remote-dns
DOMAIN-KEYWORD,dropbox,Proxy,force-remote-dns
DOMAIN-SUFFIX,twimg.com,Proxy,force-remote-dns
DOMAIN-KEYWORD,blogspot,Proxy,force-remote-dns
DOMAIN-SUFFIX,youtu.be,Proxy,force-remote-dns
DOMAIN-SUFFIX,oculuscdn.com,Proxy,force-remote-dns
DOMAIN-SUFFIX,oculus.com,Proxy,force-remote-dns
DOMAIN-KEYWORD,whatsapp,Proxy,force-remote-dns
# Telegram
IP-CIDR,91.108.56.0/22,Proxy,no-resolve
IP-CIDR,91.108.4.0/22,Proxy,no-resolve
IP-CIDR,91.108.8.0/22,Proxy,no-resolve
IP-CIDR,109.239.140.0/24,Proxy,no-resolve
IP-CIDR,149.154.160.0/20,Proxy,no-resolve
IP-CIDR,149.154.164.0/22,Proxy,no-resolve
# LAN
DOMAIN-SUFFIX,local,DIRECT
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
IP-CIDR,100.64.0.0/10,DIRECT
# GeoIP CN
GEOIP,CN,DIRECT
FINAL,Proxy,dns-failed
[URL Rewrite]
^http://www\.google\.cn http://www.google.com 302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment