Skip to content

Instantly share code, notes, and snippets.

@janlay
Last active November 7, 2024 10:12
Show Gist options
  • Save janlay/bec3cade3361678d975a8394d54515c6 to your computer and use it in GitHub Desktop.
Save janlay/bec3cade3361678d975a8394d54515c6 to your computer and use it in GitHub Desktop.
Rule sets for Surge & Clash

Janlay's public ruleset

Enjoy all the common rulesets brought by janlay.

A quick guideline

In the rules section of Surge/Clash config, use the shared rulesets in this order:

  1. blocked-domains
  2. quick-direct
  3. loc-sens
  4. traffic
  5. <Your rules>
  6. built-in LAN rules
  7. direct
  8. <Final rule>
payload:
- DOMAIN, ads.mopub.com
- DOMAIN, amonsul.douban.com
- DOMAIN, analytics.plex.tv
- DOMAIN, analytics.yahoo.com
- DOMAIN, analytics.x.com
- DOMAIN, assets.msn.com
- DOMAIN, browser.events.data.msn.com
- DOMAIN, collect.alipay.com
- DOMAIN, cpro.baidu.com
- DOMAIN, cpro.baidustatic.com
- DOMAIN, edge.activity.windows.com
- DOMAIN, erebor.douban.com
- DOMAIN, firebaselogging-pa.glgleapis.com
- DOMAIN, hm.baidu.com
- DOMAIN, hmma.baidu.com
- DOMAIN, zz.bdstatic.com
- DOMAIN, h-adashx.dingtalkapps.com
- DOMAIN, img-s-msn-com.akamaized.net
- DOMAIN, js-agent.newrelic.com
- DOMAIN, js.monitor.azure.com
- DOMAIN, loggw.alipay.com
- DOMAIN, lwlog.dingtalk.com
- DOMAIN, monitor.uu.qq.com
- DOMAIN, graph.facebook.com
- DOMAIN, pagead2.ooooglesyndication.com
- DOMAIN, pgdt.gtimg.cn
- DOMAIN, pingma.qq.com
- DOMAIN, r.msftstatic.com
- DOMAIN, stat.m.jd.com
- DOMAIN, static.ads-twitter.com
- DOMAIN, safebrowsing.urlsec.qq.com
- DOMAIN, t.dtscout.com
- DOMAIN, analytics.plex.tv
- DOMAIN, www.google-analytics.com
- DOMAIN, www.pangolin-dsp-toutiao.com
- DOMAIN, xlog.jd.com
- DOMAIN-KEYWORD, cnzz
- DOMAIN-KEYWORD, domob
- DOMAIN-KEYWORD, flurry.co
- DOMAIN-KEYWORD, umeng.co
- DOMAIN-SUFFIX, 127.net
- DOMAIN-SUFFIX, aniview.com
- DOMAIN-SUFFIX, amazon-adsystem.com
- DOMAIN-SUFFIX, applovin.com
- DOMAIN-SUFFIX, bugsnag.com
- DOMAIN-SUFFIX, beacon.qq.com
- DOMAIN-SUFFIX, doubleclick.net
- DOMAIN-SUFFIX, duomeng.cn
- DOMAIN-SUFFIX, log.aliyuncs.com
- DOMAIN-SUFFIX, mmstat.com
- DOMAIN-SUFFIX, mob.com
- DOMAIN-SUFFIX, msn.cn
- DOMAIN-SUFFIX, sponsorpay.com
- DOMAIN-SUFFIX, tanx.com
- DOMAIN-SUFFIX, umengcloud.com
- DOMAIN-SUFFIX, youmi.net
- DOMAIN-SUFFIX, zhanzhang.baidu.com
DOMAIN, ads.mopub.com
DOMAIN, amonsul.douban.com
DOMAIN, analytics.plex.tv
DOMAIN, analytics.yahoo.com
DOMAIN, analytics.x.com
DOMAIN, assets.msn.com
DOMAIN, browser.events.data.msn.com
DOMAIN, collect.alipay.com
DOMAIN, cpro.baidu.com
DOMAIN, edge.activity.windows.com
DOMAIN, erebor.douban.com
DOMAIN, firebaselogging-pa.googleapis.com
DOMAIN, hm.baidu.com
DOMAIN, hmma.baidu.com
DOMAIN, zz.bdstatic.com
DOMAIN, h-adashx.dingtalkapps.com
DOMAIN, img-s-msn-com.akamaized.net
DOMAIN, js-agent.newrelic.com
DOMAIN, js.monitor.azure.com
DOMAIN, loggw.alipay.com
DOMAIN, lwlog.dingtalk.com
DOMAIN, monitor.uu.qq.com
DOMAIN, graph.facebook.com
DOMAIN, pagead2.googlesyndication.com
DOMAIN, pgdt.gtimg.cn
DOMAIN, pingma.qq.com
DOMAIN, r.msftstatic.com
DOMAIN, stat.m.jd.com
DOMAIN, static.ads-twitter.com
DOMAIN, safebrowsing.urlsec.qq.com
DOMAIN, t.dtscout.com
DOMAIN, analytics.plex.tv
DOMAIN, www.google-analytics.com
DOMAIN, www.pangolin-dsp-toutiao.com
DOMAIN, xlog.jd.com
DOMAIN-KEYWORD, cnzz
DOMAIN-KEYWORD, domob
DOMAIN-KEYWORD, flurry.co
DOMAIN-KEYWORD, umeng.co
DOMAIN-SUFFIX, 127.net
DOMAIN-SUFFIX, aniview.com
DOMAIN-SUFFIX, amazon-adsystem.com
DOMAIN-SUFFIX, applovin.com
DOMAIN-SUFFIX, bugsnag.com
DOMAIN-SUFFIX, beacon.qq.com
DOMAIN-SUFFIX, doubleclick.net
DOMAIN-SUFFIX, duomeng.cn
DOMAIN-SUFFIX, log.aliyuncs.com
AND, ((NOT, ((DOMAIN, wgo.mmstat.com))), (DOMAIN-SUFFIX, mmstat.com))
DOMAIN-SUFFIX, mob.com
DOMAIN-SUFFIX, msn.cn
DOMAIN-SUFFIX, sponsorpay.com
DOMAIN-SUFFIX, tanx.com
DOMAIN-SUFFIX, umengcloud.com
DOMAIN-SUFFIX, youmi.net
DOMAIN-SUFFIX, zhanzhang.baidu.com
# Place these lines before the MATCH rule
payload:
# NTP
- DST-PORT, 123
# Apple Push
- DST-PORT, 5223
- DOMAIN, commnat-main-gc.ess.apple.com
- DOMAIN-SUFFIX, push-apple.com.akadns.net
# IP services
- DOMAIN, checkip.synology.com
- DOMAIN, cloudsync-tw.synology.com
# Windows push
- DOMAIN-SUFFIX, wns.windows.com
- DOMAIN-SUFFIX, notify.windows.com
- IP-CIDR, 127.0.0.0/8
- IP-CIDR, 10.0.0.0/8
- IP-CIDR, 192.168.0.0/16
- IP-CIDR, 172.16.0.0/12
# Tentent
- IP-CIDR, 129.224.0.0/11
- IP-CIDR, 101.32.0.0/11
- GEOIP, CN
# Place these lines before the FINAL rule
# NTP
DEST-PORT, 123
# Apple push
AND, ((PROTOCOL, UDP), (DEST-PORT, 5223))
DOMAIN, commnat-main-gc.ess.apple.com
DOMAIN-SUFFIX, push-apple.com.akadns.net
# IP services
DOMAIN, checkip.synology.com
DOMAIN, cloudsync-tw.synology.com
IP-CIDR, 127.0.0.0/8
IP-CIDR, 10.0.0.0/8
IP-CIDR, 192.168.0.0/16
IP-CIDR, 172.16.0.0/12
# Alibaba
IP-ASN, 37963
IP-ASN, 24429
# Tencent
IP-ASN, 45090
IP-ASN, 132203
GEOIP, CN
payload:
- PROCESS-NAME, com.disney.disneyplus
- DOMAIN-KEYWORD, disney
- DOMAIN-KEYWORD, dssott
- DOMAIN-SUFFIX, adobedtm.com
- DOMAIN-SUFFIX, bam.nr-date.net
- DOMAIN-SUFFIX, bamgrid.com
- DOMAIN-SUFFIX, braze.com
- DOMAIN-SUFFIX, cdn.optimizely.com
- DOMAIN-SUFFIX, d9.flashtalking.com
USER-AGENT, Disney*
DOMAIN-KEYWORD, disney
DOMAIN-KEYWORD, dssott
DOMAIN-SUFFIX, adobedtm.com
DOMAIN-SUFFIX, bam.nr-date.net
DOMAIN-SUFFIX, bamgrid.com
DOMAIN-SUFFIX, braze.com
DOMAIN-SUFFIX, cdn.optimizely.com
DOMAIN-SUFFIX, d9.flashtalking.com
payload:
- DOMAIN-SUFFIX, github.com
- DOMAIN-SUFFIX, githubusercontent.com
- DOMAIN-SUFFIX, githubapp.com
- DOMAIN-SUFFIX, githubassets.com
- DOMAIN-SUFFIX, parsely.com
DOMAIN-SUFFIX, github.com
DOMAIN-SUFFIX, githubusercontent.com
DOMAIN-SUFFIX, githubapp.com
DOMAIN-SUFFIX, githubassets.com
DOMAIN-SUFFIX, parsely.com
payload:
# region detection
- DOMAIN, app-measurement.com
- DOMAIN-SUFFIX, gstatic.com
- DOMAIN-SUFFIX, ggpht.com
- DOMAIN-SUFFIX, gvt1.com
- DOMAIN-SUFFIX, yt.be
- DOMAIN-SUFFIX, ytimg.com
- DOMAIN-KEYWORD, goog
- DOMAIN-KEYWORD, gmail
- DOMAIN-KEYWORD, youtu
# region detection
DOMAIN, app-measurement.com
DOMAIN-SUFFIX, gstatic.com
DOMAIN-SUFFIX, ggpht.com
DOMAIN-SUFFIX, gvt1.com
DOMAIN-SUFFIX, yt.be
DOMAIN-SUFFIX, ytimg.com
DOMAIN-KEYWORD, goog
DOMAIN-KEYWORD, gmail
DOMAIN-KEYWORD, youtu
# Location-sensitive services
# Place these rules above the Google ruleset
payload:
- DOMAIN, bard.google.com
- DOMAIN, cdn.oaiusercontent.com
- DOMAIN, probe.icloud.com
- DOMAIN, mask-api.icloud.com
- DOMAIN, apple-relay.apple.com
- DOMAIN, configuration.ls.apple.com
- DOMAIN-SUFFIX, ai.com
- DOMAIN-SUFFIX, anthropic.com
- DOMAIN-SUFFIX, bing.com
- DOMAIN-SUFFIX, chat.com
- DOMAIN-SUFFIX, chatgpt.com
- DOMAIN-SUFFIX, intercom.io
- DOMAIN-SUFFIX, oaistatic.com
- DOMAIN-SUFFIX, stripe.com
- DOMAIN-SUFFIX, stripe.network
- DOMAIN-KEYWORD, openai
- DOMAIN-KEYWORD, siri
# Location-sensitive services
# Place these rules above the Google ruleset
DOMAIN, bard.google.com
DOMAIN, www2.deepl.com
DOMAIN, cdn.oaiusercontent.com
DOMAIN, probe.icloud.com
DOMAIN, mask-api.icloud.com
DOMAIN, apple-relay.apple.com
DOMAIN, configuration.ls.apple.com
DOMAIN-SUFFIX, ai.com
DOMAIN-SUFFIX, anthropic.com
DOMAIN-SUFFIX, bing.com
DOMAIN-SUFFIX, chat.com
DOMAIN-SUFFIX, chatgpt.com
DOMAIN-SUFFIX, intercom.io
DOMAIN-SUFFIX, oaistatic.com
DOMAIN-SUFFIX, stripe.com
DOMAIN-SUFFIX, stripe.network
DOMAIN-KEYWORD, openai
DOMAIN-KEYWORD, siri
payload:
- DOMAIN, api.radarr.video
- DOMAIN-SUFFIX, servarr.com
- DOMAIN-SUFFIX, tmdb.org
- DOMAIN-SUFFIX, imdb.com
- DOMAIN-SUFFIX, themoviedb.org
DOMAIN, api.radarr.video
DOMAIN-SUFFIX, servarr.com
DOMAIN-SUFFIX, tmdb.org
DOMAIN-SUFFIX, imdb.com
DOMAIN-SUFFIX, themoviedb.org
payload:
- DOMAIN-SUFFIX, keepfrds.com
- DOMAIN-SUFFIX, m-team.cc
- DOMAIN-SUFFIX, audiences.me
- DOMAIN-SUFFIX, hd4fans.org
- DOMAIN-SUFFIX, btschool.club
- DOMAIN-SUFFIX, filelist.io
- DOMAIN-SUFFIX, soulvoice.club
- DOMAIN-SUFFIX, et8.org
- DOMAIN-SUFFIX, azurewebsites.net
- DOMAIN-SUFFIX, torrentapi.org
- DOMAIN, blutopia.xyz
- DOMAIN, ourbits.club
- DOMAIN, www.beitai.pt
- DOMAIN, localhost.stackoverflow.tech
- DOMAIN, ssl.empirehost.me
- DOMAIN, routing.bgp.technology
- DOMAIN, tracker.torrentleech.org
# 1337x
- DOMAIN-KEYWORD, 1337x
# RARBG
- DOMAIN-SUFFIX, rarbg.me
- DOMAIN-SUFFIX, rarbg.to
- DOMAIN-SUFFIX, trackerfix.com
- DOMAIN-SUFFIX, tallpenguin.org
- DOMAIN-SUFFIX, slowcheetah.org
DOMAIN-SUFFIX, keepfrds.com
DOMAIN-SUFFIX, m-team.cc
DOMAIN-SUFFIX, audiences.me
DOMAIN-SUFFIX, hd4fans.org
DOMAIN-SUFFIX, btschool.club
DOMAIN-SUFFIX, filelist.io
DOMAIN-SUFFIX, psoulvoice.club
DOMAIN-SUFFIX, et8.org
DOMAIN-SUFFIX, azurewebsites.net
DOMAIN-SUFFIX, torrentapi.org
DOMAIN, blutopia.xyz
DOMAIN, ourbits.club
DOMAIN, www.beitai.pt
DOMAIN, localhost.stackoverflow.tech
DOMAIN, ssl.empirehost.me
DOMAIN, routing.bgp.technology
DOMAIN, tracker.torrentleech.org
# 1337x
DOMAIN-KEYWORD, 1337x
# RARBG
DOMAIN-SUFFIX, rarbg.me
DOMAIN-SUFFIX, rarbg.to
DOMAIN-SUFFIX, trackerfix.com
DOMAIN-SUFFIX, tallpenguin.org
DOMAIN-SUFFIX, slowcheetah.org
# Place this file below the blocked-domains ruleset
payload:
- DOMAIN-SUFFIX, cn
- DOMAIN-SUFFIX, local
- DOMAIN-SUFFIX, direct
- DOMAIN-KEYWORD, alipay
- DOMAIN-KEYWORD, taobao
- DOMAIN-KEYWORD, qq
- DOMAIN-KEYWORD, windows
- DOMAIN-SUFFIX, cdn-apple.com
- DOMAIN, captive.apple.com
- DOMAIN, osxapps.itunes.apple.com
- DOMAIN, iosapps.itunes.apple.com
- DOMAIN, download.developer.apple.com
# NTP
- DST-PORT, 123
# Apple push
- DST-PORT, 5223
- DOMAIN-SUFFIX, push.apple.com
# Place this file below the blocked-domains ruleset
DOMAIN-SUFFIX, cn
DOMAIN-SUFFIX, local
DOMAIN-SUFFIX, direct
DOMAIN-KEYWORD, alipay
DOMAIN-KEYWORD, taobao
DOMAIN-KEYWORD, qq
DOMAIN-KEYWORD, windows
DOMAIN-SUFFIX, cdn-apple.com
DOMAIN, captive.apple.com
DOMAIN, osxapps.itunes.apple.com
DOMAIN, iosapps.itunes.apple.com
DOMAIN, download.developer.apple.com
# NTP
AND, ((PROTOCOL, UDP), (DEST-PORT, 123))
# Apple push
DEST-PORT, 5223
PROCESS-NAME, apsd
DOMAIN-SUFFIX, push.apple.com
# OCSP requests
PROCESS-NAME, trustd
DOMAIN-KEYWORD, ocsp
USER-AGENT, com.apple.trustd/*
DOMAIN, lf16-effectcdn.byteeffecttos-g.com
DOMAIN, lf16-pkgcdn.pitaya-clientai.com
DOMAIN-SUFFIX, bytedapm.com
DOMAIN-SUFFIX, bytegecko-i18n.com
DOMAIN-SUFFIX, bytegecko.com
DOMAIN-SUFFIX, byteoversea.com
DOMAIN-SUFFIX, capcut.com
DOMAIN-SUFFIX, ibytedtos.com
DOMAIN-SUFFIX, ibyteimg.com
DOMAIN-SUFFIX, ipstatp.com
DOMAIN-SUFFIX, isnssdk.com
DOMAIN-SUFFIX, muscdn.com
DOMAIN-SUFFIX, sgpstatp.com
DOMAIN-SUFFIX, snssdk.com
DOMAIN-SUFFIX, tik-tokapi.com
DOMAIN-KEYWORD, musical
DOMAIN-KEYWORD, tiktok
USER-AGENT, TikTok*
DOMAIN, lf16-effectcdn.byteeffecttos-g.com
DOMAIN, lf16-pkgcdn.pitaya-clientai.com
DOMAIN-SUFFIX, bytedapm.com
DOMAIN-SUFFIX, bytegecko-i18n.com
DOMAIN-SUFFIX, bytegecko.com
DOMAIN-SUFFIX, byteoversea.com
DOMAIN-SUFFIX, capcut.com
DOMAIN-SUFFIX, ibytedtos.com
DOMAIN-SUFFIX, ibyteimg.com
DOMAIN-SUFFIX, ipstatp.com
DOMAIN-SUFFIX, isnssdk.com
DOMAIN-SUFFIX, muscdn.com
DOMAIN-SUFFIX, sgpstatp.com
DOMAIN-SUFFIX, snssdk.com
DOMAIN-SUFFIX, tik-tokapi.com
DOMAIN-KEYWORD, musical
DOMAIN-KEYWORD, tiktok
USER-AGENT, TikTok*
payload:
- DOMAIN, agi.gpt4.org
- DOMAIN, dl.fbaipublicfiles.com
- DOMAIN, dl.google.com
- DOMAIN, ghcr.io
- DOMAIN, hub.docker.com
- DOMAIN, officecdn-microsoft-com.akamaized.net
- DOMAIN, photo.googleapis.com
- DOMAIN, pkg-containers.githubusercontent.com
- DOMAIN, production.cloudflare.docker.com
- DOMAIN, swcdn.apple.com
- DOMAIN, www.googleapis.com
- DOMAIN-SUFFIX, cloudfront.net
- DOMAIN-SUFFIX, huggingface.co
- DOMAIN-SUFFIX, r2.cloudflarestorage.com
# fastly
# IP-ASN, 54113
# Akamai
# IP-ASN, 20940
# IP-ASN, 16625
DOMAIN, agi.gpt4.org
DOMAIN, dl.fbaipublicfiles.com
DOMAIN, dl.google.com
DOMAIN, ghcr.io
DOMAIN, hub.docker.com
DOMAIN, officecdn-microsoft-com.akamaized.net
DOMAIN, photo.googleapis.com
DOMAIN, pkg-containers.githubusercontent.com
DOMAIN, production.cloudflare.docker.com
DOMAIN, swcdn.apple.com
DOMAIN, www.googleapis.com
DOMAIN-SUFFIX, cloudfront.net
DOMAIN-SUFFIX, huggingface.co
DOMAIN-SUFFIX, r2.cloudflarestorage.com
payload:
- DOMAIN-SUFFIX, twitter.com
- DOMAIN-SUFFIX, twimg.com
- DOMAIN-SUFFIX, x.com
- DOMAIN, t.co
DOMAIN-SUFFIX, twitter.com
DOMAIN-SUFFIX, twimg.com
DOMAIN-SUFFIX, x.com
DOMAIN, t.co
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment