Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Surge Configs ( for 2.x )
[General]
loglevel = notify
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:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115
# external-controller-access = PASSWORD@0.0.0.0:6155
# ipv6 = true
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD
[Proxy]
Direct = direct
// ADD YOUR PROXY BELOW, DON'T FORGET TO REMOVE # , THERE'RE 4 TYPES OF PROXIES, YOU HAVE TO PICK UP THE RIGHT ONES.
# Proxy1 = http,$IP,$PORT,$USERNAME,$PASSWORD
# Proxy2 = https,$IP,$PORT,$USERNAME,$PASSWORD
# Proxy3 = socks,$IP,$PORT,$USERNAME,$PASSWORD
# Proxy4 = custom,$IP,$PORT,$METHOR,$PASSWORD,$MODULE_URL
// CUSTOM ALMOST MEANS, SHADOWSOCKS. YOU HAVE TO GET THE SHADOWSOCKS MODULE BEFORE USING SHADOWSOCKS PROXY, HERE'S ONE: https://dl.dropboxusercontent.com/u/760466/SSEncrypt.module
// YOU CAN ADD LOTS OF PROXIES HERE.
# [SSID Setting]
# WiFi-SSID-NAME suspend=true
// YOU CAN SUSPEND SURGE ON CERTAIN WIFI
[Proxy Group]
Proxy = select, AutoGroup, Direct, Proxy1, Proxy2, Proxy3, Proxy4, Proxy5, Proxy6, Proxy7
AutoGroup = url-test, Proxy1, Proxy2, Proxy3, Proxy4, Proxy5, Proxy6, Proxy7, url = http://www.gstatic.com/generate_204
# SSID-Group = ssid, default = Proxy1, cellular = Proxy2, WiFi-SSID-NAME1 = Proxy 3 ,WiFi-SSID-NAME2 = DIRECT
// IF YOU WANT TO CHANGE PROXY BASED ON WiFi SSID, REMOVE THE # ABOVE.
[URL Rewrite]
^http://www.kenengba.com https://kenengba.com 302
// 302 REDIRECT
[Rule]
//BLOCK ADS
DOMAIN-SUFFIX,mgid.com,REJECT
DOMAIN-SUFFIX,ad-stir.com,REJECT
DOMAIN-SUFFIX,gssprt.jp,REJECT
DOMAIN-KEYWORD,adlooxtracking.com,REJECT
DOMAIN-SUFFIX,unimhk.com,REJECT
DOMAIN-SUFFIX,adsfactor.net,REJECT
DOMAIN-KEYWORD,gssp.asia,REJECT
DOMAIN-KEYWORD,genieesspv.jp,REJECT
DOMAIN-KEYWORD,criteo.com,REJECT
DOMAIN-SUFFIX,sax.sina.cn,REJECT
DOMAIN-SUFFIX,tanx.com,REJECT
DOMAIN-SUFFIX,ads.genieessp.com,REJECT
DOMAIN-SUFFIX,ad.unimhk.com,REJECT
DOMAIN-SUFFIX,cpro.baidustatic.com,REJECT
DOMAIN-SUFFIX,m.simaba.taobao.com,REJECT
DOMAIN-SUFFIX,ads.yahoo.com,REJECT
DOMAIN-SUFFIX,ib.adnxs.com,REJECT
//NORMAL RULES
DOMAIN-KEYWORD,instagram,Proxy,force-remote-dns
DOMAIN-KEYWORD,blogspot,Proxy,force-remote-dns
DOMAIN-KEYWORD,google,Proxy,force-remote-dns
DOMAIN-KEYWORD,facebook,Proxy,force-remote-dns
DOMAIN-KEYWORD,youtube,Proxy,force-remote-dns
DOMAIN-KEYWORD,twitter,Proxy,force-remote-dns
DOMAIN-KEYWORD,gmail,Proxy,force-remote-dns
DOMAIN-SUFFIX,twimg.com,Proxy,force-remote-dns
DOMAIN-SUFFIX,kenengba.com,Proxy,force-remote-dns
DOMAIN-SUFFIX,cn,DIRECT
DOMAIN-SUFFIX,jd.com,DIRECT
DOMAIN-SUFFIX,yhd.com,DIRECT
DOMAIN-SUFFIX,58cdn.com,DIRECT
DOMAIN-SUFFIX,qunarzz.com,DIRECT
DOMAIN-SUFFIX,avosapps.com,DIRECT
DOMAIN-SUFFIX,mob.com,DIRECT
DOMAIN-SUFFIX,same.com,DIRECT
DOMAIN-SUFFIX,toutiao.com,DIRECT
DOMAIN-SUFFIX,zaih.com,DIRECT
DOMAIN-SUFFIX,lantouzi.com,DIRECT
DOMAIN-SUFFIX,smzdm.com,DIRECT
DOMAIN-SUFFIX,126.net,DIRECT
DOMAIN-SUFFIX,163.com,DIRECT
DOMAIN-SUFFIX,alicdn.com,DIRECT
DOMAIN-SUFFIX,amap.com,DIRECT
DOMAIN-SUFFIX,bdimg.com,DIRECT
DOMAIN-SUFFIX,bdstatic.com,DIRECT
DOMAIN-SUFFIX,cnbeta.com,DIRECT
DOMAIN-SUFFIX,cnzz.com,DIRECT
DOMAIN-SUFFIX,douban.com,DIRECT
DOMAIN-SUFFIX,gtimg.com,DIRECT
DOMAIN-SUFFIX,hao123.com,DIRECT
DOMAIN-SUFFIX,haosou.com,DIRECT
DOMAIN-SUFFIX,ifeng.com,DIRECT
DOMAIN-SUFFIX,iqiyi.com,DIRECT
DOMAIN-SUFFIX,netease.com,DIRECT
DOMAIN-SUFFIX,qhimg.com,DIRECT
DOMAIN-SUFFIX,qq.com,DIRECT
DOMAIN-SUFFIX,sogou.com,DIRECT
DOMAIN-SUFFIX,sohu.com,DIRECT
DOMAIN-SUFFIX,soso.com,DIRECT
DOMAIN-SUFFIX,suning.com,DIRECT
DOMAIN-SUFFIX,tmall.com,DIRECT
DOMAIN-SUFFIX,tudou.com,DIRECT
DOMAIN-SUFFIX,weibo.com,DIRECT
DOMAIN-SUFFIX,youku.com,DIRECT
DOMAIN-SUFFIX,xunlei.com,DIRECT
DOMAIN-SUFFIX,zhihu.com,DIRECT
DOMAIN-SUFFIX,huofu.com,DIRECT
DOMAIN-SUFFIX,5wei.com,DIRECT
DOMAIN-SUFFIX,travelrely.com,DIRECT
DOMAIN-KEYWORD,alipay,DIRECT
DOMAIN-KEYWORD,taobao,DIRECT
DOMAIN-KEYWORD,baidu,DIRECT
DOMAIN-KEYWORD,360buy,DIRECT
DOMAIN-KEYWORD,baidu,DIRECT
DOMAIN-SUFFIX,appldnld.apple.com,DIRECT
DOMAIN-SUFFIX,adcdownload.apple.com,DIRECT
DOMAIN-SUFFIX,lcdn-registration.apple.com,DIRECT
DOMAIN-SUFFIX,swcdn.apple.com,DIRECT
DOMAIN-SUFFIX,phobos.apple.com,DIRECT
DOMAIN-SUFFIX,ls.apple.com,DIRECT
DOMAIN,aod.itunes.apple.com,Proxy
DOMAIN,osxapps.itunes.apple.com,Proxy
DOMAIN,streamingaudio.itunes.apple.com,Proxy
DOMAIN-SUFFIX,icloud.com,Proxy
DOMAIN-SUFFIX,apple.com,Proxy
DOMAIN-SUFFIX,amazonaws.com,Proxy
DOMAIN-SUFFIX,android.com,Proxy
DOMAIN-SUFFIX,angularjs.org,Proxy
DOMAIN-SUFFIX,appspot.com,Proxy
DOMAIN-SUFFIX,akamaihd.net,Proxy
DOMAIN-SUFFIX,amazon.com,Proxy
DOMAIN-SUFFIX,bit.ly,Proxy
DOMAIN-SUFFIX,bitbucket.org,Proxy
DOMAIN-SUFFIX,blog.com,Proxy
DOMAIN-SUFFIX,blogcdn.com,Proxy
DOMAIN-SUFFIX,blogger.com,Proxy
DOMAIN-SUFFIX,blogsmithmedia.com,Proxy
DOMAIN-SUFFIX,box.net,Proxy
DOMAIN-SUFFIX,bloomberg.com,Proxy
DOMAIN-SUFFIX,chromium.org,Proxy
DOMAIN-SUFFIX,cl.ly,Proxy
DOMAIN-SUFFIX,cloudfront.net,Proxy
DOMAIN-SUFFIX,cloudflare.com,Proxy
DOMAIN-SUFFIX,cocoapods.org,Proxy
DOMAIN-SUFFIX,crashlytics.com,Proxy
DOMAIN-SUFFIX,dribbble.com,Proxy
DOMAIN-SUFFIX,dropbox.com,Proxy
DOMAIN-SUFFIX,dropboxstatic.com,Proxy
DOMAIN-SUFFIX,dropboxusercontent.com,Proxy
DOMAIN-SUFFIX,docker.com,Proxy
DOMAIN-SUFFIX,duckduckgo.com,Proxy
DOMAIN-SUFFIX,digicert.com,Proxy
DOMAIN-SUFFIX,dnsimple.com,Proxy
DOMAIN-SUFFIX,edgecastcdn.net,Proxy
DOMAIN-SUFFIX,engadget.com,Proxy
DOMAIN-SUFFIX,eurekavpt.com,Proxy
DOMAIN-SUFFIX,fb.me,Proxy
DOMAIN-SUFFIX,fbcdn.net,Proxy
DOMAIN-SUFFIX,fc2.com,Proxy
DOMAIN-SUFFIX,feedburner.com,Proxy
DOMAIN-SUFFIX,fabric.io,Proxy
DOMAIN-SUFFIX,flickr.com,Proxy
DOMAIN-SUFFIX,fastly.net,Proxy
DOMAIN-SUFFIX,ggpht.com,Proxy
DOMAIN-SUFFIX,github.com,Proxy
DOMAIN-SUFFIX,github.io,Proxy
DOMAIN-SUFFIX,githubusercontent.com,Proxy
DOMAIN-SUFFIX,golang.org,Proxy
DOMAIN-SUFFIX,goo.gl,Proxy
DOMAIN-SUFFIX,gstatic.com,Proxy
DOMAIN-SUFFIX,godaddy.com,Proxy
DOMAIN-SUFFIX,gravatar.com,Proxy
DOMAIN-SUFFIX,imageshack.us,Proxy
DOMAIN-SUFFIX,imgur.com,Proxy
DOMAIN-SUFFIX,jshint.com,Proxy
DOMAIN-SUFFIX,ift.tt,Proxy
DOMAIN-SUFFIX,itunes.com,Proxy
DOMAIN-SUFFIX,j.mp,Proxy
DOMAIN-SUFFIX,kat.cr,Proxy
DOMAIN-SUFFIX,linode.com,Proxy
DOMAIN-SUFFIX,linkedin.com,Proxy
DOMAIN-SUFFIX,licdn.com,Proxy
DOMAIN-SUFFIX,lithium.com,Proxy
DOMAIN-SUFFIX,megaupload.com,Proxy
DOMAIN-SUFFIX,mobile01.com,Proxy
DOMAIN-SUFFIX,modmyi.com,Proxy
DOMAIN-SUFFIX,mzstatic.com,Proxy
DOMAIN-SUFFIX,nytimes.com,Proxy
DOMAIN-SUFFIX,name.com,Proxy
DOMAIN-SUFFIX,openvpn.net,Proxy
DOMAIN-SUFFIX,openwrt.org,Proxy
DOMAIN-SUFFIX,ow.ly,Proxy
DOMAIN-SUFFIX,pinboard.in,Proxy
DOMAIN-SUFFIX,Proxyl-images-amazon.com,Proxy
DOMAIN-SUFFIX,Proxytatic.net,Proxy
DOMAIN-SUFFIX,stackoverflow.com,Proxy
DOMAIN-SUFFIX,staticflickr.com,Proxy
DOMAIN-SUFFIX,squarespace.com,Proxy
DOMAIN-SUFFIX,symcd.com,Proxy
DOMAIN-SUFFIX,symcb.com,Proxy
DOMAIN-SUFFIX,symauth.com,Proxy
DOMAIN-SUFFIX,ubnt.com,Proxy
DOMAIN-SUFFIX,t.co,Proxy
DOMAIN-SUFFIX,thepiratebay.org,Proxy
DOMAIN-SUFFIX,tumblr.com,Proxy
DOMAIN-SUFFIX,twimg.com,Proxy
DOMAIN-SUFFIX,twitch.tv,Proxy
DOMAIN-SUFFIX,twitter.com,Proxy
DOMAIN-SUFFIX,wikipedia.com,Proxy
DOMAIN-SUFFIX,wikipedia.org,Proxy
DOMAIN-SUFFIX,wikimedia.org,Proxy
DOMAIN-SUFFIX,wordpress.com,Proxy
DOMAIN-SUFFIX,wsj.com,Proxy
DOMAIN-SUFFIX,wsj.net,Proxy
DOMAIN-SUFFIX,wp.com,Proxy
DOMAIN-SUFFIX,vimeo.com,Proxy
DOMAIN-SUFFIX,youtu.be,Proxy
DOMAIN-SUFFIX,ytimg.com,Proxy
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,91.108.56.0/22,Proxy,no-resolve
IP-CIDR,91.108.4.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
GEOIP,CN,DIRECT
FINAL,Proxy
@pluwen

