feat: implement custom proxy subscription management and enhance configuration

- Added support for importing Clash/V2ray subscriptions, including automatic format detection and integration with sing-box for protocol conversion.
- Introduced five proxy usage modes in the configuration, allowing flexible selection between mixed, custom-only, and free-only modes.
- Enhanced `.env.example` and `docker-compose.yml` to include new environment variables for custom proxy settings.
- Updated `CHANGELOG.md` to document new features and improvements related to subscription management.
- Improved WebUI for managing subscriptions and displaying proxy statistics.
- Implemented a background process for refreshing subscriptions and probing disabled proxies for reactivation.
This commit is contained in:
isboyjc
2026-04-04 22:25:54 +08:00
parent 2d118688a5
commit f03c3300b4
23 changed files with 5394 additions and 1488 deletions

View File

@@ -8,18 +8,29 @@ RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -o proxy-pool .
# 下载 sing-box 二进制
ARG SINGBOX_VERSION=1.11.8
RUN ARCH=$(case "$(dpkg --print-architecture)" in amd64) echo "amd64";; arm64) echo "arm64";; *) echo "amd64";; esac) && \
curl -fsSL "https://github.com/SagerNet/sing-box/releases/download/v${SINGBOX_VERSION}/sing-box-${SINGBOX_VERSION}-linux-${ARCH}.tar.gz" \
-o /tmp/sing-box.tar.gz && \
tar -xzf /tmp/sing-box.tar.gz -C /tmp && \
cp /tmp/sing-box-${SINGBOX_VERSION}-linux-${ARCH}/sing-box /app/sing-box && \
chmod +x /app/sing-box && \
rm -rf /tmp/sing-box*
# 运行阶段(使用轻量 debian-slim
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates tzdata && \
ca-certificates tzdata curl && \
rm -rf /var/lib/apt/lists/*
ENV TZ=Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/proxy-pool .
COPY --from=builder /app/sing-box /usr/local/bin/sing-box
EXPOSE 7776 7777 7778
EXPOSE 7776 7777 7778 7779 7780
CMD ["./proxy-pool"]