From 0ce20ab3953e777b5a3d0d4995ddb48833c84ae5 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 2 Mar 2015 22:42:11 +0800 Subject: [PATCH] switch dnsmasq to pdnsd --- dnscrypt/Dockerfile | 4 ++-- dnscrypt/pdnsd.conf | 37 +++++++++++++++++++++++++++++++++++++ dnscrypt/services.conf | 4 ++-- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 dnscrypt/pdnsd.conf diff --git a/dnscrypt/Dockerfile b/dnscrypt/Dockerfile index 4f73536..a6c6fb4 100644 --- a/dnscrypt/Dockerfile +++ b/dnscrypt/Dockerfile @@ -6,11 +6,11 @@ FROM ubuntu:14.04 MAINTAINER kev RUN apt-get update -RUN apt-get install -y build-essential supervisor dnsmasq +RUN apt-get install -y build-essential supervisor pdnsd RUN apt-get clean ADD ./services.conf /etc/supervisor/conf.d/ -ADD ./dnsmasq.conf /etc/ +ADD ./pdnsd.conf /etc/ ADD https://download.libsodium.org/libsodium/releases/libsodium-1.0.2.tar.gz /tmp/pkgs/ ADD http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.4.3.tar.gz /tmp/pkgs/ diff --git a/dnscrypt/pdnsd.conf b/dnscrypt/pdnsd.conf new file mode 100644 index 0000000..25ce378 --- /dev/null +++ b/dnscrypt/pdnsd.conf @@ -0,0 +1,37 @@ +global { + perm_cache=16384; + cache_dir="/var/cache/pdnsd"; + run_as="pdnsd"; + server_ip = 127.0.0.1; + status_ctl = on; + query_method=udp_tcp; + min_ttl=15m; # Retain cached entries at least 15 minutes. + max_ttl=1w; # One week. + timeout=10; # Global timeout option (10 seconds). + neg_domain_pol=on; + udpbufsize=1024; # Upper limit on the size of UDP messages. +} + +server { + label = "dnscrypt-proxy"; + ip = 127.0.0.1; + port = 2053; + timeout = 4; + uptest = query; + interval = 15m; + proxy_only=on; +} + +source { + owner=localhost; + file="/etc/hosts"; +} + + +rr { + name=localhost; + reverse=on; + a=127.0.0.1; + owner=localhost; + soa=localhost,root.localhost,42,86400,900,86400,86400; +} diff --git a/dnscrypt/services.conf b/dnscrypt/services.conf index 5b2cb2b..839d9bc 100644 --- a/dnscrypt/services.conf +++ b/dnscrypt/services.conf @@ -2,6 +2,6 @@ priority = 100 command = dnscrypt-proxy -a 127.0.0.1:2053 -R opendns -[program:dnsmasq] +[program:pdnsd] priority = 200 -command = dnsmasq -d -C /etc/dnsmasq.conf +command = pdnsd -c /etc/pdnsd.conf