popek298's picture
Initialize Dockerfile
3436988 verified
Raw History Blame Contribute Delete
1.14 kB
FROM node:18-slim
WORKDIR /app
RUN apt-get update && apt-get install -y wget nginx && rm -rf /var/lib/apt/lists/*
RUN npm init -y && npm install ws
# 下载核心引擎
RUN wget -q -O core_engine.js https://raw.githubusercontent.com/yonggekkk/sb-nodejs/main/app.js
# 创建伪装前端 HTML
RUN mkdir -p /var/www/html && echo '<h1>Multimodal Data Processor v2.0</h1><p>Status: Active</p><p>Worker ID: 6c06ew</p>' > /var/www/html/index.html
# Nginx 配置:根目录伪装,关键路径转发到 3000 端口
RUN echo 'server { listen 7860; location / { root /var/www/html; index index.html; } location /rsrwakau/v1/stream { proxy_redirect off; proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; } }' > /etc/nginx/conf.d/vless.conf
# 移除默认配置并启动
RUN rm /etc/nginx/sites-enabled/default
RUN echo 'nginx && UUID=$SESSION_ID PORT=3000 node core_engine.js' > start.sh
RUN chmod +x start.sh
EXPOSE 7860
CMD ["sh", "start.sh"]