1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00
uBlock/src
Raymond Hill c3bc2c741d
Add support for cname type and denyallow option
This concerns the static network filtering engine.

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/943

* * *

New static network filter type: `cname`

By default, network requests which are result of
resolving a canonical name are subject to filtering.
This filtering can be bypassed by creating exception
filters using the `cname` option. For example:

    @@*$cname

The filter above tells the network filtering engine
to except network requests which fulfill all the
following conditions:

- network request is blocked
- network request is that of an unaliased hostname

Filter list authors are discouraged from using
exception filters of `cname` type, unless there no
other practical solution such that maintenance
burden become the greater issue. Of course, such
exception filters should be as narrow as possible,
i.e. apply to specific domain, etc.

* * *

New static network filter option: `denyallow`

The purpose of `denyallow` is bring
default-deny/allow-exceptionally ability into static
network filtering arsenal. Example of usage:

    *$3p,script, \
        denyallow=x.com|y.com \
        domain=a.com|b.com

The above filter tells the network filtering engine that
when the context is `a.com` or `b.com`, block all
3rd-party scripts except those from `x.com` and `y.com`.

Essentially, the new `denyallow` option makes it easier
to implement default-deny/allow-exceptionally in static
filter lists, whereas before this had to be done with
unwieldy regular expressions[1], or through the mix of
broadly blocking filters along with exception filters[2].

[1] https://hg.adblockplus.org/ruadlist/rev/f362910bc9a0

[2] Typically filters which pattern are of the
    form `|http*://`
2020-03-15 12:23:25 -04:00
..
_locales Import translation work from https://crowdin.com/project/ublock 2020-03-15 09:34:34 -04:00
css Centralize break-all CSS property 2020-03-15 09:25:18 -04:00
img Integrate bare-bone filter hit stats in the logger 2019-05-24 11:18:39 -04:00
js Add support for cname type and denyallow option 2020-03-15 12:23:25 -04:00
lib Fix page count computation in publicSuffixList.enableWASM() 2019-04-25 19:40:07 -04:00
web_accessible_resources Expand log output of window.open-defuser 2020-03-09 10:09:40 -04:00
1p-filters.html Centralize break-all CSS property 2020-03-15 09:25:18 -04:00
3p-filters.html Simplify client messaging code 2019-09-19 08:31:38 -04:00
about.html Select existing "Advanced settings" page if any 2019-05-25 08:31:06 -04:00
advanced-settings.html Add basic syntax coloring to advanced settings pane 2019-12-24 10:04:18 -05:00
asset-viewer.html Centralize break-all CSS property 2020-03-15 09:25:18 -04:00
background.html Work toward modernizing code base: promisification 2019-09-16 09:45:17 -04:00
cloud-ui.html fix https://github.com/uBlockOrigin/uBlock-issues/issues/171 2018-08-31 10:50:19 -04:00
dashboard.html Warn when navigating away from pane with unsaved changes 2019-05-19 15:35:00 -04:00
document-blocked.html Further fine tune layout for small screen devices; use SVG for icon 2018-12-21 08:16:24 -05:00
dyna-rules.html Use type="search" for search input fields 2019-11-03 13:14:29 -05:00
epicker.html Allow element picker dialog to be moved around 2019-11-05 12:03:48 -05:00
logger-ui.html Fine tune hostname uncloaking through CNAME-lookup 2019-11-23 13:07:23 -05:00
popup-fenix.html Move refresh button to the right of the power button 2020-02-27 09:29:14 -05:00
popup.html New way to convey IDN and CNAME info in popup panel 2020-02-10 08:06:36 -05:00
settings.html Grand refactoring of the logger 2019-01-12 16:36:20 -05:00
shortcuts.html fix https://github.com/uBlockOrigin/uBlock-issues/issues/106 2018-07-18 18:00:55 -04:00
whitelist.html Add a link to the remote asset in asset viewer 2019-05-23 19:29:59 -04:00