docs: 更新文档

This commit is contained in:
foxhui
2025-12-20 20:30:27 +08:00
Unverified
parent 28cac21641
commit 9d3f762399
73 changed files with 1130 additions and 30 deletions
+11 -16
View File
@@ -53,39 +53,34 @@ npm start -- -xvfb -vnc
## Docker 部署
::: warning 首次运行说明
首次运行需通过 VNC 客户端连接 `localhost:5900` 完成网页登录验证。
::: warning **特别说明**
登录相关操作可以在 WebUI 的虚拟显示器板块进行,也可通过 RealVNC 等工具连接(需添加映射 VNC 端口,默认非被占用的情况下为 5900)
:::
### Docker CLI
```bash
docker run -d --name webai2api \
-p 3000:3000 -p 5900:5900 \
docker run -d --name webai-2api \
-p 3000:3000 \
-v "$(pwd)/data:/app/data" \
-v "$(pwd)/config.yaml:/app/config.yaml" \
-e LOGIN_MODE=true \
--shm-size=2gb \
foxhui/lmarena-imagen-automator:latest
foxhui/webai-2api:latest
```
### Docker Compose
```yaml
version: '3.8'
services:
webai2api:
image: foxhui/lmarena-imagen-automator:latest
webai-2api:
image: foxhui/webai-2api:latest
container_name: webai-2api
restart: unless-stopped
ports:
- "3000:3000"
- "5900:5900"
volumes:
- ./data:/app/data
- ./config.yaml:/app/config.yaml
environment:
- LOGIN_MODE=true
shm_size: 2gb
restart: unless-stopped
shm_size: '2gb'
init: true
```
启动服务:
+9 -8
View File
@@ -6,6 +6,8 @@
### 启动登录模式
登录模式会强制关闭无头模式
```bash
# 启动第一个 Worker 进行登录
npm start -- -login
@@ -27,6 +29,7 @@ npm start -- -xvfb -vnc
## 初始化步骤
1. **登录账号**
- Linux 用户使用 `npm start -- -xvfb -vnc` 启动程序,然后使用 WebUI 或者第三方工具连接 VNC
- 在打开的浏览器中登录相应平台的账号
- 例如:Google 账号用于 GeminiGitHub 账号用于 LMArena
@@ -39,16 +42,14 @@ npm start -- -xvfb -vnc
- 确认可以正常发送消息和接收回复
- 关闭浏览器或按 `Ctrl+C` 退出登录模式
## 切换到标准模式
初始化完成后,使用标准命令启动服务:
```bash
npm start
```
::: tip 运行建议
为降低风控风险,**强烈建议长期保持非无头模式运行**。
- 初始化完成后可使用无头模式运行,为降低风控风险,**强烈建议长期保持非无头模式运行**。
- **WebUI 和 VNC 传输过程均未加密,若在公网环境运行请走 SSH 隧道或者使用 Caddy/Nginx 为 WebUI 添加 HTTPS 连接**
```bash
# SSH隧道方法:在本地终端运行,将服务器 5900 端口映射到本地
ssh -L 5900:127.0.0.1:5900 root@服务器IP
```
:::
## 多 Worker 登录
+18
View File
@@ -0,0 +1,18 @@
# WebAI2API
![Image](https://github.com/user-attachments/assets/296a518e-c42b-4e39-8ff6-9b4381ed4f6e)
## 📝 项目简介
**WebAI2API** 是一个基于 **Camoufox (Playwright)** 的网页版 AI 服务转通用 API 的工具。通过模拟人类操作与 LMArena、Gemini 等网站交互,提供兼容 **OpenAI 格式** 的接口服务,同时支持 **多窗口并发****多账号管理**(浏览器实例数据隔离)。
### 📋 当前支持列表
| 网站名称 | 文本支持 | 图片支持 |
| :--- | :---: | :---: |
| [**LMArena**](https://lmarena.ai/) | ✅ | ✅ |
| [**Gemini Enterprise Business**](https://business.gemini.google/) | ✅ | ✅ |
| [**Nano Banana Free**](https://nanobananafree.ai/) | ❌ | ✅ |
| [**zAI**](https://zai.is/) | ❌ | ✅ |
| [**Google Gemini**](https://gemini.google.com/) | ❌ | ✅ |
> 未来可能会支持更多网站...