Defender - a privacy guard for SailfishOS.
As an alternative/replacement to the Hosts Adblock, Defender uses the /etc/hosts approach - a proven way of blocking ads, banners, 3rd party cookies, 3rd party page counters etc. by adding blocking rules to the /etc/hosts system file. Bundled with a simple cookie manager, it allows to choose from multiple sources, either from a safe GUI (which does not require root access), or by editing the configuration files.
This allows to easily enable and disable different sources, while still keeping your system in non-root environment.
This app uses a modified version of the python-hosts library.
Sources of ad/spyware blocking rules and their websites are to be found in the application itself. Do not forget to thank/donate to their creators.
Mind that the app is still in an early version, so use with caution, as damage may occur. You have been warned. Please let me know if you experience any problems.
Data costs may apply, so check the WLAN only option to be safe from the data cost from your provider. Updating may take a long time, depending on the size of the sources.
Also, it is unlikely that the third party sources available in the app may compromise your device, but it may happen (that is why none are enabled by default). Enable only sources you trust - I am not responsible for their contents.
If you like this app, please consider a small donation:
Attachment | Size | Date |
---|---|---|
harbour-defender-0.1-2.armv7hl.rpm | 82.54 KB | 01/02/2017 - 01:38 |
harbour-defender-0.1-2.i486.rpm | 82.56 KB | 01/02/2017 - 01:38 |
harbour-defender-0.2-1.i486.rpm | 82.61 KB | 01/02/2017 - 01:49 |
harbour-defender-0.2-1.armv7hl.rpm | 82.55 KB | 01/02/2017 - 01:49 |
harbour-defender-0.3-1.armv7hl.rpm | 73.08 KB | 02/02/2017 - 01:23 |
harbour-defender-0.3-1.i486.rpm | 73.06 KB | 02/02/2017 - 01:23 |
harbour-defender-0.4.0-1.i486.rpm | 73.41 KB | 03/02/2017 - 01:45 |
harbour-defender-0.4.0-1.armv7hl.rpm | 73.4 KB | 03/02/2017 - 01:45 |
0.4
0.3
0.2
0.1
Comments
peterleinchen
Mon, 2020/11/23 - 02:27
Permalink
This package (0.4.0) is now obsoleted, and blacklisted by Jolla.
For all devices without encryption (as well as the tablet) you might still use it but you would need to install as DrYak said.
For all Xperia devices (and of course Jolla 1/C) it is now easier to go to
https://openrepos.net/content/peterleinchen/defender-nodevel-updated-enc...
Xperia devices
pvcn
Fri, 2020/10/16 - 08:26
Permalink
Same on xperia x compact
DrDweeb
Sat, 2020/10/03 - 01:28
Permalink
Does not install on 3.4.0.22. Just says installing ...
DrYak
Mon, 2020/10/19 - 22:51
Permalink
Jolla have blacklisted it in patterns-sailfish-app-blacklist
trial
Sat, 2020/10/24 - 20:11
Permalink
How could I bypass that? Download a text edit with sudo rights and just find it and remove it?
DrYak
Wed, 2020/10/28 - 12:05
Permalink
Currently, it seems that harbour-defender will break:
To ignore blacklisting (at your own risk):
If that breaks your phone (cannot reboot anymore), you'll need to:
rpm -e harbour-defender
do not install yet if you don't feel like doing the above steps in an emergency
trial
Mon, 2020/10/12 - 00:52
Permalink
I do confirm that on Xperia X.
olf
Wed, 2020/02/26 - 03:45
Permalink
@nodevel, the link to the source code (last bullet point under Features in Defender's description here at OpenRepos) is incorrect:
https://gitlab.com/nodevel/harbour-defenderinstead of https://github.com/nodevel/harbour-defender/You might want to rectify that.
rossholmes
Sat, 2020/01/18 - 16:37
Permalink
Is there any issue with this app on other devices expect the Xperia10+? I use Xiaomi Redmi 5+ with SOS 3.2.0.14
Pat
Mon, 2019/12/30 - 17:58
Permalink
Great application when I was using it on Xperia X.
However, on Xperia 10+, I had several boot issues that I ended up discovering related to Defender. As soon as I install it, the boot does not succeed! It does not go to the pin code that goes with encryption and it stays on a black screen with white led forever. As a noob, I cannot explain exactly why though!
dirksche
Sat, 2019/11/23 - 11:43
Permalink
Seems to break system on Xperia 10 with 3.2.0.14. See https://together.jolla.com/question/217403/defender-app-stops-xperia-10-...
csg1976
Tue, 2019/10/08 - 05:22
Permalink
The ZEuS tracker from abuse.ch is discontinued as of July 8th 2019.
timeral
Fri, 2019/02/01 - 05:47
Permalink
Always loading...
Historyscholar
Fri, 2019/01/25 - 18:23
Permalink
Can you update your application ?bulid with 3.0 SDK?
objectifnul
Sat, 2018/12/29 - 13:41
Permalink
Hello,
I'm running Mouhinjoki 2.2.0.29 on an Xperia X. I noticed my hosts file was not updated for months, so I restored /etc/hosts and /system/etc/hosts to their defaults, not forgetting the final emtpy line.
The hosts update process in Defender is still endless, and my hosts files are still not updated.
Anything else I should do to fix this?
----
EDIT: things are back to normal after uninstall, delete all Defender configuration files and reinstall. However, this brute method does not allow me to know why it was broken. Also, Defender seems to not obey the hosts.allow directives.
olf
Wed, 2020/02/26 - 03:48
Permalink
Manually updating works.
Hence there is no need to un- & reinstall Defender.
Sthocs
Fri, 2018/03/30 - 11:41
Permalink
Great app! Makes /etc/hosts accessible to almost anybody :)
By the way, could you explain here or in the description how it can replace the /etc/hosts file without being root?
Thanks!
olf
Fri, 2017/03/17 - 05:20
Permalink
Hey nodevel,
your shell script Hosts Adblock made automatically updated hosts file based blocking on SFOS usable, as it was a great enhancement over noADShosts.
But Defender is just awesome. Wow, cool, fully GUI based for John Does and still with all the manually configurable functionality for expert users Hosts Adblock provides. That split is just right, both technically and in terms of usability, IMO.
Some minor flaws and enhancements, I thought of while configuring and using Defender 0.4.0 on SFOS 2.0.5.6:
a. Unconfigured (i.e. initially) and after deselecting all blocking lists (with a subsequent triggering of "Update") Defender states for "Adblock lists": "Blocked 2, Lists 0/25"
This is a bit irritating, as the two entries mentioned as "Blocked" are just the default (localhost) entries and not blocking entries. Maybe subtracting the number of lines of the /etc/hosts.editable file which do not end in 0.0.0.0 from the ones of /etc/hosts yields a better user experience (or my line of thought is too simplistic).
b. The (temporary) "Disable" pulley function in the "Adblock lists" submenu does display a remorse timer with "Preparing", but nothing is done (looking at the hosts files) except for displaying an empty list of hosts blocking lists thereafter. When returning to Defender's top menu, it still (correctly) states the number of blocking entries and blocking lists, going back into "Adblock lists" still (and incorrectly) an empty list is shown (one can go back and forth multiple times, the contradicting information presented persists). It takes a restart of Defender to make the "Adblock lists" submenu reflect reality, again. This was primarily tested with the "Unified basic" (i.e. a single) list.
c. It would be nice to have the blocking list(s) refresh interval configurable in n days (but not hours, as likely some people abuse that to pull blocking lists insanely often).
Getting carried away (daydreaming about a Defender 2.0) ...
d. The ability to provide an exclude list for an blocking list entry. When a blocking list entry is selected in the "Adblock lists" submenu, that would prevent the selection of the entries on its exclude list (maybe plus "graying them out" visually). So putting all the blocking lists integrated into a cumulative list (e.g. one of the various "Unified" lists) on its exclude list as well as other overlapping cumulative lists, would prevent one from selecting and downloading the same entries multiple times on each and every blocking lists update (e.g. by selecting them all, which is currently possible).
NB: In a shell script, I would immediately think of an unique and fixed number for each blocking list entry, but in Python unique (and clearly defined) names / identifiers plus various ways of possible programming magic come to my mind. But again (as I am not a Python programmer), that is likely easier imagined than implemented.
e. Retry failed downloads, if ...
NB: To implement the last point per downloaded file may be overkill, per scheduled download should suit most people well.
Spontaneous thoughts on implementing:
No matter how much of this daydreaming ever becomes true, you are doing a great job: Thanks a lot!
olf
Sat, 2017/03/18 - 01:39
Permalink
Ah, WRT e.:
defender-refresh.next
looks and sounds better.DarkTuring
Wed, 2017/02/15 - 21:54
Permalink
Cookie locking improvement idea: when locking the cookie list i cannot delete all blacklisted cookies;
Allow deletion of blacklisted cookies even with cookie list locked, prevent deletion of whitelisted cookies with locked cookie list.
abis866p
Sun, 2017/02/12 - 22:02
Permalink
Hi, I still cannot use this application. I am on 2.0.5.6 with the Defender version 0.4. The application is stuck in updating phase. In my case, I have previously and manually compiled a host file from the one provided by Hostman on window. I have uploaded that file on my phone and then replaced the /etc/host one. I also replaced the one for android, but I forgot the path for it. Maybe it is a permission issue although I have allowed write permissions to both group and others on /etc/hosts file. I have aliendalvik installed. Any suggestions?
olf
Fri, 2017/03/17 - 00:50
Permalink
Defender 0.4.0 runs nicely on my Jolla 1 under SFOS 2.0.5.6
Sounds as if you screwed up your hosts files by *replacing* them with ones from Microsoft Windows.
Suggestion: Overwrite the two hosts files from Windows with the original ones, which you surley backed up before replacing them.
Just in case you did not:
- /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
- /system/etc/hosts
127.0.0.1 localhost
Mind the empty line at the end of both hosts files.
Access rights and ownerships for both are: -rw-r--r-- root root
The /opt/alien/etc/hosts reflects the /etc/hosts file, IIRC.
abis866p
Wed, 2017/04/19 - 14:13
Permalink
Thanks, I have done what you have suggested. I can see now that /etc/hosts was updated by Defender which is cool. But /system/etc/hosts did not change, it still has the single line that you suggested to have. Is this working as it is supposed to?
abis866p
Sun, 2017/02/12 - 22:13
Permalink
The other file that Ihave replaced is /opt/alien/etc/hosts
DarkTuring
Sat, 2017/02/04 - 20:56
Permalink
Bug: the cookie list get overwritten after a while, say i whitelisted domain www.ello.co then after a couple days and regardless of wetger having accesses www.ello.co again i check on the cookie list and its red instead of green assuming that means its been added to the blocked list in the background.
I believe there might be a bug that causes cookie settings to be overwritten (my cookie list is not locked).
nodevel
Tue, 2017/02/07 - 17:28
Permalink
Thanks for the feedback. Yes, I will have to rethink the cookie manager part... It looks like it is indeed overwritten. I have a couple of ideas how to solve it and hope to get to it this weekend.
DarkTuring
Wed, 2017/02/15 - 21:56
Permalink
great i look forward to the update, right now i lock it as soon as i can to prevent overwriting or changes to cookie assignments.
bomo
Sun, 2017/02/05 - 10:41
Permalink
I experienced something similar: just installed defender and checked the cookies ans saw that a site (random?) was added.to the whitelist.
giskard
Fri, 2017/02/03 - 23:07
Permalink
How about adding an enable/disable toggle on the cover? It could be useful if you want to check if a particular website doesn't load correctly because of the filters, without opening the full application.
DarkTuring
Fri, 2017/02/03 - 20:04
Permalink
@nodevel For the cookie manager a nice UI touch and improvement would be to index domains by say first letter so facebook would be in the F index and allow expanding and collapsing of cookie content within each domain, that simply will reduce length of scroll list for long cookie lists.
Within cookie list screen allow ability to sort, non categorized cookies first, new cookies first, Whitelisted or Blocked cookies first (these alphabetical)
Pages