We have moved to a new Sailfish OS Forum. Please start new discussions there.
12

[howto] alternative adblock in the native Sailfish Browser

asked 2016-10-12 12:24:25 +0300

pedro gravatar image

updated 2016-11-08 05:01:50 +0300

DarkTuring gravatar image

As of 2.0.4.13 release we've got a better browser.
Unfortunately it is not compatible anymore with Adblock extension. see 28922

Alternatives such as using a custom hosts files or custom DNS resolver may work (see 145811) but only allow filtering on hostname part of URL which leads to partial ad blocking.

I suggest using a smart proxy PAC file in browser to direct known ads URL to blackhole server. I will use Speedmeup which is free, fast and privacy concerned.

DISCLAIMER : i'm involved in Speedmeup project, so my opinion may be biased. There are several others PAC providers. Feel free to use the one you prefer, technical steps are the same.

BEFORE YOU ASK : there is NO proxy is this setup, never, we just trick the PAC file system. see FAQ. Your browsing network traffic remains direct.

Step 1
Launch browser, open new tab, go to "about:config"
Promise to not change anything you don't understand by hitting "OK"

Step 2
Enter "proxy" in the search bar, hit enter

Step 3
Find the key "network.proxy.autoconfig_url"
Change its value from empty (default) to "http://jolla.speedmeup.net/"
This is the URL of the PAC file, you can browse to it to see this wonderful JS script.

Step 4
Find the key "network.proxy.type"
Change its value from 5 (default) to 2
2 means "use the auto-configuration URL"

Step 5
Test your setup by hitting the page http://www.speedmeup.net/diag which should confirm your setup is working.
Enjoy !

Revert back
To disable this setup, just proceed in reverse order.
Revert the network.proxy.type key to 5 and empty the "network.proxy.autoconfig_url" key
Confirm it is disabled by using the "diag" URL

edit retag flag offensive close delete

Comments

2

Interesting way but does this also affect in-app advertisements? Can a system wide proxy be configured in a similar way?

PatsJolla ( 2016-10-12 12:33:13 +0300 )edit
3

I use this: http://winhelp2002.mvps.org/hosts.htm and https://openrepos.net/content/bloodyfoxy/noadshosts (Jolla and laptop) I'm happy with it, as it's stealthy. Websites can't retaliate.

objectifnul ( 2016-10-12 12:51:32 +0300 )edit

@PatsJolla unfortunately setting a system wide auto-configuration URL does not work. despite being shown in Sailfish "Wifi settings", this URL doesn't affect any component
see 22824

pedro ( 2016-10-12 12:57:05 +0300 )edit

On my Nokia N810 I used to use Privoxy with the MicroB browser. Is Privoxy available for Jolla? It can do other things as well as blocking ads, like changing http headers.

DaveRo ( 2016-10-12 13:35:22 +0300 )edit
2

noadshosts is working systemwide.

objectifnul ( 2016-10-12 14:13:42 +0300 )edit

1 Answer

Sort by » oldest newest most voted
10

answered 2016-10-12 18:49:24 +0300

mdosch gravatar image

I just set privacy.trackingprotection.enabled to true in about:config as this actually also works like an adblocker.

edit flag offensive delete publish link more

Comments

seems that this is only available in 2.0.4.13

At least I can't find it, or do you have to add it manually?

PatsJolla ( 2016-10-13 16:51:12 +0300 )edit
1

@PatsJolla I do have a the option here on the Jolla C with 2.0.4.13. More information about the option here: https://wiki.mozilla.org/Security/Tracking_protection

Jozz ( 2016-10-13 18:03:33 +0300 )edit

@PatsJolla@Jozz

You are right, this feature was still missing in 2.0.2.x and got introduced by updating gecko in 2.0.4.x.

mdosch ( 2016-10-13 18:28:58 +0300 )edit

How to test that this is working? Another question.

edit: the test site from mozilla.orghttps://itisatrap.org/firefox/its-a-tracker.html tells that it is not working, i.e. blocking third-party trackers. Maybe the blacklist is wrong? The info site does not even mention the list mozpub-track-digest256 used in Jolla Browser.

JoHe ( 2018-02-05 17:59:11 +0300 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2016-10-12 12:24:25 +0300

Seen: 1,538 times

Last updated: Oct 12 '16