ProxyLLM 是一款本地 Electron 应用,通过捕获浏览器会话把多种 LLM 网站的能力统一为 OpenAI 兼容 API。
GitHub: https://github.com/zhalice2011/ProxyLLM
linux/amd64 (x86_64)linux/arm64 (ARM64/Apple Silicon)docker run -d --name proxyllm \
-p 8000:8000 \
-p 8080:8080 \
--security-opt seccomp:unconfined \
--shm-size=2gb \
c21xdx/proxyllm:latest
services:
proxyllm:
image: c21xdx/proxyllm:latest
container_name: proxyllm
ports:
- "8000:8000" # noVNC
- "8080:8080" # API
volumes:
- ./config:/app/config
- proxyllm-data:/app/data
- proxyllm-logs:/app/logs
security_opt:
- seccomp:unconfined
shm_size: '2gb'
restart: unless-stopped
volumes:
proxyllm-data:
proxyllm-logs:
| 端口 | 服务 |
|---|---|
| 8000 | noVNC 远程桌面 |
| 8080 | OpenAI 兼容 API |
http://localhost:8000/vnc.html# 健康检查
curl http://localhost:8080/health
# 获取模型列表
curl http://localhost:8080/v1/models
# Chat Completion
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"your-model","messages":[{"role":"user","content":"Hello"}]}'
创建 config/rules.json:
{
"apiServerPort": 8080,
"apiServerHost": "0.0.0.0",
"requireApiKey": false,
"apiKeys": [],
"modelAliases": {},
"defaultTargetUrl": "https://example.com"
}
重要: apiServerHost 必须设为 "0.0.0.0" 才能从容器外访问 API。
FROM node:22-bookworm
RUN apt-get update && apt-get install -y \
xvfb \
x11vnc \
fluxbox \
websockify \
libgtk-3-0 \
libnotify4 \
libnss3 \
libxss1 \
libxtst6 \
xdg-utils \
libatspi2.0-0 \
libdrm2 \
libgbm1 \
libasound2 \
fonts-noto-cjk \
dbus-x11 \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 https://github.com/novnc/noVNC.git /usr/share/novnc \
&& ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html
WORKDIR /app
COPY package*.json ./
COPY renderer/package*.json ./renderer/
RUN npm install && npm --prefix renderer install
COPY . .
RUN npm --prefix renderer run build && npm run build
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
EXPOSE 8000 8080
ENV DISPLAY=:99
ENTRYPOINT ["/docker-entrypoint.sh"]
#!/bin/bash
set -e
export DISPLAY=:99
rm -f /tmp/.X99-lock
Xvfb :99 -screen 0 1280x800x24 &
sleep 2
fluxbox &
sleep 1
x11vnc -display :99 -forever -nopw -listen 0.0.0.0 -rfbport 5900 &
sleep 1
websockify --web=/usr/share/novnc/ 0.0.0.0:8000 localhost:5900 &
sleep 1
cd /app
exec npx electron . --no-sandbox
# 克隆项目
git clone https://github.com/zhalice2011/ProxyLLM.git
cd ProxyLLM
# 创建 Dockerfile 和 docker-entrypoint.sh (见上方)
# 单架构构建
docker build -t proxyllm .
# 多架构构建并推送
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 \
-t your-username/proxyllm:latest \
--push .
MIT
Content type
Image
Digest
sha256:8fbe456ac…
Size
1.1 GB
Last updated
8 months ago
docker pull c21xdx/proxyllm