This comment has been minimized.

Copy link

commented Oct 26, 2015

腾讯的DNS也不错 119.29.29.29

@larryzhao

This comment has been minimized.

Copy link

commented Oct 27, 2015

求问一下,在 config 里加入了如下设置:

[Proxy]
Proxy = custom,<myip>,<myport>,rc-md5,<mypass>,<ssmodule_url>

为什么 Surge 一直提示这行是 Invalid Line ?

@iHaPBoy

This comment has been minimized.

Copy link

commented Oct 27, 2015

屏蔽优酷广告:
DOMAIN-SUFFIX,atm.youku.com,REJECT
DOMAIN,ad.api.3g.youku.com,REJECT

@KushNee

This comment has been minimized.

Copy link

commented Oct 28, 2015

求教一下,apple.com走代理的话会不会出现app store打不开?

@hxueh

This comment has been minimized.

Copy link

commented Oct 30, 2015

您好我想用您的当框架改一下然后分享可以吗

@EvynXu

This comment has been minimized.

Copy link

commented Oct 31, 2015

请问surge_main.conf放入后invalid, “Unknown proxy name:Proxy”,文件未曾修改是需要调整哪行代码吗?

@knightao

This comment has been minimized.

Copy link

commented Nov 1, 2015

标记下

@Chen-tao

