Skip to content

Commit

Permalink
[mv3] Add "Malware protection, security" section in "Filter lists" pane
Browse files Browse the repository at this point in the history
Additionally, add "Openphish Domain Blocklist" as stock list.
  • Loading branch information
gorhill committed Dec 14, 2024
1 parent fbe203c commit ac9e12e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
2 changes: 1 addition & 1 deletion platform/mv3/extension/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"description": "Header for a ruleset section in 'Filter lists pane'"
},
"3pGroupMalware": {
"message": "Malware domains",
"message": "Malware protection, security",
"description": "Header for a ruleset section in 'Filter lists pane'"
},
"3pGroupAnnoyances": {
Expand Down
5 changes: 5 additions & 0 deletions platform/mv3/extension/js/filter-lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ export function renderFilterLists(rulesetData) {
rulesetDetails.filter(ruleset =>
ruleset.id === 'default'
),
], [
'malware',
rulesetDetails.filter(ruleset =>
ruleset.group === 'malware'
),
], [
'annoyances',
rulesetDetails.filter(ruleset =>
Expand Down
36 changes: 24 additions & 12 deletions platform/mv3/make-rulesets.js
Original file line number Diff line number Diff line change
Expand Up @@ -1186,23 +1186,22 @@ async function main() {
log(`Secret: ${secret}`);

// Assemble all default lists as the default ruleset
const contentURLs = [
'https://ublockorigin.github.io/uAssets/filters/filters.min.txt',
'https://ublockorigin.github.io/uAssets/filters/badware.min.txt',
'https://ublockorigin.github.io/uAssets/filters/privacy.min.txt',
'https://ublockorigin.github.io/uAssets/filters/unbreak.min.txt',
'https://ublockorigin.github.io/uAssets/filters/quick-fixes.min.txt',
'https://ublockorigin.github.io/uAssets/filters/ubol-filters.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt',
'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext',
];
await rulesetFromURLs({
id: 'default',
name: 'Ads, trackers, miners, and more' ,
enabled: true,
secret,
urls: contentURLs,
urls: [
'https://ublockorigin.github.io/uAssets/filters/filters.min.txt',
'https://ublockorigin.github.io/uAssets/filters/badware.min.txt',
'https://ublockorigin.github.io/uAssets/filters/privacy.min.txt',
'https://ublockorigin.github.io/uAssets/filters/unbreak.min.txt',
'https://ublockorigin.github.io/uAssets/filters/quick-fixes.min.txt',
'https://ublockorigin.github.io/uAssets/filters/ubol-filters.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easylist.txt',
'https://ublockorigin.github.io/uAssets/thirdparties/easyprivacy.txt',
'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext',
],
dnrURL: 'https://ublockorigin.github.io/uAssets/dnr/default.json',
homeURL: '/~https://github.com/uBlockOrigin/uAssets',
filters: [
Expand Down Expand Up @@ -1290,6 +1289,7 @@ async function main() {
await rulesetFromURLs({
id: 'urlhaus.full',
name: 'Malicious URL Blocklist',
group: 'malware',
enabled: true,
urls: [
'https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-hosts.txt',
Expand All @@ -1298,6 +1298,18 @@ async function main() {
],
homeURL: 'https://gitlab.com/malware-filter/urlhaus-filter',
});
await rulesetFromURLs({
id: 'openphish.domains',
name: 'Openphish Domain Blocklist',
group: 'malware',
enabled: false,
urls: [
'https://raw.githubusercontent.com/stephenhawk8054/openphish-adblock/refs/heads/main/filters_init_domains.txt',
],
filters: [
],
homeURL: '/~https://github.com/stephenhawk8054/openphish-adblock',
});

await rulesetFromURLs({
id: 'stevenblack-hosts',
Expand Down

0 comments on commit ac9e12e

Please sign in to comment.