Hosts-block (ad-blocking via /etc/hosts) now in Chum

I’d prefer medium instead of mild.

1 Like

Since the latest update I cannot access tagesschau.de any longer despite it veing in the whitelist (i think it is because of the block list as it doesn’t work in the app and the Browser, and other websites do work)

Was there a change in the method for whitelisting?

1 Like

Which update, you mean now that it’s in main or the latest testing version or…?

You must be using some pretty tough lists that tagesschau.de is blocked in the first place.

The whitelisting mechanism itself should work normally, but I’m still working on watch-config.sh which is supposed to watch for changes in the config directory. My logic seems to be off. Maybe changes did not get applied.

I’d appreciate if you could provide output for

devel-su systemctl status -n999 hosts-block-watch-config hosts-block-forced hosts-block

although there probably won’t be much because of volatile storage.

Restarting hosts-block-watch-config might help, and starting hosts-block-forced as a last resort.

Please tell me how it goes.

Apparently I managed to have tagesschau.de on my blacklist as well as on my whitelist. I removed both and now it is working again.
I would have expected that whitelist overrules blacklist, because at the moment there is no gui way to reverse an accidental blacklisting of a site.
However, now it is working again, thank you for your support (and this great app once more)

2 Likes

The file that was last changed takes precedence.

edit: it actually wouldn’t be too hard to check for such duplicates and remove the previous. With a notification.

2 Likes

I’d say go with the Goldilocks blocking by default and let the user decide if it’s too much, too little or just right.

Glad to see this in the main Chum repo. It’ll be much more discoverable there, and I’m pretty sure plenty of SFOS users would like to discover it there.

2 Likes

Goldilocks == medium?

Exactly. Like the Three Bears – the middle between the two extremes is “just right.” At least, “just right” IMO as a default starting point for the user to find their sweet spot, blocking-wise.

1 Like

There have been a few updates on the testing repo.

For black/whitelisting I have implemented a mechanism that will remove an entry from the other list if it was added to one.
Meaning:

  • add an entry to whitelist, with a notification
  • check if that entry is in blacklist
  • if it is, automatically delete it from blacklist, with a notification

and vice versa.

RPM will create a backup of /etc/hosts in /home when this package is first installed.

I tried to make the script that watches config files & triggers updates more robust, i.e. make sure it triggers a run even with edge cases. It sometimes triggers duplicate runs, but both the core script and systemd deal with it gracefully.

The rest are internal improvements/cleanup etc.

If there are no problems/suggestions/critique I will ask for this to be pushed to the main repo.
I will also upgrade the default blocking to “medium”.

6 Likes

I requested the latest testing version to be pushed to Chum main.

Could @rinigus or @piggz take a look please?

done

(20 characters)

3 Likes

That was quick, thanks.

So, new Chum version out!
Using the testing repo is not required anymore, unless I will ask to test some new feature or change.

Dumb question, is bash installed by default on SFOS? If so, is #!/usr/bin/bash the correct shebang?
I think I can deduce answers to both questions, I’m just not 100% sure.

3 Likes

Since quite a looong time there is no real bash anymore on SFOS.

But yes, you can use it, I prefer #!/bin/sh (for brevety :wink:

2 Likes

Did I get it right that there is no GUI and any editing needs to be done via terminal on the phone?

And if installed via Chum - does it also affect /work for Android apps or must that be enabled somehow?

In the end it’s not an app but just a script?

There is a share dialogue if you tap an any url that provides “add to blacklist” and “add to whitelist” alongside with the open in browser x

2 Likes

You don’t have to use the terminal.
But yes, there is no gui, the app* is steered via config files.

* or whatever you want to call it

Thanks, and sorry, I did not see the screenshot when I first replied.

I see you are still nemo; maybe the situation is different on newer installs?

So far I’ve been deliberately avoiding it, but if installation is simple enough I might want to add bash as a dependency, i.e. making the shell script a bash script.

shell is ash with bash compatibilty :upside_down_face:

CONFIG_SH_IS_ASH=y
# CONFIG_SH_IS_HUSH is not set
# CONFIG_SH_IS_NONE is not set
CONFIG_BASH_IS_ASH=y
# CONFIG_BASH_IS_HUSH is not set
# CONFIG_BASH_IS_NONE is not set
CONFIG_SHELL_ASH=y
CONFIG_ASH=y
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_INTERNAL_GLOB=y
CONFIG_ASH_BASH_COMPAT=y
3 Likes

How do I access the sharing dialog? If I long-press a link and select “Share” or access the share option from the browser menu, I only see email, SMS, and Yottagram.

Thanks for any tips.

Just tap the url, like if you want to open externally in browser, then you have addtional options. You need the link in adifferent app then the browser for this, like in an email or a messenger app