From 0d78eb3025e3258c6fb36f4eb887618cee9bb88a Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Sun, 5 Jun 2022 21:03:17 +0200 Subject: [PATCH 1/7] Add `proxy` and `videoproxy` to downsampler/proxy filter --- rules/other-skip-image-downsamplers.json | 4 ++-- rules/privacy-common-images.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/other-skip-image-downsamplers.json b/rules/other-skip-image-downsamplers.json index 15d6814..40e65d1 100644 --- a/rules/other-skip-image-downsamplers.json +++ b/rules/other-skip-image-downsamplers.json @@ -9,7 +9,7 @@ "*" ], "includes": [ - "/\\/(ap_resize\\/ap_resize|image|imageproxy|resizer\\/resizer|safe_image)(.php)?\\?/" + "/\\/(ap_resize\\/ap_resize|image|imageproxy|proxy|videoproxy|resizer\\/resizer|safe_image)(.php)?\\?/" ] }, "types": [ @@ -20,4 +20,4 @@ "title": "Skip image downsamplers", "description": "This filter retrieves the original pictures from the original domains. Disabling this filter will restore the downsampled images.", "tag": "skip-image-downsamplers" -} \ No newline at end of file +} diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index c426edf..233665d 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -18,7 +18,7 @@ "/:\\/\\/[a-z0-9]+\\.bing\\.com\\//", "/:\\/\\/[a-z]{3,4}[0123]?\\.(google|googleapis|ggpht)\\.com\\/(maps\\/vt|cbk|kh)\\?/", "/\\/(Satellite|BlobServer|StaticBS)(\\/[^\\/\\?]+)?\\?/", - "/\\/(ap_resize\\/ap_resize|image|imageproxy|resizer\\/resizer|safe_image)(.php)?\\?/", + "/\\/(ap_resize\\/ap_resize|image|imageproxy|proxy|videoproxy|resizer\\/resizer|safe_image)(.php)?\\?/", "/\\/(i|fetch|image_gallery|thumb|thumbnail)(\\.php|\\/)?\\?|\\?img_?[iI]d=/", "/\\?.*\\&(_nc_[a-z]{1,3}|oh|oe)=./", "://c.disquscdn.com/get?url=", From 1e754d3b4c19f7837bf4625f9950ec3de34c4bdb Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Sun, 5 Jun 2022 21:37:19 +0200 Subject: [PATCH 2/7] Add more exceptions to generic image filter to allow for Google video outside Youtube, and for the numerical id selection filter --- rules/privacy-common-images.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index 233665d..81d7cd2 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -14,12 +14,13 @@ ], "excludes": [ ".maps.api.here.com/maptile/2.1/maptile/", + "/:\\/\\/[a-z0-9-]+\\.googlevideo\\.com\\//", "/:\\/\\/[a-z0-9\\.]+\\.amazonaws\\.com\\//", "/:\\/\\/[a-z0-9]+\\.bing\\.com\\//", "/:\\/\\/[a-z]{3,4}[0123]?\\.(google|googleapis|ggpht)\\.com\\/(maps\\/vt|cbk|kh)\\?/", "/\\/(Satellite|BlobServer|StaticBS)(\\/[^\\/\\?]+)?\\?/", "/\\/(ap_resize\\/ap_resize|image|imageproxy|proxy|videoproxy|resizer\\/resizer|safe_image)(.php)?\\?/", - "/\\/(i|fetch|image_gallery|thumb|thumbnail)(\\.php|\\/)?\\?|\\?img_?[iI]d=/", + "/\\/(i|fetch|image_gallery|thumb|thumbnail|do-get)(\\.php|.xhtml|\\/)?\\?|\\?(img)?_?[iI]d=/", "/\\?.*\\&(_nc_[a-z]{1,3}|oh|oe)=./", "://c.disquscdn.com/get?url=", "://streetviewpixels-pa.googleapis.com/v1/tile", @@ -72,6 +73,7 @@ "hash", "height", "i10c", + "id", "image", "imagesr", "inputformat", @@ -130,7 +132,7 @@ "*" ], "includes": [ - "/\\/(i|fetch|image_gallery|thumb|thumbnail)(\\.php|\\/)?\\?|\\?img_?[iI]d=/" + "/\\/(i|fetch|image_gallery|thumb|thumbnail|do-get)(\\.php|.xhtml|\\/)?\\?|\\?(img)?_?[iI]d=/" ] }, "types": [ @@ -147,6 +149,7 @@ "group_id", "groupid", "i", + "id", "image_path", "img_id", "imgid", From 3cec9e171c394f80164f7b0a784628e92394a1cd Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Sun, 5 Jun 2022 21:46:56 +0200 Subject: [PATCH 3/7] Trim parameters of profile pictures in Reddit --- rules/privacy-common-images.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index 81d7cd2..ea7cde5 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -284,7 +284,8 @@ ], "path": [ "*/styles/bannerBackgroundImage_*", - "*/styles/communityIcon_*" + "*/styles/communityIcon_*", + "*/styles/profileIcon_*" ] }, "types": [ From 46ec4674e88ab231abd5bc458043862ba65d78be Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Sun, 5 Jun 2022 21:55:48 +0200 Subject: [PATCH 4/7] Whitelist images for H&M (in-site) and LinkedIn (everywhere) --- rules/privacy-common-images.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index ea7cde5..d7d98f0 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -327,6 +327,7 @@ "external-content.duckduckgo.com", "gatherer.wizards.com", "img.dafont.com", + "lp2.hm.com", "outlook.office.com", "render.fontstruct.com", "render01.fontshop.com", @@ -405,6 +406,7 @@ "badge.dimensions.ai", "badges.altmetric.com", "chart.googleapis.com", + "dms.licdn.com", "external-preview.redd.it", "i.mycdn.me", "imagebank.osa.org", From 8112578b092dd31476f67f0a7c9a8643de559843 Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Sun, 5 Jun 2022 22:06:16 +0200 Subject: [PATCH 5/7] Whitelist signed Google Video requests for any host Currently used in Invidious instances (a third-party website for YouTube) --- rules/privacy-common-images.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index d7d98f0..35dd450 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -656,13 +656,12 @@ { "uuid": "89d698fb-1e90-4703-ad42-85e6fdf9d1bf", "pattern": { - "scheme": "*", + "scheme": "https", "host": [ - "*.drive.google.com", - "*.googlevideo.com" + "*" ], "path": [ - "videoplayback?*sig=*sig=*" + "videoplayback?*&sig=*&host=*.googlevideo.com" ] }, "types": [ @@ -671,9 +670,9 @@ ], "action": "whitelist", "active": true, - "title": "Signed Google Video requests", + "title": "Signed Google Video requests from third-party sites", "description": "Removing any parameter from these requests will cause the video not to load. Enabled by default. (This sort of requests is used by Google Drive, and 3rd-party sites like Invidious instances.)", - "tag": "privacy-images" + "tag": "whitelist-googlevideo" }, { "uuid": "12486ca3-b63d-49fa-ae64-25b83733d64c", From b68a03d6810f4973b43e7ed77db044779e704050 Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Mon, 6 Jun 2022 19:25:29 +0200 Subject: [PATCH 6/7] Update Instagram/Facebook filter Removed some parameters that are no longer mandatory, and added some whose removal will cause a URL signature mismatch, or any other server error like "bad timestamp". --- rules/privacy-common-images.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index 35dd450..b013a04 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -235,15 +235,19 @@ "tag": "privacy-images-4", "paramsFilter": { "values": [ - "ccb", - "_nc_cat", "_nc_ht", "_nc_oc", "_nc_ohc", - "_nc_sid", + "_nc_vs", + "edm", + "fb_obo", "oe", "oh", - "tp" + "stp", + "tp", + "url", + "utld", + "vs" ], "invert": true }, From 2ba2b3c99a3587b378f676ad14d9c5001645f743 Mon Sep 17 00:00:00 2001 From: ArenaL5 Date: Mon, 6 Jun 2022 19:45:00 +0200 Subject: [PATCH 7/7] Fix #166 by extending avatar whitelist rule to */avatarpic/* --- rules/privacy-common-images.json | 1 + 1 file changed, 1 insertion(+) diff --git a/rules/privacy-common-images.json b/rules/privacy-common-images.json index b013a04..31a5a36 100644 --- a/rules/privacy-common-images.json +++ b/rules/privacy-common-images.json @@ -363,6 +363,7 @@ "*download/file.php?avatar=*", "/avatar.php?*", "/avatar/*", + "/avatarpic/*", "/avatars/*", "/data/avatars/*", "/user_avatar/*",