On Raspbian Stretch I followed the updated instructions for DNSCrypt v2 (This one and not the one included in Raspbian apt, which is deprecated and not maintained anymore).
Follow this step-by-step guide, there's one precompiled binay to download and 3 config files to edit, it's well documented and nothing complex to install :
I've been using it with for a few weeks now with no issues, it runs reliably and fast (no resolution delay added).
However, here are the 2 things to know when using DNScrypt-proxy 2 with PiHole :
- the real difficulty is to find a reliable and fast DNScrypt compatible public server, a list is available here but it's not always clear whether the server supports DNSSec, anonymize queries, etc. so I had to live-check almost the whole list one by one, some of them are really slow, some don't support DNSSec (while they are shown as supporting it in the above list). That took me some time, and in the end only the "scaleway-fr" server suit my needs (I guess it depends on everyone's location) so I don't have a "backup upstream server" and PiHole won't be able to resolve if this server fails
- due to a bug in dnsmask < 2.78 (Raspbian dnsmasq version is 2.76), you can't use DNSSec verification on Pihole side (see here for the full bug description), thus the importance of chosing a DNSSec enabled server (I hope this issue is fixed with the new FTLDNS based on dnsmask 2.78, I can't test right now cause I have issues updating to beta version).
For DNScrypt-proxy 2 to be integrated in Pihole, that would require that both teams that work on those 2 different projects agree to share some more work and support, and above all that a lot more public dnscrypt 2 compatible servers are deployed, maintained and documented around the world.