feat: add network module and service for TCP latency measurement and proxy performance

This commit is contained in:
2026-03-14 17:04:53 +03:00
parent 638940c694
commit 51d26a4c1b
30 changed files with 7992 additions and 1188 deletions

View File

@@ -2,7 +2,7 @@ FROM alpine:3.20
ARG SINGBOX_VER=1.12.13
# Устанавливаем зависимости, включая dos2unix для исправления скриптов
RUN apk add --no-cache curl ca-certificates tar jq bash coreutils netcat-openbsd python3 dos2unix && update-ca-certificates
RUN apk add --no-cache curl ca-certificates tar jq bash coreutils netcat-openbsd nodejs npm dos2unix && update-ca-certificates
# Автоматическое определение архитектуры и установка sing-box
RUN ARCH=$(uname -m) && \
@@ -18,6 +18,11 @@ RUN ARCH=$(uname -m) && \
COPY --chown=suser:suser docker/entrypoint.sh /app/
COPY --chown=suser:suser web/ /app/web/
# Собираем NestJS бэкенд
WORKDIR /app/web/api
RUN npm ci && npm run build && npm prune --omit=dev
WORKDIR /app
# Исправляем окончания строк (важно для Windows пользователей) и даем права на запуск
RUN dos2unix /app/*.sh && chmod +x /app/entrypoint.sh

View File

@@ -41,7 +41,7 @@ start_singbox
# Start Web UI Server with configurable port
echo "$(date): Starting Web UI on port $PORT..."
PORT=$PORT PROXY_PORT=$PROXY_PORT python3 /app/web/server.py &
PORT=$PORT PROXY_PORT=$PROXY_PORT node /app/web/api/dist/main.js &
WEBUI_PID=$!
# HTTP Control Server (Simple Netcat loop)