From d47b9162b88056b0b7a4f81ee7e26bc09c0e5525 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Mon, 8 Aug 2022 01:16:47 +0800 Subject: [PATCH] build: update naiveproxy --- Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3aa413..e56f6d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -359,16 +359,17 @@ COPY --from=upx /upx/ /usr/ RUN upx -9 /tmp/clash # Download naiveproxy -FROM ${ALPINE_IMG} AS naiveproxy -ENV NAIVE_VERSION="v103.0.5060.53-3" +FROM ${ALPINE_IMG} AS naive +ENV NAIVE_VERSION="v104.0.5112.79-2" RUN apk add curl libgcc jq RUN curl -sL https://api.github.com/repos/klzgrad/naiveproxy/releases/tags/${NAIVE_VERSION} \ | jq .assets | jq .[].name | grep naiveproxy-${NAIVE_VERSION}-openwrt-$(uname -m) \ | cut -b 2- | rev | cut -b 2- | rev | tac > list.dat -RUN echo -e "while read FILE_NAME;do\nwget https://github.com/klzgrad/naiveproxy/releases/download/\${NAIVE_VERSION}/\${FILE_NAME}\n \ - tar xf \${FILE_NAME} && ldd ./\$(echo \$FILE_NAME | rev | cut -b 8- | rev)/naive\n \ - [ \$? -eq 0 ] && cp ./\$(echo \$FILE_NAME | rev | cut -b 8- | rev)/naive /tmp/ && break\ndone < list.dat" > naiveproxy.sh && \ - sh naiveproxy.sh +RUN echo "while read FILE_NAME; do" >> naive.sh && \ + echo "wget https://github.com/klzgrad/naiveproxy/releases/download/\${NAIVE_VERSION}/\${FILE_NAME}" >> naive.sh && \ + echo "tar xf \${FILE_NAME} && ldd ./\$(echo \$FILE_NAME | rev | cut -b 8- | rev)/naive" >> naive.sh && \ + echo "[ \$? -eq 0 ] && cp ./\$(echo \$FILE_NAME | rev | cut -b 8- | rev)/naive /tmp/ && break" >> naive.sh && \ + echo "done < list.dat" >> naive.sh && sh naive.sh COPY --from=build-base /apk/ /apk/ RUN /apk/build-base && strip /tmp/naive @@ -475,9 +476,9 @@ COPY --from=trojan /tmp/trojan* /asset/usr/bin/ COPY --from=gost /tmp/gost* /asset/usr/bin/ COPY --from=brook /tmp/brook /asset/usr/bin/ COPY --from=clash /tmp/clash /asset/usr/bin/ +COPY --from=naive /tmp/naive /asset/usr/bin/ COPY --from=snell /tmp/snell-* /asset/usr/bin/ COPY --from=hysteria /tmp/hysteria /asset/usr/bin/ -COPY --from=naiveproxy /tmp/naive /asset/usr/bin/ COPY --from=relaybaton /tmp/relaybaton /asset/usr/bin/ COPY --from=pingtunnel /tmp/pingtunnel /asset/usr/bin/ COPY --from=wireproxy /tmp/wireproxy /asset/usr/bin/ @@ -492,4 +493,4 @@ RUN apk add --no-cache boost-program_options c-ares \ ln -s /usr/local/share/ProxyC/main.py /usr/bin/proxyc COPY --from=asset /asset / EXPOSE 7839 -CMD ["proxyc"] +ENTRYPOINT ["proxyc"]