This comment has been minimized.

Copy link

commented Nov 2, 2015

回答一下上面的问题,相关配置比如username,passwd,需要改成你自己的服务才可以,配置文件不是复制就能用了= =

@mirifem

This comment has been minimized.

Copy link

commented Nov 3, 2015

我有一个ss帐号,一个https帐号。是否必须每次编辑surge_proxy.conf,能不能做到一键切换?

@crystoneme

This comment has been minimized.

Copy link

commented Nov 5, 2015

@mirifem 可以做到的。一个文件专门用于代理规则,另一个覆盖文件用于写代理地址。一个文件一个地址,随时切换

@Kimsonchuh

This comment has been minimized.

Copy link

commented Nov 9, 2015

@EvynXu 把proxy模块中的proxy0行代码中的0去掉试试,我这边就这样解决的

@FrankKoo

This comment has been minimized.

Copy link

commented Nov 11, 2015

@Kimsonchuh 我也出现同样的问题, 但是并没有找到0行代码和代码中的0,能不能详细解释一下?谢谢了

@jackberry

This comment has been minimized.

Copy link

commented Nov 21, 2015

过来学习

@MerenguesGeek

This comment has been minimized.

Copy link

commented Dec 24, 2015

@FrankKoo 应该是规则里面"Proxy"的大小写写错了,仔细检查一下。

