Post Reply 
Boosting Privoxy's Filtering Capabilities with Customised Filters
Aug. 04, 2015, 02:39 PM (This post was last modified: Aug. 04, 2015 02:46 PM by Faxopita.)
Post: #1
Boosting Privoxy's Filtering Capabilities with Customised Filters
In connexion with your post:

(Aug. 04, 2015 11:08 AM)cattleyavns Wrote:  Block WebRTC:
Code:
FILTER: blockwebrtc
s†(^[^;]*?(?:<head[^>]*?>|<body[^>]*?>|<script[^>]*?>[^>]*?</script>))†\n<script>function NoWebRTC(e){return 1}window.RTCPeerConnection=NoWebRTC; window.webkitRTCPeerConnection=NoWebRTC; window.mozRTCPeerConnection=NoWebRTC;</script>\n$1†i

Test: https://diafygi.github.io/webrtc-ips/

I've just added the filter in my user.filter file, but fails to work on the test site. I'm having the same issue with the other filters as well. Privoxy loads the filter with success, but get “0 hits” every time I visit the test sites.

In my user.action file, I've got this:
Code:
{ +filter{blockwebrtc} }
  /

My Privoxy version: 3.0.21
Add Thank You Quote this message in a reply
Aug. 04, 2015, 02:59 PM (This post was last modified: Aug. 04, 2015 03:29 PM by cattleyavns.)
Post: #2
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
Hi Faxopita, okay, so '0 hits' means my filter cannot find any tags to replace with my code.

First, can you try this:
Code:
FILTER: blockwebrtc
s†(<head>)†\n<script>function NoWebRTC(e){return 1}window.RTCPeerConnection=NoWebRTC; window.webkitRTCPeerConnection=NoWebRTC; window.mozRTCPeerConnection=NoWebRTC;</script>\n$1†i

The second I think possibly, that is "†" might not work on some system (for me † is the best), so can you please try this code, I simply replace † with @:
Code:
FILTER: blockwebrtc
s@(^[^;]*?(?:<head[^>]*?>|<body[^>]*?>|<script[^>]*?>[^>]*?</script>))@\n<script>function NoWebRTC(e){return 1}window.RTCPeerConnection=NoWebRTC; window.webkitRTCPeerConnection=NoWebRTC; window.mozRTCPeerConnection=NoWebRTC;</script>\n$1@i


If my filter work, that page couldn't get my local IP, like this picture: http://i.imgur.com/6E4D5v7.png
Anyways, I will help you fix this problem until everything work fine.

SMALL AND OFF-TOPIC TIPS: By disabling Privoxy log, Privoxy will become faster.
Add Thank You Quote this message in a reply
Aug. 04, 2015, 04:53 PM
Post: #3
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
Your last suggestion works. I had to replace † by @; filters anticlickjacking and blockwebrtc are both working well on my system. However, though I replaced † by @ in filter canvasblocker the result is strange: on the test site BrowserLeaks, the filter produced 1 hit (as expected I guess), but still can see my browser's fingerprint details…
Add Thank You Quote this message in a reply
Aug. 04, 2015, 06:37 PM
Post: #4
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
(Aug. 04, 2015 02:59 PM)cattleyavns Wrote:  SMALL AND OFF-TOPIC TIPS: By disabling Privoxy log, Privoxy will become faster.

Hello cattleyavns, always good to know. In my case, I prefer to have a log of third-party/implicit requests so I can analyse them before I go to bed… This is how I discover new privacy-offending agents.
Add Thank You Quote this message in a reply
Aug. 05, 2015, 12:40 AM (This post was last modified: Aug. 05, 2015 12:41 AM by cattleyavns.)
Post: #5
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
(Aug. 04, 2015 04:53 PM)Faxopita Wrote:  Your last suggestion works. I had to replace † by @; filters anticlickjacking and blockwebrtc are both working well on my system. However, though I replaced † by @ in filter canvasblocker the result is strange: on the test site BrowserLeaks, the filter produced 1 hit (as expected I guess), but still can see my browser's fingerprint details…

Confirmed that my canvas filter only work fine on Firefox, but I remember that I tested this filter with Chrome before and it worked, that is weird and I realized that Chrome canvas fingerprinting is now different with Firefox canvas fingerprinting, so I will try to fix it, but I'm not sure.
Or maybe that website tricked my method, in the past it have worked for sure, I remembered that.
Add Thank You Quote this message in a reply
Dec. 24, 2015, 11:19 PM (This post was last modified: Dec. 24, 2015 11:31 PM by Faxopita.)
Post: #6
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
Canvas fingerprinting and WebRTC blockers written by Black Rider and available here. Both tested successfully on my configuration.

