Skip to content

TPCTPCTPC/Adblock-gist

Repository files navigation

ADBLOCK-GIST

Adblock rules for Surge 4 and Quantumult X, compatible with Surge Module. Duplicated rules from domain rules are removed/merged to Keywords.list & Suffixes.list.

💡 Check the content before use.

💡 Use AdGuard for a better effect on Safari.

Profile Introduction

This Profiles is featured in modularised blocking rules. Except for basic rules, the others will be sorted by network services. eg: Youtube, Spotify, Alibaba. Both HTTP and HTTPS blocking rules are included and HTTPS requests shall be decrytped by MITM, use it at your own risk.

Extended blockers for common trackers and advertisements:

  1. Suffixes
  2. Keywords
  3. Others

Modularised rule sets with IP-based rules, Domain-based rules and Logical rules:

  1. Domain Rules
  2. Supplement for anti-AD

Modularised rule sets with HTTP(S) rules:

  1. URL Regex
  2. Mock
  3. URL Rewrite

Compatibility

Surge Quantumult X
Suffixes.list ☑️ ☑️
Keywords.list ☑️ ☑️
Others.list ☑️ ☑️
Domain Rules ☑️ ☑️
URL Regex ☑️
URL Rewrite ☑️
Mock ☑️
Supplement for anti-AD ☑️ ☑️

Work with anti-AD:

After Version 4.2.2, Surge is able to load 1,000,000+ rules through DOMAIN-SET. anti-AD is an abundant adblocking filter list based on Easylist and optimised for Chinese websites. If you like to use anti-AD rules through DOMAIN-SET, please subscribe the supplement version (deduplicated already).

DOMAIN-SET example:

DOMAIN-SET,https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-surge2.txt,REJECT

or

DOMAIN-SET,https://anti-ad.net/surge2.txt,REJECT

Work with Mock (Map Local)

This feature allows Surge to return an empty json to the network request, which can significantly reduce RAM usage on device than JavaScript(Yachen Liu, Surge Testflight 1723). Mocking feature is now universial and available on Surge Module and base configuration. The fuction of mocking in this gist is duplicate with URL-REGEX rules, choose one you prefer.

Create your own Surge Module:

#!name=$yourname
#!desc=$yourdescription
// Optional: ignore if you need both
#!system=(ios/mac)

[Rule]
RULE-SET,https://raw.githubusercontent.com/TPCTPCTPC/Adblock-gist/master/DOMAINs/EXAMPLE.list,REJECT
RULE-SET,https://raw.githubusercontent.com/TPCTPCTPC/Adblock-gist/master/URL-REGEX/EXAMPLE.list,REJECT

[Map Local]
^https://an\.example\.com/ad data="empty.json" // You can generate an empty json on your own surge.

[MITM]
hostname = %APPEND% an.example.com

Why create your own Module?

It is your responsibility to avoid risks from the Man-In-The-Middle attack. A remote Module can be easily incerted any new hostnames and Javascripts, which could significantly increase the risk of your networking safety, if the user did not notice the change when updating the Module.

Quantumult X Users?

ADBLOCK-GIST now supports QX with domain rules compatibly and url rewrites rules exclusively.

Credits:

About

Adblock rules for Surge 4 and Quantumult X, compatible with Surge Module.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published