The Un-Official Proxomitron Forum

Full Version: Boosting Privoxy's Filtering Capabilities with Customised Filters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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.
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…
(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.
(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.
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.
(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
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.
(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!
Hi vlad_s!

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

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

{-filter{WebRTCBlocker}}
/(.*/)?maps?(-|/)
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]
https://ipper.ru/ still determines the fingerprint.
Reference URL's