perf: dns默认ipv4first

This commit is contained in:
xiaojunnuo
2026-06-14 23:18:37 +08:00
parent 260f5ae777
commit 194463bea9
2 changed files with 16 additions and 23 deletions
@@ -169,10 +169,8 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
};
setGlobalProxy(opts);
setGlobalHeaders(this.parseKeyValueText(privateSetting.commonHeaders));
if (privateSetting.dnsResultOrder) {
dns.setDefaultResultOrder(privateSetting.dnsResultOrder as any);
}
dns.setDefaultResultOrder(privateSetting.dnsResultOrder as any || 'ipv4first');
if (privateSetting.pipelineMaxRunningCount) {
executorQueue.setMaxRunningCount(privateSetting.pipelineMaxRunningCount);
+14 -19
View File
@@ -1,5 +1,5 @@
#FROM node:22-alpine3.21 AS builder
FROM node:22.22-trixie-slim AS builder
FROM node:22-alpine3.21 AS builder
# RUN apk add build-base
# RUN wget -O - https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2 | tar -xj && \
# cd jemalloc-5.3.0 && \
@@ -25,7 +25,7 @@ RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
# npm run build-on-docker
FROM node:22.22-trixie-slim
FROM node:22-alpine3.21
EXPOSE 7001
EXPOSE 7002
@@ -34,14 +34,9 @@ EXPOSE 7002
# ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so.2
# RUN apt-get update && \
# apt-get install --yes openssl && \
# apt-get install --yes openjdk8 && \
# apt-get install --yes netcat-openbsd && \
# apt-get install --yes iputils-ping && \
# apt-get install --yes wget && \
# apt-get install --yes dnsutils
RUN apk add --no-cache openssl
RUN apk add --no-cache openjdk8
# RUN apk add --no-cache gcompat
WORKDIR /app/
COPY --from=builder /workspace/certd-server/ /app/
@@ -56,14 +51,14 @@ ENV ALIYUN_CLIENT_READ_TIMEOUT=20000
RUN mkdir -p $LEGO_DOWNLOAD_DIR
# 根据架构下载不同的文件
# RUN ARCH=$(uname -m) && \
# if [ "$ARCH" = "x86_64" ]; then \
# wget -O $LEGO_DOWNLOAD_DIR/lego_v${LEGO_VERSION}_linux_amd64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_amd64.tar.gz; \
# elif [ "$ARCH" = "aarch64" ]; then \
# wget -O $LEGO_DOWNLOAD_DIR/lego_v${LEGO_VERSION}_linux_arm64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_arm64.tar.gz; \
# else \
# echo "Unsupported architecture: $ARCH"; \
# fi
RUN ARCH=$(uname -m) && \
if [ "$ARCH" = "x86_64" ]; then \
wget -O $LEGO_DOWNLOAD_DIR/lego_v${LEGO_VERSION}_linux_amd64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_amd64.tar.gz; \
elif [ "$ARCH" = "aarch64" ]; then \
wget -O $LEGO_DOWNLOAD_DIR/lego_v${LEGO_VERSION}_linux_arm64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_arm64.tar.gz; \
else \
echo "Unsupported architecture: $ARCH"; \
fi
ENV TZ=Asia/Shanghai
ENV NODE_ENV=production