Block ads on Sailfish 4.4

I created a few comments on the defender issues that might help to fix the current issues

1 Like

Not a Sailfish question, who did you utilize Steven Black hosts blacklist project on postmarketOS on Pinephone?

Thanx

The general instructions are on the github project. I used what’s now called “option 3” since the docker options weren’t a thing when I first generated my blocklist.

Since pmos is pretty much alpine linux, the only hiccups are making sure that you’ve got the python requirements met. You might need to google how to get pip3 installed on pmos/alpine. IIRC, this wasn’t too much of a hassle. I think I’ve saved a shell script somewhere if things go pear shaped.

Once all that is working, the “Common Steps . . .” section is all you need to do to generate the specific list you need for your purposes.

My solutiin is to VPN to my Firewalla and nuke it at that endpoint, works for SFOS and Android apps

1 Like

Hosty works like a charm on my Xperia 10 III. I’ve added 3 additional lists to it and Sailcron refresh all during an 9 hour cycle.

Next try is on Ubuntu Touch. Should also run their. :+1:

1 Like

It’s scaring me to download and run a foreign script as root on my phone. So even if hosty doesn’t do anything wrong, we never know what’s happening tomorrow.
Running hosty as a cron job as root gives the owner of the repository access to all of your data and your system. It will be easy for them to install a backdoor without any sign to the user of the phone. So I would comment to not deploy hosty without supervision.

As far as I understand hosty just updates /etc/hosts. Wouldn’t it be simple to download hosty’s data and create your own script, or even analyse, verify and use hosty’s script statically?

2 Likes

It is easy!
Just choose your StevenBlack list combination (or any list of your choice) and run a cron job on the below.
devel-su curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-social/hosts -o /etc/hosts
Of course change the url to your prefered combo.

4 Likes

Take care to do that as root. It breaks some apps if the file /etc/hosts has a different owner/group.

2 Likes

Of course, my bad. I should have told.

For another approach: use the Brave browser (from the aurora store).

You can sync across Windows/Mac/Linux and Jolla. The browser needs some config to remove wallet etc. but then runs quite well (for me).

I just use the addware/malware hosts: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

That is probably good enough, but I decided to try a combined list.

You can also run adguard’s DNS on the Android side of things with the SecureDNS options…

It will only help that portion though…

No gambling! Jeez, my life is one big gamble :wink:

2 Likes

It doesn’t work for me. I’ve curled the regular StevenBlack hosts file to /etc/hosts, but it seems like it doesn’t block any ads in a native browser.

You need to restart the browser and the browser booster, would be my guess.
systemctl --user restart booster-browser

2 Likes

I spoke too soon. After I rebooted the device, it worked as intended. Thank you

I personally use the Dan Pollock’s hosts list Using a Hosts File To Make The Internet Not Suck (as much) and I’m happy. It’s included in the StevenBlack list quoted above as well.
I tried the Ultimate Hosts Blacklist GitHub - Ultimate-Hosts-Blacklist/Ultimate.Hosts.Blacklist: The Ultimate Unified Hosts file for protecting your network, computer, smartphones and Wi-Fi devices against millions of bad web sites. Protect your children and family from gaining access to bad web sites and protect your devices and pc from being infected with Malware or Ransomware. and it somehow broke SFOS networking (unable to launch the phone application or anything else) until I put back the shorter list.

1 Like

Some hosts blocklists already contain the default entries, e.g. Steven Black’s. They might or might not be what you want, and combining several such lists can have undesired side-effects (A mistake I have to fix in my own script) - maybe even break networking.