From b827b44e7ed746fd1736c462c50549ba83b6fa75 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Sat, 28 Aug 2021 14:26:14 +1000 Subject: [PATCH] Set dnsmasq no-resolv --- Dockerfile.amd64 | 13 +++++++------ Dockerfile.arm | 13 +++++++------ Dockerfile.arm64 | 13 +++++++------ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index b67e93a..770abf4 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -4,11 +4,6 @@ ARG XRAYVER='v1.4.2' RUN apk add --no-cache bash git build-base wget -WORKDIR /go/src/XTLS/Xray-core -RUN git clone https://github.com/XTLS/Xray-core.git . && \ - git checkout ${XRAYVER} && \ - go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main - RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat @@ -16,6 +11,12 @@ RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsm RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf +WORKDIR /go/src/XTLS/Xray-core +RUN git clone https://github.com/XTLS/Xray-core.git . && \ + git checkout ${XRAYVER} && \ + go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main + + FROM alpine:3.14 COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/ @@ -33,7 +34,7 @@ RUN apk update && apk add bash openssl curl jq moreutils \ RUN npm config set unsafe-perm true RUN npm install -g qrcode-terminal -RUN echo "server=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf +RUN echo -e "no-resolv\nserver=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf RUN sed -i "s/^socks4.*/socks5\t127.0.0.1 1080/g" /etc/proxychains/proxychains.conf diff --git a/Dockerfile.arm b/Dockerfile.arm index 983d9fd..1f4f900 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -4,11 +4,6 @@ ARG XRAYVER='v1.4.2' RUN apk add --no-cache bash git build-base wget -WORKDIR /go/src/XTLS/Xray-core -RUN git clone https://github.com/XTLS/Xray-core.git . && \ - git checkout ${XRAYVER} && \ - go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main - RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat @@ -16,6 +11,12 @@ RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsm RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf +WORKDIR /go/src/XTLS/Xray-core +RUN git clone https://github.com/XTLS/Xray-core.git . && \ + git checkout ${XRAYVER} && \ + go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main + + FROM arm32v6/alpine:3.14 COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/ @@ -33,7 +34,7 @@ RUN apk update && apk add bash openssl curl jq moreutils \ RUN npm config set unsafe-perm true RUN npm install -g qrcode-terminal -RUN echo "server=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf +RUN echo -e "no-resolv\nserver=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf RUN sed -i "s/^socks4.*/socks5\t127.0.0.1 1080/g" /etc/proxychains/proxychains.conf diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 406f490..8aed536 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -4,11 +4,6 @@ ARG XRAYVER='v1.4.2' RUN apk add --no-cache bash git build-base wget -WORKDIR /go/src/XTLS/Xray-core -RUN git clone https://github.com/XTLS/Xray-core.git . && \ - git checkout ${XRAYVER} && \ - go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main - RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat RUN cd /tmp; wget -c -t3 -T30 https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat @@ -16,6 +11,12 @@ RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsm RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/bogus-nxdomain.china.conf RUN cd /tmp; wget -c -t3 -T30 https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf +WORKDIR /go/src/XTLS/Xray-core +RUN git clone https://github.com/XTLS/Xray-core.git . && \ + git checkout ${XRAYVER} && \ + go build -o xray -trimpath -ldflags "-s -w -buildid=" ./main + + FROM arm64v8/alpine:3.14 COPY --from=builder /go/src/XTLS/Xray-core/xray /usr/local/bin/ @@ -33,7 +34,7 @@ RUN apk update && apk add bash openssl curl jq moreutils \ RUN npm config set unsafe-perm true RUN npm install -g qrcode-terminal -RUN echo "server=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf +RUN echo -e "no-resolv\nserver=127.0.0.1#5353" >/etc/dnsmasq.d/upstream.conf RUN sed -i "s/^socks4.*/socks5\t127.0.0.1 1080/g" /etc/proxychains/proxychains.conf