Skip to content

Instantly share code, notes, and snippets.

@lockyse7en
Forked from janlay/README.md
Created December 29, 2016 07:24
Show Gist options
  • Save lockyse7en/a95375de60cd40caf3b25818f9e1452c to your computer and use it in GitHub Desktop.
Save lockyse7en/a95375de60cd40caf3b25818f9e1452c to your computer and use it in GitHub Desktop.

Revisions

  1. @janlay janlay revised this gist Nov 15, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@ DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, hm.baidu.com, REJECT
    DOMAIN, hmma.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, graph.facebook.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pgdt.gtimg.cn, REJECT
    DOMAIN, pingma.qq.com, REJECT
    @@ -34,7 +35,7 @@ DOMAIN, lives.l.qq.com, REJECT
    DOMAIN, fonts.googleapis.com, REJECT

    # Awful ads served by China Telecom
    DOMAIN, 61.160.200.252, REJECT
    DOMAIN-KEYWORD, 61.160.200, REJECT

    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
  2. @janlay janlay revised this gist Nov 7, 2016. 1 changed file with 20 additions and 0 deletions.
    20 changes: 20 additions & 0 deletions rules-mac-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,20 @@
    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, hm.baidu.com, REJECT
    DOMAIN, hmma.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, graph.facebook.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pgdt.gtimg.cn, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, analytics, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, amazon-adsystem.com, REJECT
    DOMAIN-SUFFIX, applovin.com, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
    @@ -15,7 +23,19 @@ 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

    # Awful ads served by China Telecom
    DOMAIN, 61.160.200.252, REJECT

    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
  3. @janlay janlay revised this gist Sep 9, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,6 @@ DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN, captive.apple.com, DIRECT
    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    DOMAIN-SUFFIX, dl.google.com, DIRECT

    # Apple services
    DOMAIN-SUFFIX, apple.com, Proxy
  4. @janlay janlay revised this gist Sep 8, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,6 @@ DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN, captive.apple.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
  5. @janlay janlay revised this gist Sep 7, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.txt
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    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
    skip-proxy = 127.0.0.1, 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 = system, 223.5.5.5, 8.8.8.8, 8.8.4.4

    [Host]
  6. @janlay janlay revised this gist Aug 25, 2016. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,19 @@
    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, hm.baidu.com, REJECT
    DOMAIN, hmma.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, pgdt.gtimg.cn, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, analytics, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, analytics., REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    DOMAIN-SUFFIX, amazon-adsystem.com, REJECT
    DOMAIN-SUFFIX, applovin.com, REJECT
    DOMAIN-SUFFIX, beacon.qq.com, REJECT
    DOMAIN-SUFFIX, doubleclick.net, REJECT
  7. @janlay janlay revised this gist Aug 18, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions config.txt
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,7 @@ skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost,
    dns-server = system, 223.5.5.5, 8.8.8.8, 8.8.4.4

    [Host]
    api.smoot.apple.com.cn = api.smoot.apple.com

    [URL Rewrite]
    ^http://www.google.cn http://www.google.com
  8. @janlay janlay revised this gist Jul 28, 2016. 3 changed files with 4 additions and 4 deletions.
    2 changes: 1 addition & 1 deletion config.txt
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    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
    dns-server = system, 223.5.5.5, 8.8.8.8, 8.8.4.4

    [Host]

    2 changes: 1 addition & 1 deletion index-ios
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # Surge config index file for iOS 9+
    #output 🚦 Auto Split Traffic.conf
    #output 🚦 Auto.conf
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/config.txt

    [Rule]
    4 changes: 2 additions & 2 deletions rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -9,9 +9,9 @@ DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN-SUFFIX, live.com, DIRECT
    DOMAIN-SUFFIX, microsoft.com, DIRECT

    # Wi-Fi Authentication
    DOMAIN, captive.apple.com, DIRECT
    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    DOMAIN-SUFFIX, itunes.apple.com, DIRECT
  9. @janlay janlay revised this gist Jul 5, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.txt
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1, 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

    [Host]
  10. @janlay janlay revised this gist Jul 5, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions config.txt
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@ skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost,

    [URL Rewrite]
    ^http://www.google.cn http://www.google.com
    ^http://mp.weixin.qq.com/mp/report reject

    [Proxy]
    #include proxy.txt
  11. @janlay janlay revised this gist Jul 5, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@ DOMAIN, hmma.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, pgdt.gtimg.cn, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, analytics., REJECT
  12. @janlay janlay revised this gist May 12, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,7 @@ DOMAIN-KEYWORD, facebook, Proxy, force-remote-dns
    DOMAIN-KEYWORD, gmail, Proxy, force-remote-dns
    DOMAIN-KEYWORD, google, Proxy, force-remote-dns
    DOMAIN-KEYWORD, youtube, Proxy, force-remote-dns
    DOMAIN-SUFFIX, fbcdn.net, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twitter.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, github.com, Proxy, force-remote-dns
  13. @janlay janlay revised this gist May 9, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.txt
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    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
    skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1, e.crashlytics.com
    # dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114

    [Host]
  14. @janlay janlay revised this gist May 6, 2016. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -29,5 +29,9 @@ DOMAIN, lives.l.qq.com, REJECT

    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT

    # Awful ads served by China Telecom
    DOMAIN, 61.160.200.252, REJECT

    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
  15. @janlay janlay revised this gist Mar 3, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion config.txt
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,4 @@ skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10, localhost,
    ^http://www.google.cn http://www.google.com

    [Proxy]
    #include #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/proxy.txt
    #include proxy.txt
  16. @janlay janlay revised this gist Mar 3, 2016. 14 changed files with 69 additions and 45 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@
    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`
    Or run `$ sh build-all` to build all your index files.
    3. Import configuration via AirDrop/iTunes/Dropbox/iCloud


    9 changes: 9 additions & 0 deletions build-all
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/usr/bin/env sh

    # Written by janlay, [email protected]

    for file in ./index-*.txt
    do
    echo "Building file $file..."
    text-builder -index $file
    done
    9 changes: 9 additions & 0 deletions general.txt → config.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,16 @@
    [General]
    # used by Surge for Mac
    interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    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

    [Host]

    [URL Rewrite]
    ^http://www.google.cn http://www.google.com

    [Proxy]
    #include #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/proxy.txt
    7 changes: 7 additions & 0 deletions index-ios
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Surge config index file for iOS 9+
    #output 🚦 Auto Split Traffic.conf
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/config.txt

    [Rule]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-app-blockers.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-main.txt
    10 changes: 10 additions & 0 deletions index-mac
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # Surge config index file for Mac OS X 10.11+
    # !Use your username here
    #output /Users/janlay/.surge.conf
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/config.txt

    [Rule]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-intranet.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-mac-blockers.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-main.txt

    24 changes: 0 additions & 24 deletions index.txt
    Original file line number Diff line number Diff line change
    @@ -1,24 +0,0 @@
    #output Surge.conf
    [General]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    [URL Rewrite]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/urlrewrite.txt

    [Proxy]
    # Direct connection
    Direct All = direct
    # Use your own proxy info here
    Proxy1 = http, 1.2.3.4, 1234
    Proxy2 = http, 1.2.3.4, 1234
    Proxy3 = http, 1.2.3.4, 1234

    [Proxy Group]
    Proxy = select, Direct All, Proxy1, Proxy2, Proxy3

    [Rule]
    #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
    5 changes: 5 additions & 0 deletions proxy.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    💊 Play with GFW = direct
    🇯🇵 SSLedge TYO1 = custom <<<

    [Proxy Group]
    Proxy = select, 💊 Play with GFW, 🇯🇵 SSLedge TYO1
    1 change: 1 addition & 0 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,7 @@ DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
    DOMAIN, stat.m.jd.com, REJECT
    DOMAIN-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, analytics., REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, REJECT
    DOMAIN-SUFFIX, 127.net, REJECT
    10 changes: 0 additions & 10 deletions rules-apps.txt
    Original file line number Diff line number Diff line change
    @@ -1,10 +0,0 @@
    # 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: 0 additions & 4 deletions rules-final.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +0,0 @@
    # Detect local network
    GEOIP, CN, DIRECT
    # Use proxy for all others
    FINAL, Proxy
    4 changes: 4 additions & 0 deletions rules-intranet.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Special rules for your intranet
    DOMAIN, order.mi.com, Proxy
    DOMAIN, pan.baidu.com, Proxy
    DOMAIN-SUFFIX, 115.com, Proxy
    6 changes: 0 additions & 6 deletions rules-lan.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +0,0 @@
    # 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
    23 changes: 23 additions & 0 deletions rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -35,3 +35,26 @@ DOMAIN-KEYWORD, youtube, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twitter.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, github.com, Proxy, force-remote-dns

    # 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

    # 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
    1 change: 0 additions & 1 deletion urlrewrite.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    ^http://www.google.cn http://www.google.com
  17. @janlay janlay revised this gist Mar 1, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions general.txt
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,6 @@
    interface = 127.0.0.1
    port = 8800
    loglevel = warning
    bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.0.0.0/8, 100.64.0.0/10
    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
  18. @janlay janlay revised this gist Feb 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.txt
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    [URL Rewrite]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw//general.txt
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/urlrewrite.txt

    [Proxy]
    # Direct connection
  19. @janlay janlay revised this gist Feb 25, 2016. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion index.txt
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,15 @@
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw//general.txt

    [Proxy]
    # Direct connection
    Direct All = direct
    # Use your own proxy info here
    Proxy = http, 1.2.3.4, 1234
    Proxy1 = http, 1.2.3.4, 1234
    Proxy2 = http, 1.2.3.4, 1234
    Proxy3 = http, 1.2.3.4, 1234

    [Proxy Group]
    Proxy = select, Direct All, Proxy1, Proxy2, Proxy3

    [Rule]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/rules-app-blockers.txt
  20. @janlay janlay revised this gist Feb 25, 2016. 2 changed files with 4 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions index.txt
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,9 @@
    [General]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    [URL Rewrite]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw//general.txt

    [Proxy]
    # Use your own proxy info here
    Proxy = http, 1.2.3.4, 1234
    1 change: 1 addition & 0 deletions urlrewrite.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ^http://www.google.cn http://www.google.com
  21. @janlay janlay revised this gist Feb 17, 2016. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions rules-mac-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # 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-KEYWORD, cnzz, REJECT
    DOMAIN-KEYWORD, flurry.co, REJECT
    DOMAIN-KEYWORD, umeng.co, 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

    # Disable customized fonts
    DOMAIN, fonts.googleapis.com, REJECT
    # Prevent sniffer from a public WiFi
    DOMAIN, init.icloud-analysis.com, REJECT
  22. @janlay janlay revised this gist Feb 16, 2016. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion rules-main.txt
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@ DOMAIN-SUFFIX, gtimg.com, DIRECT
    DOMAIN-SUFFIX, jd.com, DIRECT
    DOMAIN-SUFFIX, netease.com, DIRECT
    DOMAIN-SUFFIX, qq.com, DIRECT
    DOMAIN-SUFFIX, live.com, DIRECT
    DOMAIN-SUFFIX, microsoft.com, DIRECT

    # Some services are available locally
    DOMAIN-SUFFIX, ls.apple.com, DIRECT
    @@ -29,6 +31,7 @@ DOMAIN-KEYWORD, sohu, DIRECT
    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, twitter.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, twimg.com, Proxy, force-remote-dns
    DOMAIN-SUFFIX, github.com, Proxy, force-remote-dns
  23. @janlay janlay revised this gist Dec 14, 2015. 2 changed files with 2 additions and 1 deletion.
    2 changes: 1 addition & 1 deletion index.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #output /Users/janlay/Library/Mobile Documents/com~apple~CloudDocs/Surge.conf
    #output Surge.conf
    [General]
    #include https://gist.github.com/janlay/b57476c72a93b7e622a6/raw/general.txt

    1 change: 1 addition & 0 deletions rules-app-blockers.txt
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    # Block privacy tracker within apps
    DOMAIN, ads.mopub.com, REJECT
    DOMAIN, cpro.baidu.com, REJECT
    DOMAIN, hmma.baidu.com, REJECT
    DOMAIN, monitor.uu.qq.com, REJECT
    DOMAIN, pagead2.googlesyndication.com, REJECT
    DOMAIN, pingma.qq.com, REJECT
  24. @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.
  25. @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.
  26. @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.
  27. @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
  28. @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
  29. @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
  30. @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`