Post Reply 
CSS filtering - some browsers ignore it
May. 30, 2018, 06:25 PM
Post: #1
CSS filtering - some browsers ignore it
I am using adblocl2privoxy to generate filtering lists, but unable to pinpoint exactly why this happens, but for some hosts on the network with certain browsers it works just right while for others they just do not connect to webserver to get CSS file for element hiding. Could it be related to this? "most browsers will not accept unencrypted redirects as response for https:// requests anyway:"

I tried to change local website to HTTPS but it made no difference for hosts which so far did not connect for CSS and broke it for those that did...

As for browsers Chrome and IE seem to use it now and then, while Firefox even with no addons ignores it completely

Any ideas are welcomed.

Code generated by adblock2privoxy which should make css filtering work for all
Code:
#AbBlock system filters -- don't edit --
SERVER-HEADER-TAGGER: ab2p-block-s
s@.*@ab2p-block-s@Ti
CLIENT-HEADER-TAGGER: ab2b-unblock-u
s@user-agent.*@ab2p-unblock-u@Ti
SERVER-HEADER-TAGGER: ab2p-unblock-d
s@date.*@ab2p-unblock-d@Ti
SERVER-HEADER-TAGGER: ab2p-unblock-s
s@server.*@ab2p-unblock-s@Ti
SERVER-HEADER-TAGGER: ab2p-handle-as-image-s
s@^content-type(?=:[\s\w]*image\/):.*@ab2p-handle-as-image@Ti
CLIENT-HEADER-TAGGER: ab2p-handle-as-image-c
s@^accept(?=:[\s\w]*image\/):.*@ab2p-handle-as-image@Ti
SERVER-HEADER-FILTER: ab2p-xframe-filter
s@.*\sHTTP\/1.*@$&\r\nX-Frame-Options: DENY@i
CLIENT-HEADER-TAGGER: ab2p-elemhide-check-debug
s@^cookie:.*ab2p-elemhide-filter-debug=true(?:;|$).*@ab2p-elemhide-filter-debug@Ti
FILTER: ab2p-elemhide-filter
s@[^'"\s]\s*<head[^>]*>(?=\s*[^'"\s])@$&<link rel="stylesheet" type="text/css" href="http://192.168.101.101:8445/ab2p.common.css"></link>
<link rel="stylesheet" type="text/css" href="http://192.168.101.101:8445/$host/ab2p.css"></link>@iUD
FILTER: ab2p-elemhide-filter-debug
s@[^'"\s]\s*<head[^>]*>(?=\s*[^'"\s])@$&<link rel="stylesheet" type="text/css" href="http://192.168.101.101:8445/debug/ab2p.common.css"></link>
<link rel="stylesheet" type="text/css" href="http://192.168.101.101:8445/$host.debug/ab2p.css"></link>@iUD
FILTER: ab2p-popup-filter
s@[^'"\s]\s*<head[^>]*>(?=\s*[^'"\s])@$&<script type="text/javascript">parent==window&&opener&&close()</script>@iUD
Add Thank You Quote this message in a reply
May. 30, 2018, 11:56 PM
Post: #2
RE: CSS filtering - some browsers ignore it
firefox->about:config->security.mixed_content.block_active_content
try change this to false?
Add Thank You Quote this message in a reply
May. 31, 2018, 06:53 AM (This post was last modified: Jun. 01, 2018 06:54 PM by ryszardzonk.)
Post: #3
RE: CSS filtering - some browsers ignore it
I tried this setting and Firefox does change things and says in Inspector "Wczytywanie mieszanej (niezabezpieczonej) interaktywnej treści „http://192.168.101.101:8445/www.agatameble.pl/ab2p.css” na zabezpieczonej stronie" which means that is loading that css file, but two things happen
- browser does not show green lock for secure content anymore
- if one is fine with the first it still does not work as no inquiry for css file reaches the webserver.

Well it may be that it is I am using Firefox 52.8 while some changes has been made to it in Firefox 55. I'll see with most recent version.

EDIT: Yeah that was it. Changing that option in Firefox 60 had the desired effect and browser with that option set to false reached for that css file.

EDIT2: I described the problem here and it turns out some sites need also disabled content security policy... I do not think disabling all those security policies is good idea... Having script send content for https sites to local css file also locates in https is essential.
Add Thank You Quote this message in a reply
Jun. 05, 2018, 07:38 PM (This post was last modified: Jun. 05, 2018 07:39 PM by oldsod.)
Post: #4
RE: CSS filtering - some browsers ignore it
Sorry not to be of any valuable help with this, but possible alternatives are using solutions other than privoxy.
Firefox still has the feature to add in a custom user css (have used with mixed results) . As does IE (for windows users) to add in a custom style sheet.

I still rely on using an extension to add my css to the browsers (chrome and firefox) - for both ad blocking and styling certain web sites. This I use to overcomes the HTTPS sites problem with privoxy unable to natively filter HTTPS.

Best rgards.
Add Thank You Quote this message in a reply
Jun. 05, 2018, 08:56 PM
Post: #5
RE: CSS filtering - some browsers ignore it
If I was going to rely only only browser than installing "uBlock origin" addon would do everything privoxy does just better, as not all adblock rules translate properly to privoxy which is what I found out by extensively testing it for past month and reported all issues I found https://github.com/essandess/adblock2privoxy/issues
Having that said if someone steps up and fixes them than it would be major step ahead in protecting privacy as most addons in browsers could be than deleted as they are used to fingerprint specific users too. One would not also have to worry about installing all rule sets in every browser as they all would work thanks to priovxy even on fresh install of new system.
I say 95% of work is done and it would be shame not to get it fixed up.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: