build clean DNS service

As we know, every visit to, the browser have to ask DNS server to get DNS infomation about, but for some well-known reason, especially in China mainland, you will get a fake infomation. More seriouly, the ISP(Internet Service Provider)such as China Unicom or China Mobie, dirty the DNS, release ad in DNS infomarion.

So, we need a clean DNS service. unfortunately, the Google Public DNS : , it’s performance in China mainaland is unstable, but we have another method.

DNS-over-HTTPS Which can use Https get DNS information.

Next, use the docker to configure it.

1. Pdnsd

We need this tools to cache DNS info, docker image: vimagick/pdnsd


docker run --name mypdnsd -p 53:53/tcp -p 53:53/udp -d vimagick/pdnsd

then, docker-enter this, and edit /etc/pdnsd.conf

global {
        server_ip = any;
        status_ctl = on;
#       paranoid=on;       # This option reduces the chance of cache poisoning
                           # but may make pdnsd less efficient, unfortunately.
        min_ttl=15m;       # Retain cached entries at least 15 minutes.
        max_ttl=1w;        # One week.
        timeout=10;        # Global timeout option (10 seconds).


server {
        label = "prcdns";
        ip =;
        timeout = 10;
        port = 3535;

focus on server {} which is the transform,

in general, you can use this:

server {
	label = "114dns"; 
	ip =,;
	timeout = 10;
	port = 53; 

but in our method, we have to build a DNS server. ps. is a test service.

2. Use DNS-over-HTTPS.

docker image: lbp0200/PRCDNS

docker-enter this, see /

PRCDNS -l $HOST -p $PORT -r http_proxy

Because the DNS-over-Https website has been block, so you have to Shadowsocks to Http with polipo.

that’s TODO. Have to configure the shadowsocks and polipo, then use this.