When packaging dnscrypt-proxy please include support for resolvconf. When dnscrypt-proxy starts it should register its listen address with resolvconf and it should de-register its listen address before it stops. Pseudocode follows.
ADRS='127.0.2.1' RCRD='lo.dnscrypt' case "$1" in start) start_daemon && echo "nameserver $ADRS" | resolvconf -a "$RCRD" ;; stop) resolvconf -d "$RCRD" stop_daemon ;; esac It is best if the daemon itself talks to resolvconf. The daemon knows its true listen address and knows exactly when it is ready for that address to be used by a resolver; and if the daemon is killed with a signal it can still de-register its listen address. I request that the address 127.0.2.1 be used in order to avoid conflicts with other local nameservers. Also, please Suggest: resolvconf in debian/control. N.B. In dnsmasq 2.66-3 the resolvconf hook script has been changed such that, now, if the record "lo.dnscrypt" is present then dnsmasq forwards DNS queries exclusively to the addressed listed therein. -- Thomas Hood