@dantigone

This comment has been minimized.

Copy link

commented Jan 31, 2016

70行和72行,baidu重复了。。。

@ximenk

This comment has been minimized.

Copy link

commented Mar 4, 2016

拿来做框架用的

@guyueshui

This comment has been minimized.

Copy link

commented Mar 4, 2016

一个写代理规则,一个写代理地址,到底是怎么实现的啊?我分开写总是提示错误啊?求解。

@elonwoo

This comment has been minimized.

Copy link

commented Mar 13, 2016

用这个配置玩Clash Royale时会掉线,不知道大家有没有这个情况

@jason5ng32

This comment has been minimized.

Copy link
Owner Author

commented Jun 30, 2016

更新一下。

@miamiweekend

This comment has been minimized.

Copy link

commented Jun 30, 2016

你好 为什么我更新2.0以后surge就连不上vpn了,更新之前都是一切正常

@zxfccmm4

This comment has been minimized.

Copy link

commented Jul 1, 2016

`# [SSID Setting]

WiFi-SSID-NAME suspend=true

`
很想知道这个功能怎么用

@luzhaohui

This comment has been minimized.

Copy link

commented Jul 12, 2016

@zxfccmm4 [SSID Setting]是用來指定某個Wi-Fi讓Surge暫停工作,主要是為了解決行車記錄儀的Wi-Fi連接問題。

@musray

This comment has been minimized.

Copy link

commented Aug 28, 2016

@larryzhao surge会对字段的值进行检查。你的加密方式改成rc4-md5试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.