This is a library and command line utility to generate the declarativeNetRequest rulesets necessary for the DuckDuckGo Privacy Essentials extension.
Install the dependencies:
npm install
Generate a Smarter Encryption ruleset:
npm run smarter-encryption ../list-of-domains-input.txt ../smarter-encryption-ruleset-output.json
Generate the TDS ruleset:
npm run tds ../tds-input.json ../supported-surrogates-input.json ../tds-ruleset-output.json \
[../match-details-by-rule-id-output.json]
Note:
- This includes both Tracker blocking (see tds.json) and "surrogate script" redirection. (see tracker-surrogates).
- supported-surrogates-input.json must be a JSON encoded array of surrogate script names.
Generate the extension configuration ruleset:
npm run extension-configuration ../extension-config-input.json \
../extension-configuration-ruleset-output.json [../match-details-by-rule-id-output.json]
Lint the code:
npm run lint
Run the tests:
npm test