Last active
September 24, 2017 02:13
-
-
Save dofy/89a2e7e2676f2a357394d26fcc0de72b to your computer and use it in GitHub Desktop.
如何修改原始 surge.conf 使之支持 proxy group
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
# 支持 proxy group 的 surge 配置 | |
# You can download this config from: http://surge.run/config-example/ios.conf, edit with your computer and copy back to iOS device via iTunes or URL | |
[General] | |
// warning, notify, info, verbose | |
loglevel = notify | |
[Proxy] | |
// 首先增加一个直连配置,这样当你不需要代理的时候, | |
// 可以方便地选择跳过代理而不必退出或停止 surge。 | |
Direct = direct | |
// http, https, socks5 | |
// 增加多台代理服务器配置,“代理名”尽量描述清楚服务器特征。 | |
ServerA = https, 1.2.3.4, 443, username, password | |
ServerB = https, 2.3.4.5, 443, username, password | |
ServerC = https, 3.4.5.6, 443, username, password | |
[Proxy Group] | |
// 这里是代理分组配置,“分组名”可沿用之前的“代理名”,这样规则就不必修改了。 | |
// 保留 select 关键词,direct 技巧不再赘述,后面服务器列表尽量把常用的放在前面。 | |
ProxyA = select,Direct,ServerA,ServerB,ServerC | |
[Rule] | |
DOMAIN-SUFFIX,appldnld.apple.com,DIRECT | |
DOMAIN-SUFFIX,adcdownload.apple.com,DIRECT | |
DOMAIN-SUFFIX,swcdn.apple.com,DIRECT | |
DOMAIN-SUFFIX,phobos.apple.com,DIRECT | |
DOMAIN-KEYWORD,google,ProxyA | |
DOMAIN-KEYWORD,facebook,ProxyA | |
DOMAIN-KEYWORD,blogspot,ProxyA | |
DOMAIN-KEYWORD,youtube,ProxyA | |
DOMAIN-SUFFIX,apple.com,ProxyA | |
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 | |
GEOIP,CN,DIRECT | |
FINAL,ProxyA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment