1
0
Fork 0

Updated the readme

And fixed the filter urls
This commit is contained in:
Spirillen 2021-12-05 15:56:33 +01:00
parent cc03982f74
commit e3a8c4a9a1
No known key found for this signature in database
GPG Key ID: 88CC3F27732845AD
17 changed files with 229 additions and 51 deletions

151
README.md
View File

@ -1,61 +1,132 @@
[![uBlock syntax](https://img.shields.io/badge/syntax-uBlock%20Origin-%23c61300.svg)](https://github.com/gorhill/uBlock/wiki/Static-filter-syntax)
[![AdGuard syntax](https://img.shields.io/badge/syntax-AdGuard-%23c61300.svg)](https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters)
# contents
I can't guarantee these filers won't cause problems. If you found
problems, [report][issues] it by filling in all the mandatory items in Issue
template; otherwise reports can be ignored. Anyone who uses any of my
filters/codes shall be deemed to have agreed that I have no responsibility
or liability for costs, losses, damages, etc. arising from the use of
the filters/codes. Unless Subscribe link is provided these filters are
assumed to be copied and pasted, or imported, into My filters/rules
(uBlock Origin) or User Rules (AdGuard).
How to write filters
--------------------
Howto? [block whitlisted spyware](https://github.com/easylist/easylist/issues/4529)
@DandelionSprout have written this: [](https://github.com/DandelionSprout/adfilt/blob/master/Wiki/SyntaxMeaningsThatAreActuallyHumanReadable.md#blocking)
but a few examples would be greate
## Issues and comments
The one and only place to report any issues or post a comment are as
following:
- [Issues][issues] with any rules is reported on My Privacy DNS Site
- Commit Comments are posted on the individual [commit][commits] on My
Privacy DNS Site, in case you don't think it need a [Issues][issues].
- Common questions goes straight to the [Support][support] board on My
Privacy DNS Site
- Any comments or issues posted elsewhere will in the future be ignored
in full.
`$` always needs to exist, if you're going to use a modifier.
`,` are used to separate multiple ones.
`github.com` is in full a backup of
https://mypdns.org/my-external-stuff/ublockorigin-rules and used solely
to host the [webfront][#webfront]. We do not operate at Github do to
there anti-privacy terms of usage.
# How to write filters
## File structure
| File naming | Filters supported |
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_domain.` | These filter lists is to ad rules based on a domain specific level. *IF / when* a rules is covering more than one domain, you should add it to the `_rule` filters |
| `_rule` | The place for rules covering more than one domain. |
### Sorting filters
We are sorting the rules based on the second level domain in the `_domain.`
filters. In the `_rule` we sort based on the letter/number `[a-zA-Z0-9]`
disregarding the actual filter first are present at the 3rd argument.
#### Example
In this rules we like to hide the `.modal-backdrop` but to actually succeed
with this, will need some more arguments.
```css
##.show.fade.modal-backdrop
```
This should be sorted by the first `s`
## Filter Inclusion - Exclusions
We will only in sevier cases include any rules that could/can be blocked
by a DNS related firewall like DNS RPZ.
**IF** a rules is included, this will be to support the tor-browser where
any local firewall rule is bypassed.
## Filter writing guides
Howto? [block whitelisted spyware](https://github.com/easylist/easylist/issues/4529)
`$` always needs to exist, if you're going to use a modifier.
`,` are used to separate multiple modifier.
Example (single modifier): `$script`
Example (multiple modifiers): `$document,frame,script,stylesheet`
Also, you can't use such modifiers for cosmetic rules.
## Counter other's rules
You can't use `badfilter` modifiers for cosmetic rules.
For example, `#@#.ads` can't be disabled with `#@#.ads$badfilter`
Instead, you need to re-activate the disabled rule with a new blocking
rule, which goes under the whitelistings radar (so-to-speak).
Instead, you need to re-activate the CSS rule with a new blocking
rule, which goes under the whitelisting radar (so-to-speak).
To override `#@#.ads`, something like `##[class="ads"]`, `##[class^="ads"]`
or `##[class*="ads"]` (`^` = begins with / `*` = contains) will work, since `#@#.ads` only disables/whitelists `##.ads.`
or `##[class*="ads"]` is needed. The (`^` = begins with / `*` = contains)
will work, since `#@#.ads` only disables/whitelists `##.ads.`
* `$badfilter`: Deactivates a resource-blocking entry, even if it is present in another list.
* `$important`: Makes a resource-blocking entry take precedence over another whitelisting entry.
* `$redirect`: Redirects resources to a neutered version that has been embedded in those extensions. Possible options are listed in
[this file](https://github.com/gorhill/uBlock/blob/master/src/js/redirect-engine.js)
(AdGuard has a [slightly smaller selection](https://github.com/AdguardTeam/AdguardBrowserExtension/blob/master/Extension/lib/filter/rules/scriptlets/redirects.yml)).
* `$empty`: Results in a fake empty page being loaded, instead of an error page.
* `$badfilter`: Deactivates a resource-blocking entry, even if it is
present in another list.
* `$important`: Makes a resource-blocking entry take precedence over
another whitelisting entry.
* `$redirect`: Redirects resources to a neutered version that has been
embedded in those extensions. Possible options are listed in
[this file][redirect-engine]
(AdGuard has a [slightly smaller selection][slightly_smaller_selection]).
* `$empty`: Results in a fake empty page being loaded, instead of an
error page.
## Source URI's
How to write filters: <https://help.eyeo.com/en/adblockplus/how-to-write-filters>
[Click here to activate in uBlock Origin](abp:subscribe?location=https://my-external-stuff.github.io/ublockorigin-rules/blockrules.txt&title=Spirillens%20%E2%80%93%20Adblock%20Rules)
### badfilter example
If the original rule was like
```css
@@/advertise.js$script,domain=example.com|xyz.com
```
Then
```css
@@/advertise.js$script,domain=example.com,badfilter
```
is a valid filter, it disables the whitelisted rule only on `example.com`.
See the dialogue at [github][dialogue]
## Webfront
Our HTML front end is <https://my-external-stuff.github.io/ublockorigin-rules/>
### badfilter example
If the original rule was like
```
@@/advertise.js$script,domain=abc.com|xyz.com
```
## Subscribe to the rules
[Click here to activate these rules in you uBlock Origin](abp:subscribe?location=https://my-external-stuff.github.io/ublockorigin-rules/blockrules.txt&title=Spirillens%20%E2%80%93%20Adblock%20Rules)
Then
```
@@/advertise.js$script,domain=abc.com,badfilter
```
is a valid filter, it disables the allowlist only on abc.com.
See the dialog at <https://github.com/My-External-Stuff/ublockorigin-rules/commit/c01ba1a5a0d73a89c911ab11d1322631fe3d0540>
## External Sources
## External resources
@Yuki2718 [/adblock](https://github.com/Yuki2718/adblock)
@yourduskquibbles [/webannoyances](https://github.com/yourduskquibbles/webannoyances)
@ -69,6 +140,14 @@ See the dialog at <https://github.com/My-External-Stuff/ublockorigin-rules/commi
And everyone else I've forgotten to mention here.
Have a look in the [source list](/ublockorigin-rules.template)
## Tanks
Thanks to @Yuki2718, @THEtomaso, @krystian3w and everyone else who is spreading
the knowledge of how rules should be made :smiley:
Thanks to @Yuki2718, @THEtomaso, @krystian3w and everyone else who is
spreading the knowledge of how rules should be made :smiley:
[issues]: https://mypdns.org/my-external-stuff/ublockorigin-rules/-/issues
[commits]: https://mypdns.org/my-external-stuff/ublockorigin-rules/commits/master
[support]: https://mypdns.org/MypDNS/support/-/issues
[redirect-engine]: https://github.com/gorhill/uBlock/blob/master/src/js/redirect-engine.js
[dialogue]: https://github.com/My-External-Stuff/ublockorigin-rules/commit/c01ba1a5a0d73a89c911ab11d1322631fe3d0540
[slightly_smaller_selection]: https://github.com/AdguardTeam/AdguardBrowserExtension/blob/master/Extension/lib/filter/rules/scriptlets/redirects.yml

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/adult_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/adult_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/adware_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/adware_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/annoyance_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/annoyance_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/anti_social_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/anti_social_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/anti_whitelist_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/anti_whitelist_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/cookie_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/cookie_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

99
rules/new_filter.template Normal file
View File

@ -0,0 +1,99 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/new_filter.template
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE
! Homepage: https://mypdns.org/my-external-stuff/ublockorigin-rules/
!
! Please report any unblocked content or problems on the Issue board.
! My Privacy DNS (Rules) issues:
! - https://mypdns.org/my-external-stuff/ublockorigin-rules/issues
!
! My Privacy DNS (domains) issues:
! - https://mypdns.org/my-privacy-dns/matrix/-/issues
!
! My Privacy DNS (adult domains) issues:
! - https://mypdns.org/my-privacy-dns/porn-records/-/issues
! Merge Request:
! - https://mypdns.org/my-external-stuff/ublockorigin-rules/-/merge_requests
! Email:
! - None
! CopyRight:
! - https://mypdns.org/spirillen
! - https://archive.mypdns.org/p/Spirillen/
! - https://github.com/spirillen
! - https://bitbucket.org/spirillen/
! - The individual lists maintainers
! - The individual contributor
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/graphs/master
! 0.
! 1.
! 2.
! 3.
! 4.
! 5.
! 6.
! 7.
! 8.
! 9.
! A.
! B.
! C.
! D.
! E.
! F.
! G.
! H.
! I.
! J.
! K.
! L.
! M.
! N.
! O.
! P.
! Q.
! R.
! S.
! T.
! U.
! V.
! W.
! X.
! Y.
! Z.

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/spyware_domain.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/spyware_rule.blacklist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE

View File

@ -1,5 +1,5 @@
! List url:
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/Adult_Annoyance.txt
! https://mypdns.org/my-external-stuff/ublockorigin-rules/-/tree/master/rules/whitelist_domain.whitelist
!
! License:
! https://mypdns.org/spirillen/ublockorigin-rules/-/blob/master/LICENSEE