From 79cb263f962f1a00cfd688f0a921ddc14606b552 Mon Sep 17 00:00:00 2001 From: kevin Date: Sat, 8 Apr 2023 11:33:17 +0800 Subject: [PATCH] update dns --- dnscrypt/proxy/docker-compose.yml | 3 +++ dnsmasq/Dockerfile | 2 +- dnsmasq/dns/README.md | 19 ++++++++++++++++ dnsmasq/dns/docker-compose.yml | 38 +++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 dnsmasq/dns/README.md create mode 100644 dnsmasq/dns/docker-compose.yml diff --git a/dnscrypt/proxy/docker-compose.yml b/dnscrypt/proxy/docker-compose.yml index 09b74b2..5b93387 100644 --- a/dnscrypt/proxy/docker-compose.yml +++ b/dnscrypt/proxy/docker-compose.yml @@ -2,6 +2,9 @@ version: "3.8" services: dnscrypt-proxy: image: vimagick/dnscrypt-proxy + build: + args: + - DNSCRYPT_PROXY_ARCH=x86_64 ports: - "53:53/tcp" - "53:53/udp" diff --git a/dnsmasq/Dockerfile b/dnsmasq/Dockerfile index 3d4415a..d0cf390 100644 --- a/dnsmasq/Dockerfile +++ b/dnsmasq/Dockerfile @@ -16,4 +16,4 @@ EXPOSE 53/tcp \ 53/udp \ 67/udp -ENTRYPOINT ["dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"] +ENTRYPOINT ["dnsmasq", "--keep-in-foreground", "--user=dnsmasq", "--group=dnsmasq"] diff --git a/dnsmasq/dns/README.md b/dnsmasq/dns/README.md new file mode 100644 index 0000000..ca78bed --- /dev/null +++ b/dnsmasq/dns/README.md @@ -0,0 +1,19 @@ +How It Works +============ + +- client: [great firewall](https://en.wikipedia.org/wiki/Great_Firewall) +- dnsmasq: frontend +- dnscrypt-proxy: backend +- internet: [free world](https://en.wikipedia.org/wiki/Free_World) + +``` +☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭ +☭ ┌────────────┐ ┌────────────┐ ┌──────────────────┐ ☭ ┌────────────┐ +☭ │ │ │ │ │ │ ☭ │ │ +☭ │ client ├──────►│ dnsmasq ├─────►│ dnscrypt-proxy │─────☭────►│ internet │ +☭ │ │ │ │ │ │ ☭ │ │ +☭ └────────────┘ └────────────┘ └──────────────────┘ ☭ └────────────┘ +☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭☭ +``` + +> Created by diff --git a/dnsmasq/dns/docker-compose.yml b/dnsmasq/dns/docker-compose.yml new file mode 100644 index 0000000..7b7e5b0 --- /dev/null +++ b/dnsmasq/dns/docker-compose.yml @@ -0,0 +1,38 @@ +version: "3.8" + +services: + + dnsmasq: + image: vimagick/dnsmasq + command: > + --cache-size=10000 + --interface=eth0 + --log-facility=- + --log-queries + --no-dhcp-interface=eth0 + --no-hosts + --no-resolv + --server=192.168.99.53 + ports: + - "53:53/tcp" + - "53:53/udp" + depends_on: + - dnscrypt-proxy + restart: unless-stopped + + dnscrypt-proxy: + image: vimagick/dnscrypt-proxy + volumes: + - ./data:/etc/dnscrypt-proxy + networks: + default: + ipv4_address: 192.168.99.53 + restart: unless-stopped + +networks: + default: + driver: bridge + ipam: + config: + - subnet: 192.168.99.0/24 + gateway: 192.168.99.1