1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-20 04:59:25 +02:00
This commit is contained in:
kev 2015-05-30 22:22:28 +08:00
parent 6c99e1abca
commit df3647e380
3 changed files with 33 additions and 14 deletions

View File

@ -6,13 +6,17 @@ dnscrypt
- `dnscrypt-wrapper` - A server-side dnscrypt proxy.
- `dnscrypt-proxy` - A protocol for securing communications between a client and a DNS resolver.
## Fig
## Config
wrapper:
image: vimagick/dnscrypt-wrapper
ports:
- "443:443/udp"
- "443:443/tcp"
environment:
- LISTEN_ADDR=0.0.0.0:443
- RESOLVER_ADDR=8.8.8.8:53
- PROVIDER_NAME=2.dnscrypt-cert.datageek.info
restart: always
proxy:
@ -20,17 +24,31 @@ dnscrypt
ports:
- "53:53/udp"
- "53:53/tcp"
environment:
- LISTEN_ADDR=0.0.0.0:443
- RESOLVER_ADDR=1.2.3.4:443
- PROVIDER_NAME=2.dnscrypt-cert.datageek.info
- PROVIDER_KEY=4C29:9CEB:CF8D:4612:48A8:B2F2:3B6F:A046:EBF5:2F2B:6433:27C6:5F3A:88F5:495E:3075
restart: always
## Run
> `RESOLVER_ADDR` is server public ip address.
fig up -d
## Server
## Test
$ cd dnscrypt
$ fig up -d wrapper
$ docker exec -it dnscrypt_wrapper_1 cat provider_keypair.txt
Public key fingerprint: 4C29:9CEB:CF8D:4612:48A8:B2F2:3B6F:A046:EBF5:2F2B:6433:27C6:5F3A:88F5:495E:3075
# UDP
dig @127.0.0.1 www.google.com
## Client
# TCP
dig @127.0.0.1 www.youtube.com +tcp
$ cd dnscrypt
$ fig up -d proxy
$ dig @127.0.0.1 www.google.com
$ dig @127.0.0.1 www.youtube.com +tcp
## Note
You'd better to use `vimagick/dnscrypt-proxy` as backend of `dnsmasq` or `pdnsd` for better performance.
Please read [this](https://github.com/Cofyc/dnscrypt-wrapper) to re-generate keys!

View File

@ -31,8 +31,8 @@ ENV PROVIDER_KEY B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE0
EXPOSE 53/tcp 53/udp
CMD dnscrypt-proxy --local-address $LISTEN_ADDR \
--provider-name $PROVIDER_NAME \
--provider-key $PROVIDER_KEY \
--resolver-address $RESOLVER_ADDR
CMD dnscrypt-proxy --local-address=$LISTEN_ADDR \
--provider-name=$PROVIDER_NAME \
--provider-key=$PROVIDER_KEY \
--resolver-address=$RESOLVER_ADDR

View File

@ -56,8 +56,9 @@ EXPOSE 443/tcp 443/udp
CMD dnscrypt-wrapper --crypt-publickey-file=crypt_public.key \
--crypt-secretkey-file=crypt_secret.key \
--listen-address ${LISTEN_ADDR} \
--listen-address=${LISTEN_ADDR} \
--provider-cert-file=dnscrypt.cert \
--provider-name=${PROVIDER_NAME} \
--resolver-address ${RESOLVER_ADDR}
--resolver-address=${RESOLVER_ADDR} \
--verbose