Skip to content

Instantly share code, notes, and snippets.

@FEncoder
Forked from janlay/README.md
Created December 2, 2015 06:09
Show Gist options
  • Save FEncoder/cc40051952f6a8f25bce to your computer and use it in GitHub Desktop.
Save FEncoder/cc40051952f6a8f25bce to your computer and use it in GitHub Desktop.

Revisions

  1. @janlay janlay revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    2. Use [Text Builder](https://github.com/janlay/text-builder) to build configuration for Surge:
    `$ text-builder -index /path/to/index.txt`
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
    4.


    > 本人不提供任何保证和技术支持,使用者自负风险。
    > There are no guarantees, no any support. Use it at your own risk.
  2. @janlay janlay revised this gist Nov 24, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
    4.

    > 本人不提供任何保证和技术支持,使用者自负风险。
    > 本人不提供任何保证和技术支持,使用者自负风险。
    > There are no guarantees, no any support. Use it at your own risk.
  3. @janlay janlay revised this gist Nov 24, 2015. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,8 @@
    1. Modify index.txt with your output path and proxy info
    2. Use [Text Builder](https://github.com/janlay/text-builder) to build configuration for Surge:
    `$ text-builder -index /path/to/index.txt`
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
    4.

    > 本人不提供任何保证和技术支持,使用者自负风险。
    > There are no guarantees, no any support. Use it at your own risk.
  4. @janlay janlay revised this gist Nov 24, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion general.txt
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,5 @@
    interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 17.0.0.0/8, localhost, *.local, e.crashlytics.com
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost, *.local, e.crashlytics.com
    # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
  5. @janlay janlay revised this gist Nov 22, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ## Install
    1. Modify index.txt with your output path and proxy info
    2. Use Text Builder to build configuration for Surge:
    2. Use [Text Builder](https://github.com/janlay/text-builder) to build configuration for Surge:
    `$ text-builder -index /path/to/index.txt`
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
  6. @janlay janlay revised this gist Nov 22, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    ## Install
    1. Modify index.txt with your output path and proxy info
    2. Use Text Builder to build configuration for Surge:
    `$ text-builder -index /path/to/index.txt`
    `$ text-builder -index /path/to/index.txt`
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud
  7. @janlay janlay revised this gist Nov 22, 2015. 1 changed file with 4 additions and 17 deletions.
    21 changes: 4 additions & 17 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,4 @@
    ## Install Configurations
    1. Create your own start.conf:
    - Open Surge for iOS, Tap Download Configuration from URL, input the template config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/start.conf
    2. Download rules.conf
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    3. Tap start.conf in the configuration list, then tap Start button.

    ## Update Rules
    1. Update rules.conf
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    2. In Surge app, tap Stop if have already started, tap Start to take effect.

    ## Advanced Tips:
    - Working together with Launch Center Pro: surge:///install-config?url=https%3A%2F%2Fgistcdn1.captainz.cc%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf
    ## Install
    1. Modify index.txt with your output path and proxy info
    2. Use Text Builder to build configuration for Surge:
    `$ text-builder -index /path/to/index.txt`
  8. @janlay janlay revised this gist Nov 22, 2015. 2 changed files with 2 additions and 3 deletions.
    3 changes: 2 additions & 1 deletion index.txt
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,8 @@
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    [Proxy]
    #include proxy.txt
    # Use your own proxy info here
    Proxy = http, 1.2.3.4, 1234

    [Rule]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-app-blockers.txt
    2 changes: 0 additions & 2 deletions proxy.txt
    Original file line number Diff line number Diff line change
    @@ -1,2 +0,0 @@
    # Use your own proxy info here
    Proxy = http, 1.2.3.4, 1234
  9. @janlay janlay revised this gist Nov 22, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions index.txt
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,13 @@
    #output /Users/janlay/Library/Mobile Documents/com~apple~CloudDocs/Surge.conf
    [General]
    #include general.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    [Proxy]
    #include proxy.txt

    [Rule]
    #include rules-app-blockers.txt
    #include rules-main.txt
    #include rules-apps.txt
    #include rules-lan.txt
    #include rules-final.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-app-blockers.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-main.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-apps.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-lan.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-final.txt
  10. @janlay janlay revised this gist Nov 22, 2015. 7 changed files with 92 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions general.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # used by Surge for Mac
    interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 17.0.0.0/8, localhost, *.local, e.crashlytics.com
    2 changes: 2 additions & 0 deletions proxy.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # Use your own proxy info here
    Proxy = http, 1.2.3.4, 1234
    31 changes: 31 additions & 0 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, applovin.com, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, sponsorpay.com, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT

    # Prevent stream services from displaying ads
    DOMAIN, ad.api.3g.youku.com, REJECT
    DOMAIN, agn.aty.sohu.com, REJECT
    DOMAIN, ark.letv.com, REJECT
    DOMAIN, asimgs.pplive.cn, REJECT
    DOMAIN, atm.youku.com, REJECT
    DOMAIN, lives.l.qq.com, REJECT

    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT
    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
    10 changes: 10 additions & 0 deletions rules-apps.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD, instagram, Proxy, force-remote-dns
    # SeekingAlpha
    DOMAIN-SUFFIX, seekingalpha.com, DIRECT
    # Telegram
    IP-CIDR, 109.239.140.0/24, Proxy, no-resolve
    IP-CIDR, 149.154.160.0/20, Proxy, no-resolve
    IP-CIDR, 91.108.4.0/22, Proxy, no-resolve
    IP-CIDR, 91.108.56.0/22, Proxy, no-resolve
    4 changes: 4 additions & 0 deletions rules-final.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Detect local network
    GEOIP, CN, DIRECT
    # Use proxy for all others
    FINAL, Proxy
    6 changes: 6 additions & 0 deletions rules-lan.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # Reserved networks, debugging rules should place above this line
    IP-CIDR, 10.0.0.0/8, DIRECT
    IP-CIDR, 100.64.0.0/10, DIRECT
    IP-CIDR, 127.0.0.0/8, DIRECT
    IP-CIDR, 172.0.0.0/8, DIRECT
    IP-CIDR, 192.168.0.0/16, DIRECT
    34 changes: 34 additions & 0 deletions rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-KEYWORD, ali, DIRECT
    DOMAIN-KEYWORD, taobao, DIRECT
    DOMAIN-KEYWORD, 360, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-SUFFIX, 126.net, DIRECT
    DOMAIN-SUFFIX, 163.com, DIRECT
    DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT

    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    DOMAIN-SUFFIX, itunes.apple.com, DIRECT
    DOMAIN-SUFFIX, dl.google.com, DIRECT

    # Apple services
    DOMAIN-SUFFIX, apple.com, Proxy
    DOMAIN-SUFFIX, icloud.com, Proxy
    DOMAIN-SUFFIX, mzstatic.com, Proxy
    DOMAIN-KEYWORD, aka, Proxy

    # Streaming services, comment out if you don't need
    DOMAIN-KEYWORD, qiyi, DIRECT
    DOMAIN-KEYWORD, sohu, DIRECT

    # Force some domains which are fucked by GFW while resolving DNS
    DOMAIN-KEYWORD, facebook, Proxy, force-remote-dns
    DOMAIN-KEYWORD, gmail, Proxy, force-remote-dns
    DOMAIN-KEYWORD, google, Proxy, force-remote-dns
    DOMAIN-KEYWORD, twitter, Proxy, force-remote-dns
    DOMAIN-KEYWORD, youtube, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
  11. @janlay janlay revised this gist Nov 22, 2015. 3 changed files with 13 additions and 117 deletions.
    13 changes: 13 additions & 0 deletions index.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #output /Users/janlay/Library/Mobile Documents/com~apple~CloudDocs/Surge.conf
    [General]
    #include general.txt

    [Proxy]
    #include proxy.txt

    [Rule]
    #include rules-app-blockers.txt
    #include rules-main.txt
    #include rules-apps.txt
    #include rules-lan.txt
    #include rules-final.txt
    113 changes: 0 additions & 113 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,113 +0,0 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # This file depends on the start.conf which defines your own proxy.
    # Check start.conf for more details and understand how the directive `PROXY-OVERRIDE` works.

    [General]
    loglevel = notify
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
    # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    # leave this line
    [Proxy]
    Proxy = https, 1.2.3.4, 1234

    [Rule]
    # Accelerate most visited sites, part 1
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-KEYWORD, ali, DIRECT
    DOMAIN-KEYWORD, taobao, DIRECT

    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, applovin.com, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, sponsorpay.com, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT

    # Prevent stream services from displaying ads
    DOMAIN, ad.api.3g.youku.com, REJECT
    DOMAIN, agn.aty.sohu.com, REJECT
    DOMAIN, ark.letv.com, REJECT
    DOMAIN, asimgs.pplive.cn, REJECT
    DOMAIN, atm.youku.com, REJECT
    DOMAIN, lives.l.qq.com, REJECT

    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT
    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-KEYWORD, 360, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-SUFFIX, 126.net, DIRECT
    DOMAIN-SUFFIX, 163.com, DIRECT
    DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT

    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    DOMAIN-SUFFIX, itunes.apple.com, DIRECT
    DOMAIN-SUFFIX, dl.google.com, DIRECT

    # Apple services
    DOMAIN-SUFFIX, apple.com, Proxy
    DOMAIN-SUFFIX, icloud.com, Proxy
    DOMAIN-SUFFIX, mzstatic.com, Proxy
    DOMAIN-KEYWORD, aka, Proxy

    # Streaming services, comment out if you don't need
    DOMAIN-KEYWORD, qiyi, DIRECT
    DOMAIN-KEYWORD, sohu, DIRECT

    # Force some domains which are fucked by GFW while resolving DNS
    DOMAIN-KEYWORD, facebook, Proxy, force-remote-dns
    DOMAIN-KEYWORD, gmail, Proxy, force-remote-dns
    DOMAIN-KEYWORD, google, Proxy, force-remote-dns
    DOMAIN-KEYWORD, twitter, Proxy, force-remote-dns
    DOMAIN-KEYWORD, youtube, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns

    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD, instagram, Proxy, force-remote-dns
    # SeekingAlpha
    DOMAIN-SUFFIX, seekingalpha.com, DIRECT
    # Ads in iQiyi
    # IP-CIDR, 122.228.0.0/16, REJECT, no-resolve
    # IP-CIDR, 61.128.0.0/10, REJECT, no-resolve
    # IP-CIDR, 115.224.0.0/12, REJECT, no-resolve
    # IP-CIDR, 183.128.0.0/10, REJECT, no-resolve
    # Telegram
    IP-CIDR, 109.239.140.0/24, Proxy, no-resolve
    IP-CIDR, 149.154.160.0/20, Proxy, no-resolve
    IP-CIDR, 91.108.4.0/22, Proxy, no-resolve
    IP-CIDR, 91.108.56.0/22, Proxy, no-resolve

    # Reserved networks, debugging rules should place above this line
    IP-CIDR, 10.0.0.0/8, DIRECT
    IP-CIDR, 100.64.0.0/10, DIRECT
    IP-CIDR, 127.0.0.0/8, DIRECT
    IP-CIDR, 172.0.0.0/8, DIRECT
    IP-CIDR, 192.168.0.0/16, DIRECT

    # Detect local network
    GEOIP, CN, DIRECT
    # Use proxy for all others
    FINAL, Proxy
    4 changes: 0 additions & 4 deletions start.conf
    Original file line number Diff line number Diff line change
    @@ -1,4 +0,0 @@
    #!PROXY-OVERRIDE:rules.conf
    [Proxy]
    # Use your own proxy config here
    Proxy = https, server, port, username, password
  12. @janlay janlay revised this gist Nov 16, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    ## Install Configurations
    1. Create your own start.conf:
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgistcdn1.captainz.cc%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Fstart.conf) to install start.conf from template (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the template config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/start.conf
    2. Download rules.conf
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgistcdn1.captainz.cc%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    3. Tap start.conf in the configuration list, then tap Start button.

    ## Update Rules
    1. Update rules.conf
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgistcdn1.captainz.cc%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    2. In Surge app, tap Stop if have already started, tap Start to take effect.

    ## Advanced Tips:
    - Working together with Launch Center Pro: surge:///install-config?url=https%3A%2F%2Fgistcdn1.captainz.cc%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf
  13. @janlay janlay revised this gist Nov 16, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,17 @@
    ## Install Configurations
    1. Create your own start.conf:
    - Tap [here](https://gist.githubusercontent.com/janlay/b57476c72a93b7e622a6/raw/start.conf) to install start.conf from template (build 386+)
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgist.githubusercontent.com%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Fstart.conf) to install start.conf from template (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the template config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/start.conf
    2. Download rules.conf
    - Tap [here](https://gist.githubusercontent.com/janlay/b57476c72a93b7e622a6/raw/rules.conf) to install (build 386+)
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgist.githubusercontent.com%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    3. Tap start.conf in the configuration list, then tap Start button.

    ## Update Rules
    1. Update rules.conf
    - Tap [here](https://gist.githubusercontent.com/janlay/b57476c72a93b7e622a6/raw/rules.conf) to install (build 386+)
    - Tap [here](surge:///install-config?url=https%3A%2F%2Fgist.githubusercontent.com%2Fjanlay%2Fb57476c72a93b7e622a6%2Fraw%2Frules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    2. In Surge app, tap Stop if have already started, tap Start to take effect.
  14. @janlay janlay revised this gist Nov 16, 2015. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    ## Install Configurations
    1. Create your own start.conf:
    - Tap [here](https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/start.conf) to install start.conf from template (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the template config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/start.conf
    2. Download rules.conf
    - Tap [here](https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    3. Tap start.conf in the configuration list, then tap Start button.

    ## Update Rules
    1. Update rules.conf
    - Tap [here](https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf) to install (build 386+)
    - Open Surge for iOS, Tap Download Configuration from URL, input the config URL:
    https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules.conf
    2. In Surge app, tap Stop if have already started, tap Start to take effect.
  15. @janlay janlay revised this gist Nov 16, 2015. No changes.
  16. @janlay janlay revised this gist Nov 13, 2015. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -87,11 +87,13 @@ DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD, instagram, Proxy, force-remote-dns
    # SeekingAlpha
    DOMAIN-SUFFIX, seekingalpha.com, DIRECT
    # Ads in iQiyi
    IP-CIDR, 122.228.0.0/16, REJECT, no-resolve
    IP-CIDR, 61.128.0.0/10, REJECT, no-resolve
    IP-CIDR, 115.224.0.0/12, REJECT, no-resolve
    IP-CIDR, 183.128.0.0/10, REJECT, no-resolve
    # IP-CIDR, 122.228.0.0/16, REJECT, no-resolve
    # IP-CIDR, 61.128.0.0/10, REJECT, no-resolve
    # IP-CIDR, 115.224.0.0/12, REJECT, no-resolve
    # IP-CIDR, 183.128.0.0/10, REJECT, no-resolve
    # Telegram
    IP-CIDR, 109.239.140.0/24, Proxy, no-resolve
    IP-CIDR, 149.154.160.0/20, Proxy, no-resolve
  17. @janlay janlay revised this gist Nov 11, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,7 @@ Proxy = https, 1.2.3.4, 1234

    [Rule]
    # Accelerate most visited sites, part 1
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-KEYWORD, ali, DIRECT
    DOMAIN-KEYWORD, taobao, DIRECT

    @@ -34,7 +35,6 @@ DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, sinajs.cn, REJECT
    DOMAIN-SUFFIX, sponsorpay.com, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT

    @@ -52,7 +52,6 @@ DOMAIN, fonts.googleapis.com, REJECT
    DOMAIN, init.icloud-analysis.com, REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-KEYWORD, 360, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-SUFFIX, 126.net, DIRECT
  18. @janlay janlay revised this gist Nov 9, 2015. 2 changed files with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # This file depends on the main.conf which defines your own proxy.
    # Check main.conf for more details and understand how the directive `PROXY-OVERRIDE` works.
    # This file depends on the start.conf which defines your own proxy.
    # Check start.conf for more details and understand how the directive `PROXY-OVERRIDE` works.

    [General]
    loglevel = notify
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
    # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    # Leave these two lines
    # leave this line
    [Proxy]
    Proxy = https, 1.2.3.4, 1234

    @@ -88,8 +88,11 @@ DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD, instagram, Proxy, force-remote-dns
    # Ads in iqiyi
    IP-CIDR, 221.179.140.0/24, REJECT, no-resolve
    # Ads in iQiyi
    IP-CIDR, 122.228.0.0/16, REJECT, no-resolve
    IP-CIDR, 61.128.0.0/10, REJECT, no-resolve
    IP-CIDR, 115.224.0.0/12, REJECT, no-resolve
    IP-CIDR, 183.128.0.0/10, REJECT, no-resolve
    # Telegram
    IP-CIDR, 109.239.140.0/24, Proxy, no-resolve
    IP-CIDR, 149.154.160.0/20, Proxy, no-resolve
    File renamed without changes.
  19. @janlay janlay revised this gist Nov 8, 2015. 2 changed files with 43 additions and 40 deletions.
    4 changes: 4 additions & 0 deletions main.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #!PROXY-OVERRIDE:rules.conf
    [Proxy]
    # Use your own proxy config here
    Proxy = https, server, port, username, password
    79 changes: 39 additions & 40 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,15 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # This file depends on the main.conf which defines your own proxy.
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
    # [Proxy]
    # Proxy = https, server.address, port, username, password
    # ---- END ----
    #
    # Make sure the PROXY-OVERRIDE line included in the main.conf
    # Check main.conf for more details and understand how the directive `PROXY-OVERRIDE` works.

    [General]
    loglevel = notify
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
    dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
    # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    # stub proxy to stop surge complaining, leave this.
    # Leave these two lines
    [Proxy]
    Proxy = https, 1.2.3.4, 1234

    @@ -26,44 +19,48 @@ DOMAIN-KEYWORD, ali, DIRECT
    DOMAIN-KEYWORD, taobao, DIRECT

    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, applovin.com, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, sinajs.cn, REJECT
    DOMAIN-SUFFIX, sponsorpay.com, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT

    # Prevent stream services from displaying ads
    DOMAIN, ad.api.3g.youku.com, REJECT
    DOMAIN, atm.youku.com, REJECT
    DOMAIN, lives.l.qq.com, REJECT
    DOMAIN, agn.aty.sohu.com, REJECT
    DOMAIN, ark.letv.com, REJECT
    DOMAIN, asimgs.pplive.cn, REJECT
    DOMAIN, atm.youku.com, REJECT
    DOMAIN, lives.l.qq.com, REJECT

    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT
    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
    # Other privacy trackers
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, sinajs.cn, REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, 163.com, DIRECT
    DOMAIN-KEYWORD, 360, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-SUFFIX, 126.net, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, 163.com, DIRECT
    DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-KEYWORD, 360, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT

    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    @@ -77,32 +74,34 @@ DOMAIN-SUFFIX, mzstatic.com, Proxy
    DOMAIN-KEYWORD, aka, Proxy

    # Streaming services, comment out if you don't need
    DOMAIN-KEYWORD, sohu, DIRECT
    DOMAIN-KEYWORD, qiyi, DIRECT
    DOMAIN-KEYWORD, sohu, DIRECT

    # Force some domains which are fucked by GFW while resolving 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-KEYWORD, google, Proxy, force-remote-dns
    DOMAIN-KEYWORD, twitter, Proxy, force-remote-dns
    DOMAIN-KEYWORD, youtube, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns

    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD, instagram, Proxy, force-remote-dns
    # Ads in iqiyi
    IP-CIDR, 221.179.140.0/24, REJECT, no-resolve
    # Telegram
    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
    IP-CIDR, 91.108.4.0/22, Proxy, no-resolve
    IP-CIDR, 91.108.56.0/22, Proxy, no-resolve

    # Reserved networks, debugging rules should place above this line
    IP-CIDR, 192.168.0.0/16, DIRECT
    IP-CIDR, 10.0.0.0/8, DIRECT
    IP-CIDR, 172.0.0.0/8, DIRECT
    IP-CIDR, 127.0.0.0/8, DIRECT
    IP-CIDR, 100.64.0.0/10, DIRECT
    IP-CIDR, 127.0.0.0/8, DIRECT
    IP-CIDR, 172.0.0.0/8, DIRECT
    IP-CIDR, 192.168.0.0/16, DIRECT

    # Detect local network
    GEOIP, CN, DIRECT
  20. @janlay janlay revised this gist Oct 30, 2015. 1 changed file with 72 additions and 57 deletions.
    129 changes: 72 additions & 57 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -5,91 +5,106 @@
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
    # [Proxy]
    # Proxy = https,server.address,port,username,password
    # Proxy = https, server.address, port, username, password
    # ---- END ----
    #
    # Make sure the PROXY-OVERRIDE line included in the main.conf

    [General]
    loglevel = warning
    loglevel = notify
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
    dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    # stub proxy to stop surge complaining, leave this.
    [Proxy]
    Proxy = https,1.2.3.4,1234
    Proxy = https, 1.2.3.4, 1234

    [Rule]
    # Accelerate most visited sites, part 1
    DOMAIN-KEYWORD,ali,DIRECT
    DOMAIN-KEYWORD,taobao,DIRECT
    DOMAIN-KEYWORD, ali, DIRECT
    DOMAIN-KEYWORD, taobao, DIRECT

    # Block privacy tracker within apps
    DOMAIN-KEYWORD,umeng.co,REJECT
    DOMAIN-KEYWORD,flurry.co,REJECT
    DOMAIN-KEYWORD,cnzz,REJECT
    DOMAIN-SUFFIX,mmstat.com,REJECT
    DOMAIN-SUFFIX,doubleclick.net,REJECT
    DOMAIN-SUFFIX,youmi.net,REJECT
    DOMAIN,monitor.uu.qq.com,REJECT
    DOMAIN,pagead2.googlesyndication.com,REJECT
    DOMAIN,cpro.baidu.com,REJECT
    DOMAIN-SUFFIX,beacon.qq.com,REJECT
    DOMAIN,pingma.qq.com,REJECT
    DOMAIN,stat.m.jd.com,REJECT
    DOMAIN,ads.mopub.com,REJECT
    DOMAIN-SUFFIX,mob.com,REJECT
    DOMAIN-SUFFIX,127.net,REJECT
    DOMAIN-SUFFIX,sinajs.cn,REJECT
    # prevent sniffer from a public WiFi
    DOMAIN,init.icloud-analysis.com,REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN, ads.mopub.com, REJECT
    # Prevent stream services from displaying ads
    DOMAIN, ad.api.3g.youku.com, REJECT
    DOMAIN, atm.youku.com, REJECT
    DOMAIN, lives.l.qq.com, REJECT
    DOMAIN, ark.letv.com, REJECT
    DOMAIN, asimgs.pplive.cn, REJECT
    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT
    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
    # Other privacy trackers
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-SUFFIX, mmstat.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    DOMAIN-SUFFIX, youmi.net, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, mob.com, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, sinajs.cn, REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-SUFFIX,cn,DIRECT
    DOMAIN-KEYWORD,baidu,DIRECT
    DOMAIN-KEYWORD,360,DIRECT
    DOMAIN-SUFFIX,qq.com,DIRECT
    DOMAIN-SUFFIX,jd.com,DIRECT
    DOMAIN-SUFFIX,163.com,DIRECT
    DOMAIN-SUFFIX,126.net,DIRECT
    DOMAIN-SUFFIX,netease.com,DIRECT
    DOMAIN-SUFFIX,gtimg.com,DIRECT
    DOMAIN-SUFFIX,ls.apple.com,DIRECT
    DOMAIN-SUFFIX,apple.com,Proxy
    DOMAIN-SUFFIX,icloud.com,Proxy
    DOMAIN-SUFFIX,mzstatic.com,Proxy
    DOMAIN-KEYWORD,aka,Proxy
    DOMAIN-SUFFIX, cn, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, 163.com, DIRECT
    DOMAIN-SUFFIX, 126.net, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-KEYWORD, baidu, DIRECT
    DOMAIN-KEYWORD, 360, DIRECT

    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    DOMAIN-SUFFIX, itunes.apple.com, DIRECT
    DOMAIN-SUFFIX, dl.google.com, DIRECT

    # Apple services
    DOMAIN-SUFFIX, apple.com, Proxy
    DOMAIN-SUFFIX, icloud.com, Proxy
    DOMAIN-SUFFIX, mzstatic.com, Proxy
    DOMAIN-KEYWORD, aka, Proxy

    # Streaming services, comment out if you don't need
    DOMAIN-KEYWORD,sohu,DIRECT
    DOMAIN-KEYWORD,qiyi,DIRECT
    DOMAIN-KEYWORD, sohu, DIRECT
    DOMAIN-KEYWORD, qiyi, DIRECT

    # Force some domains which are fucked by GFW while resolving 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-SUFFIX,twimg.com,Proxy,force-remote-dns
    DOMAIN-KEYWORD,gmail,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

    # Workaround for some apps
    # Instagram
    DOMAIN-KEYWORD,instagram,Proxy,force-remote-dns
    DOMAIN-KEYWORD, instagram, 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,109.239.140.0/24,Proxy,no-resolve
    IP-CIDR,149.154.160.0/20,Proxy,no-resolve
    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

    # Reserved networks, debugging rules should place above this line
    IP-CIDR,192.168.0.0/16,DIRECT
    IP-CIDR,10.0.0.0/8,DIRECT
    IP-CIDR,172.0.0.0/8,DIRECT
    IP-CIDR,127.0.0.0/8,DIRECT
    IP-CIDR,100.64.0.0/10,DIRECT
    IP-CIDR, 192.168.0.0/16, DIRECT
    IP-CIDR, 10.0.0.0/8, DIRECT
    IP-CIDR, 172.0.0.0/8, DIRECT
    IP-CIDR, 127.0.0.0/8, DIRECT
    IP-CIDR, 100.64.0.0/10, DIRECT

    # Detect local network
    GEOIP,CN,DIRECT
    GEOIP, CN, DIRECT
    # Use proxy for all others
    FINAL,Proxy
    FINAL, Proxy
  21. @janlay janlay revised this gist Oct 22, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -82,14 +82,14 @@ 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

    # LAN, debugging rules should place above this line
    # Reserved networks, debugging rules should place above this line
    IP-CIDR,192.168.0.0/16,DIRECT
    IP-CIDR,10.0.0.0/8,DIRECT
    IP-CIDR,172.0.0.0/8,DIRECT
    IP-CIDR,127.0.0.0/8,DIRECT
    IP-CIDR,100.64.0.0/10,DIRECT

    # Detect local network
    GEOIP,CN,DIRECT
    # Use proxy for all others
    FINAL,Proxy

  22. @janlay janlay revised this gist Oct 22, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rules.conf
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,6 @@ Proxy = https,1.2.3.4,1234

    [Rule]
    # Accelerate most visited sites, part 1
    DOMAIN-SUFFIX,cn,DIRECT
    DOMAIN-KEYWORD,ali,DIRECT
    DOMAIN-KEYWORD,taobao,DIRECT

    @@ -47,6 +46,7 @@ DOMAIN-SUFFIX,sinajs.cn,REJECT
    DOMAIN,init.icloud-analysis.com,REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-SUFFIX,cn,DIRECT
    DOMAIN-KEYWORD,baidu,DIRECT
    DOMAIN-KEYWORD,360,DIRECT
    DOMAIN-SUFFIX,qq.com,DIRECT
    @@ -92,3 +92,4 @@ IP-CIDR,127.0.0.0/8,DIRECT
    GEOIP,CN,DIRECT
    # Use proxy for all others
    FINAL,Proxy

  23. @janlay janlay revised this gist Oct 22, 2015. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -25,31 +25,35 @@ Proxy = https,1.2.3.4,1234
    DOMAIN-SUFFIX,cn,DIRECT
    DOMAIN-KEYWORD,ali,DIRECT
    DOMAIN-KEYWORD,taobao,DIRECT
    DOMAIN-KEYWORD,baidu,DIRECT

    # Block privacy tracker within apps
    DOMAIN-KEYWORD,umeng.co,REJECT
    DOMAIN-KEYWORD,flurry.co,REJECT
    DOMAIN-KEYWORD,cnzz,REJECT
    DOMAIN-SUFFIX,mmstat.com,REJECT
    DOMAIN-SUFFIX,doubleclick.net,REJECT
    DOMAIN-SUFFIX,youmi.net,REJECT
    DOMAIN,monitor.uu.qq.com,REJECT
    DOMAIN,pagead2.googlesyndication.com,REJECT
    DOMAIN,cpro.baidu.com,REJECT
    DOMAIN-SUFFIX,beacon.qq.com,REJECT
    DOMAIN,pingma.qq.com,REJECT
    DOMAIN,stat.m.jd.com,REJECT
    DOMAIN,ads.mopub.com,REJECT
    DOMAIN-SUFFIX,cnzz.com,REJECT
    DOMAIN-SUFFIX,mob.com,REJECT
    DOMAIN-SUFFIX,127.net,REJECT
    DOMAIN-SUFFIX,sinajs.cn,REJECT
    # prevent sniffer from a public WiFi
    DOMAIN,init.icloud-analysis.com,REJECT

    # Accelerate most visited sites, part 2
    DOMAIN-KEYWORD,baidu,DIRECT
    DOMAIN-KEYWORD,360,DIRECT
    DOMAIN-SUFFIX,qq.com,DIRECT
    DOMAIN-SUFFIX,jd.com,DIRECT
    DOMAIN-SUFFIX,163.com,DIRECT
    DOMAIN-SUFFIX,126.net,DIRECT
    DOMAIN-SUFFIX,netnease.com,DIRECT
    DOMAIN-SUFFIX,netease.com,DIRECT
    DOMAIN-SUFFIX,gtimg.com,DIRECT
    DOMAIN-SUFFIX,ls.apple.com,DIRECT
    DOMAIN-SUFFIX,apple.com,Proxy
  24. @janlay janlay revised this gist Oct 20, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,7 @@ DOMAIN-KEYWORD,umeng.co,REJECT
    DOMAIN-KEYWORD,flurry.co,REJECT
    DOMAIN-SUFFIX,mmstat.com,REJECT
    DOMAIN-SUFFIX,doubleclick.net,REJECT
    DOMAIN-SUFFIX,youmi.net,REJECT
    DOMAIN,monitor.uu.qq.com,REJECT
    DOMAIN-SUFFIX,beacon.qq.com,REJECT
    DOMAIN,pingma.qq.com,REJECT
  25. @janlay janlay revised this gist Oct 20, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # NOTE: This file only contains rules and depends on main.conf which defines your own proxy.
    # This file depends on the main.conf which defines your own proxy.
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
  26. @janlay janlay revised this gist Oct 20, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # NOTE: This file depends on the main.conf which defines your own proxy.
    # NOTE: This file only contains rules and depends on main.conf which defines your own proxy.
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
    @@ -12,8 +12,8 @@

    [General]
    loglevel = warning
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, localhost, *.local, e.crashlytics.com
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8
    dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    # stub proxy to stop surge complaining, leave this.
    @@ -80,7 +80,7 @@ IP-CIDR,149.154.160.0/20,Proxy,no-resolve
    # LAN, debugging rules should place 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,172.0.0.0/8,DIRECT
    IP-CIDR,127.0.0.0/8,DIRECT

    # Detect local network
  27. @janlay janlay revised this gist Oct 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion rules.conf
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.

    # NOTE: This file only contains rules and depends on main.conf which defines your own proxy.
    # NOTE: This file depends on the main.conf which defines your own proxy.
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
  28. @janlay janlay revised this gist Oct 14, 2015. 1 changed file with 10 additions and 5 deletions.
    15 changes: 10 additions & 5 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -4,17 +4,22 @@
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
    # [General]
    # loglevel = warning
    # all-tcp-mode = false
    # bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
    #
    # [Proxy]
    # Proxy = https,server.address,port,username,password
    # ---- END ----
    #
    # Make sure the PROXY-OVERRIDE line included in the main.conf

    [General]
    loglevel = warning
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, e.crashlytics.com
    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.114.114

    # stub proxy to stop surge complaining, leave this.
    [Proxy]
    Proxy = https,1.2.3.4,1234

    [Rule]
    # Accelerate most visited sites, part 1
    DOMAIN-SUFFIX,cn,DIRECT
  29. @janlay janlay revised this gist Oct 13, 2015. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions rules.conf
    Original file line number Diff line number Diff line change
    @@ -2,18 +2,18 @@

    # NOTE: This file only contains rules and depends on main.conf which defines your own proxy.
    # Your main.conf will look like this:
    # ---- START ----
    # #!PROXY-OVERRIDE:rules.conf
    # [General]
    # loglevel = warning
    # all-tcp-mode = false
    # bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
    #
    # [Proxy]
    # Proxy = https,server.address,port,username,password
    # ---- END ----
    #
    # Make sure this line included in the main.conf
    # #!PROXY-OVERRIDE:rules.conf

    # Surge will support updating conf sometime in the future
    #!UPDATE-URL:https://gist.github.com/janlay/b57476c72a93b7e622a6/raw

    # stub proxy to stop surge complaining, leave this.
    [Proxy]
    Proxy = https,1.2.3.4,443,user,pass
    # Make sure the PROXY-OVERRIDE line included in the main.conf

    [Rule]
    # Accelerate most visited sites, part 1
  30. @janlay janlay renamed this gist Oct 13, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion surge.conf → rules.conf
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@
    # Proxy = https,server.address,port,username,password
    #
    # Make sure this line included in the main.conf
    # #!PROXY-OVERRIDE:this-file.conf
    # #!PROXY-OVERRIDE:rules.conf

    # Surge will support updating conf sometime in the future
    #!UPDATE-URL:https://gist.github.com/janlay/b57476c72a93b7e622a6/raw