mirror of
https://github.com/vimagick/dockerfiles.git
synced 2026-01-04 03:54:55 +01:00
update
This commit is contained in:
37
dnscrypt/proxy/Dockerfile
Normal file
37
dnscrypt/proxy/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
||||
#
|
||||
# Dockerfile for dnscrypt
|
||||
#
|
||||
|
||||
FROM ubuntu:14.04
|
||||
MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential supervisor pdnsd
|
||||
RUN apt-get clean
|
||||
|
||||
ADD ./services.conf /etc/supervisor/conf.d/
|
||||
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/
|
||||
|
||||
WORKDIR /tmp/pkgs/
|
||||
|
||||
RUN tar xzf libsodium-1.0.2.tar.gz && \
|
||||
cd libsodium-1.0.2 && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
RUN echo /usr/local/lib > /etc/ld.so.conf.d/local.conf && ldconfig
|
||||
|
||||
RUN tar xzf dnscrypt-proxy-1.4.3.tar.gz && \
|
||||
cd dnscrypt-proxy-1.4.3 && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
WORKDIR /
|
||||
RUN rm -r /tmp/pkgs/
|
||||
EXPOSE 53 53/udp
|
||||
|
||||
CMD supervisord -n -c /etc/supervisor/supervisord.conf
|
||||
29
dnscrypt/proxy/README.md
Normal file
29
dnscrypt/proxy/README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
dnscrypt + pdnsd
|
||||
================
|
||||
|
||||
## About
|
||||
|
||||
- dnscrypt: A protocol for securing communications between a client and a DNS resolver.
|
||||
- pdnsd: A DNS server designed for local caching of DNS information.
|
||||
|
||||
## Fig
|
||||
|
||||
dnscrypt:
|
||||
image: vimagick/dnscrypt
|
||||
ports:
|
||||
- "53:53/udp"
|
||||
- "53:53/tcp"
|
||||
restart: always
|
||||
|
||||
## Run
|
||||
|
||||
fig up -d
|
||||
|
||||
## Test
|
||||
|
||||
# UDP
|
||||
dig @127.0.0.1 www.google.com
|
||||
|
||||
# TCP
|
||||
dig @127.0.0.1 www.youtube.com +tcp
|
||||
|
||||
6
dnscrypt/proxy/fig.yml
Normal file
6
dnscrypt/proxy/fig.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
dnscrypt:
|
||||
image: vimagick/dnscrypt
|
||||
ports:
|
||||
- "53:53/udp"
|
||||
- "53:53/tcp"
|
||||
restart: always
|
||||
37
dnscrypt/proxy/pdnsd.conf
Normal file
37
dnscrypt/proxy/pdnsd.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
global {
|
||||
perm_cache=16384;
|
||||
cache_dir="/var/cache/pdnsd";
|
||||
run_as="pdnsd";
|
||||
server_ip = 0.0.0.0;
|
||||
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;
|
||||
}
|
||||
7
dnscrypt/proxy/services.conf
Normal file
7
dnscrypt/proxy/services.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
[program:dnscrypt]
|
||||
priority = 100
|
||||
command = dnscrypt-proxy -a 127.0.0.1:2053 -R opendns
|
||||
|
||||
[program:pdnsd]
|
||||
priority = 200
|
||||
command = pdnsd -c /etc/pdnsd.conf
|
||||
Reference in New Issue
Block a user