How to configure the built in DNS cache service in UM 16.04 to use dnscrypt-proxy as a forwarder?

I am successfully running dnscrypt-proxy with a chosen resolver. But because it is not configured to take advantage of the built in dns cache service, the requests I make on browser are slow. Using the dig command twice on a website is taking a minimum of 250+ msec too. Previously it took 0 msec. So apparently the dns cache is not being used.

So how do I make dnscrypt-proxy use the dns cache service?

PS: I'm a newbie, I've described the above situation to the best of my knowledge. If there's any mistake I apologise.

Here are some details that may be of use for you to help me:

  • cat /etc/resolv.conf gives me nameserver 127.0.2.1

  • systemctl status dnscrypt-proxy gives a notice saying "Proxying from 127.0.2.1:53 to 178.216.201.222:2053"

  • cat /etc/default/dnscrypt-proxy has DNSCRYPT_PROXY_LOCAL_ADDRESS=127.0.2.1:53

  • This is the content of cat /lib/systemd/system/dnscrypt-proxy.socket

[Unit]
Description=dnscrypt-proxy listening socket
Documentation=man:dnscrypt-proxy(8)
After=network.target
Wants=dnscrypt-proxy-resolvconf.service

[Socket]
ListenStream=127.0.2.1:53
ListenDatagram=127.0.2.1:53

[Install]
WantedBy=sockets.target

And lastly I have edited my connection via NetworkManager settings and in IPV4 settings the method is automatic dhcp addresses only and dns server is 127.0.0.2. This I did following a guide online.

I have tested that dnscrypt is working via dnsleaktest dot com.