uBlock/src/js
Raymond Hill 3a564c1992
Add ability to uncloak CNAME records
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/780

New webext permission added: `dns`, which purpose is
to allow an extension to fetch the DNS record of
specific hostnames, reference documentation:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/dns

The webext API `dns` is available in Firefox 60+ only.

The new API will enable uBO to "uncloak" the actual
hostname used in network requests. The ability is
currently disabled by default for now -- this is only
a first commit related to the above issue to allow
advanced users to immediately use the new ability.

Four advanced settings have been created to control the
uncloaking of actual hostnames:

cnameAliasList: a space-separated list of hostnames.
Default value: unset => empty list.
Special value: * => all hostnames.
A space-separated list of hostnames => this tells uBO
to "uncloak" the  hostnames in the list will.

cnameIgnoreList: a space-separated list of hostnames.
Default value: unset => empty list.
Special value: * => all hostnames.
A space-separated list of hostnames => this tells uBO
to NOT re-run the network request through uBO's
filtering engine with the CNAME hostname. This is
useful to exclude commonly used actual hostnames
from being re-run through uBO's filtering engine, so
as to avoid pointless overhead.

cnameIgnore1stParty: boolean.
Default value: true.
Whether uBO should ignore to re-run a network request
through the filtering engine when the CNAME hostname
is 1st-party to the alias hostname.

cnameMaxTTL: number of minutes.
Default value: 120.
This tells uBO to clear its CNAME cache after the
specified time. For efficiency purpose, uBO will
cache alias=>CNAME associations for reuse so as
to reduce calls to `browser.dns.resolve`. All the
associations will be cleared after the specified time
to ensure the map does not grow too large and too
ensure uBO uses up to date CNAME information.
2019-11-19 12:05:33 -05:00
..
codemirror Use type="search" for search input fields 2019-11-03 13:14:29 -05:00
scriptlets Coallesce mousemove events 2019-11-06 07:01:13 -05:00
wasm Fine-tune new bidi-trie code 2019-10-29 10:26:34 -04:00
1p-filters.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
3p-filters.js Simplify client messaging code 2019-09-19 08:31:38 -04:00
about.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
advanced-settings.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
asset-viewer.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
assets.js Avoid or defer writing back to cache storage at launch 2019-10-15 11:42:43 -04:00
background.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
cachestorage.js Remove remnants of chrome references... 2019-09-21 12:06:57 -04:00
cloud-ui.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
commands.js Revisit element picker arguments code 2019-09-18 12:17:45 -04:00
console.js Fix spurious output at uBO's dev console 2019-02-18 14:41:04 -05:00
contentscript.js Ensure that typeof of href attribute is string 2019-11-08 09:30:59 -05:00
contextmenu.js Revisit element picker arguments code 2019-09-18 12:17:45 -04:00
cosmetic-filtering.js Rename register-like variables 2019-09-29 13:21:09 -04:00
dashboard-common.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
dashboard.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
document-blocked.js Use encodeURIComponent instead of btoa 2019-11-04 13:12:40 -05:00
dyna-rules.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
dynamic-net-filtering.js Use async/await in Matrix.benchmark() 2019-06-19 08:37:48 -04:00
fa-icons.js Grand refactoring of the logger 2019-01-12 16:36:20 -05:00
filtering-context.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
hnswitches.js fix #2859 2018-09-03 14:06:49 -04:00
hntrie.js Fine-tune new bidi-trie code 2019-10-29 10:26:34 -04:00
html-filtering.js Code review of session filters commit 2019-09-26 12:40:56 -04:00
i18n.js Grand refactoring of the logger 2019-01-12 16:36:20 -05:00
logger-ui-inspector.js Simplify client messaging code 2019-09-19 08:31:38 -04:00
logger-ui.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
logger.js Grand refactoring of the logger 2019-01-12 16:36:20 -05:00
lz4.js Fix Promise chain of WASM module load operations 2019-02-01 08:20:43 -05:00
messaging.js Fine tune cosmetic filtering badge-related code 2019-11-03 09:38:36 -05:00
pagestore.js Do not flush blocked-elements cache at webNavigation time 2019-09-21 16:42:15 -04:00
popup.js Bail out when counting hidden elements is too expensive 2019-11-02 09:16:23 -04:00
redirect-engine.js Expand bidi-trie usage in static network filtering engine 2019-10-21 08:15:58 -04:00
reverselookup-worker.js Fix regression in logger's reverse-lookup of filters 2019-09-30 11:41:43 -04:00
reverselookup.js Expand bidi-trie usage in static network filtering engine 2019-10-21 08:15:58 -04:00
scriptlet-filtering.js Rename register-like variables 2019-09-29 13:21:09 -04:00
settings.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00
shortcuts.js Support keyboard shortcut to open popup panel 2019-11-09 09:53:31 -05:00
start.js Save magic compiled/selfie format values in cache storage 2019-11-14 08:22:28 -05:00
static-ext-filtering.js Reduce memory usage in staticExtFilteringEngine.HostnameBasedDB 2019-09-28 13:36:07 -04:00
static-net-filtering.js Code review of commit 4b34d29384 2019-11-09 07:32:19 -05:00
storage.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
strie.js Fine-tune new bidi-trie code 2019-10-29 10:26:34 -04:00
tab.js Fix test against opener tab id in popup filtering code 2019-11-04 13:34:44 -05:00
text-encode.js refactor some webRequest-related code (now that firefox legacy is out of the way) 2018-10-28 10:58:25 -03:00
traffic.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
ublock.js Revisit element picker arguments code 2019-09-18 12:17:45 -04:00
udom.js Update fix for https://github.com/uBlockOrigin/uBlock-issues/issues/468 2019-04-14 16:57:09 -04:00
uritools.js Add ability to uncloak CNAME records 2019-11-19 12:05:33 -05:00
url-net-filtering.js Fix regression in URL rules validation 2019-07-10 17:24:01 -04:00
utils.js Minor fine-tuning of URL tokenizer 2019-10-31 11:15:00 -04:00
whitelist.js Work toward modernizing code base: promisification 2019-09-17 15:15:01 -04:00