I had problems with peterleinchen’s defender, too.
And no disrespect, but hosty seems way too complex for such a simple task.
In the end I just created a systemd timer & service to curl Steven Black’s host file. Instructions. And thanks to the hosty developer for providing a tip on how to make /etc/hosts available for Android apps, too.
Problem: it seems a full reboot is required before sailfish-browser reads the new /etc/hosts. Any ideas?