A DNS alternative system with support for encrypted DNS protocols and blocklist.

Version:   BETA

A package that combine connman, dnsmasq and DNSCrypt-proxy into one comprehensive DNS system.

For arm64 phone  a CHUM repository should be enabled to install a dnsmasq package.                                    For arm phone a dnsmasq openrepos should be enabled to install a dnsmasq package. 

Use for SFOS >=4.5. This package requires and installs DNSCrypt-proxy and DNScrypt-proxy blocklist packages as well.

Configuration files

/etc/dnsmasq.d/dnscrypt-proxy.conf       - enables dnsmasq as DNS server (@127.0.0.1) and redirects requests for external names to dnscrypt-proxy (@127.0.0.53)
/etc/dnsmasq.d/dns-cache.conf            - enables DNS cache for dnsmasq
/etc/systemd/system/connman.service.d/override.conf - disables /etc/resolv.conf management in Connamn
/etc/tmpfiles.d/connman_resolv.conf - makes symlink /etc/resolv.conf -> /var/lib/dnsmas/resolv.conf
edit: it is relinking /etc/resolv.conf  after a phone reboot
/var/lib/dnsmasq/resolv.conf - sets a DNS server to 127.0.0.1(ln -s /etc/resolv.conf var/lib/dnsmasq/resolv.conf)
/var/lib/dnscrypt-proxy/dnscrypt-proxy.toml.dnsmasq - after renaming to .toml changes dnscrypt-proxy to address to 127.0.0.53 ( edit dnscrypt-proxy.toml for configuration of dnscrypt-proxy )
/var/lib/dnscrypt-proxy/dnscrypt-blocklist-names.txt - list of blocked domains (edit&remove line with domain you want to unblock)
/var/lib/dnscrypt-proxy/dnscrypt-proxy.toml.dnsmasq - changes dnscrypt-proxy to address to 127.0.0.53 after renaming to .toml

A script to restore DNS settings and revert phone to default state.
/usr/local/bin/fix_dns_and_restore_to_default.sh

Uninstalling a DNS alternative, DNSCrypt-proxy and DNScrypt-proxy blocklist packages reverts default DNS service as well.

Emergency manual recovery procedure:
rm -f /var/lib/environment/connman/nodnsproxy.conf
rm -f /etc/systemd/system/connman.service.d/override.conf
systemctl stop dnsmasq
systemctl disable dnsmasq
systemctl restart connman

That package should set DNS and /etc/hosts usage for AlienDalvik as well. 

If there are troubles with uninstalling:
touch /etc/resolv.conf
echo '1.1.1.1' > /etc/resolv.conf
and reinstall the package.

A dnsmasq-2.86 is broken for armv7hl. Please, install dnsmasq-2.76 instead. A  'dnsmasq.service' file is installed if missing.