Code:
FILTER: CanvasBlocker
s@(\w\.getImageData\((.*?)\));|(\w\.toDataURL\((.*?)\));@@

Test here.

Code:
FILTER: WebRTCBlocker
s@<head(.*?)>@<head$1>\n<script>function NoWebRTC(e){return 1}
window.RTCPeerConnection=NoWebRTC;
window.webkitRTCPeerConnection=NoWebRTC;
window.mozRTCPeerConnection=NoWebRTC;</script>\n@i

Test here.

Code to block Javascript-written keyloggers available here. Website in French, but you can just grab the code.

Don't forget to activate these filters in user.action file.
Add Thank You Quote this message in a reply
[-] The following 2 users say Thank You to Faxopita for this post:
cattleyavns, vlad_s
Dec. 26, 2015, 11:52 PM (This post was last modified: Dec. 27, 2015 12:09 AM by cattleyavns.)
Post: #7
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
(Dec. 24, 2015 11:19 PM)Faxopita Wrote:  Canvas fingerprinting and WebRTC blockers written by Black Rider and available here. Both tested successfully on my configuration.

Code:
FILTER: CanvasBlocker
s@(\w\.getImageData\((.*?)\));|(\w\.toDataURL\((.*?)\));@@

Test here.

Code:
FILTER: WebRTCBlocker
s@<head(.*?)>@<head$1>\n<script>function NoWebRTC(e){return 1}
window.RTCPeerConnection=NoWebRTC;
window.webkitRTCPeerConnection=NoWebRTC;
window.mozRTCPeerConnection=NoWebRTC;</script>\n@i

Test here.

Code to block Javascript-written keyloggers available here. Website in French, but you can just grab the code.

Don't forget to activate these filters in user.action file.

Thank you very much for sharing keylogger blocker, I think I get some ideas from that, I can write a better version of it, and a better version of Canvas Blocker.

The CanvasBlocker you shared above is a nice solution for all web browser, it is sad that my version only works on Firefox and til now I still have no solution to make it works on Chrome.

I have some interesting filters to boost user privacy too, just check: http://www.prxbx.com/forums/showthread.p...7#pid18507
Add Thank You Quote this message in a reply
Dec. 27, 2015, 08:20 PM
Post: #8
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
Hi Cattleyavns, it's been a long time since our last talk. Glad you're happy with the rules. It would indeed be excellent if you could make CanvasBlocker rock solid in the future.

Thanks again for sharing your filters.
Add Thank You Quote this message in a reply
Nov. 05, 2017, 09:34 PM
Post: #9
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
(Dec. 24, 2015 11:19 PM)Faxopita Wrote:  Canvas fingerprinting and WebRTC blockers written by Black Rider and available here. Both tested successfully on my configuration.

Code:
FILTER: CanvasBlocker
s@(\w\.getImageData\((.*?)\));|(\w\.toDataURL\((.*?)\));@@

Test here.

Hello! A good filter, but the site https://yandex.ru/maps/ breaks down, I do not see the map. I have your filter located first:

Code:
+filter{adsbygoogle}
+filter{CanvasBlocker}
+filter{WebRTCBlocker}

/.*

then below it goes:

Code:
-filter{CanvasBlocker}
-filter{WebRTCBlocker}
+filter{yandex-maps}

yastatic.net/maps-beta/build/chunks/home/
yandex.ru/maps/

But the filter does not turn off. I would like to fix it. Thank you!
Add Thank You Quote this message in a reply
Nov. 07, 2017, 12:14 PM
Post: #10
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
Hi vlad_s!

I think proceeding that way may help:
Code:
{+filter{adsbygoogle}}
/
{+filter{CanvasBlocker}}
/
{+filter{WebRTCBlocker}}
/

{-filter{CanvasBlocker}}
/(.*/)?maps?(-|/)

{-filter{WebRTCBlocker}}
/(.*/)?maps?(-|/)
Add Thank You Quote this message in a reply
Nov. 07, 2017, 08:22 PM (This post was last modified: Nov. 07, 2017 08:34 PM by vlad_s.)
Post: #11
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
In Firebug, an error appears in the console. The previous time it was the same. The problem is only because of the canvas filter.
[Image: 4nLOJ8O35X_thumb.jpg]
Add Thank You Quote this message in a reply
Feb. 23, 2018, 08:38 AM
Post: #12
RE: Boosting Privoxy's Filtering Capabilities with Customised Filters
https://ipper.ru/ still determines the fingerprint.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: