You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Launch the browser and navigate to AI Studio automatically
72
-
- Log in with your Google account
73
-
- Save authentication credentials to `configs/auth/auth-N.json` (where N is an auto-incremented index starting from 0)
74
-
75
-
**How it works**: The script uses browser automation to capture your AI Studio session cookies and tokens, storing them securely in a JSON file. The authentication file is named with an auto-incremented index (auth-0.json, auth-1.json, etc.) to support multiple accounts. This allows the API to make authenticated requests to AI Studio without requiring interactive login on the server.
5. You can now delete the cloned repository from your Windows machine.
90
-
91
-
#### 🚢 Step 2: Deploy on Server
53
+
#### 🚢 Step 1: Deploy on Server
92
54
93
55
##### 🐋 Option 1: Docker Command
94
56
@@ -149,7 +111,25 @@ Stop the service:
149
111
sudo docker compose down
150
112
```
151
113
152
-
##### 🌐 Step 3 (Optional): Nginx Reverse Proxy
114
+
#### 🔑 Step 2: Account Management
115
+
116
+
After deployment, you need to add Google accounts using one of these methods:
117
+
118
+
**Method 1: VNC-Based Login (Recommended)**
119
+
120
+
- Visit the homepage and click the "Add User" button
121
+
- You'll be redirected to a VNC page with a browser instance
122
+
- Log in to your Google account
123
+
- The account will be automatically saved as `auth-N.json` (N starts from 0)
124
+
125
+
**Method 2: Upload Auth Files (Legacy)**
126
+
127
+
- Run `npm run setup-auth` on a Windows machine to generate auth files
128
+
- Upload `auth-N.json` files (N starts from 0) to the mounted `/path/to/auth` directory
129
+
130
+
> **Note**: Environment variable-based auth injection is no longer supported.
131
+
132
+
#### 🌐 Step 3 (Optional): Nginx Reverse Proxy
153
133
154
134
If you need to access via a domain name or want unified management at the reverse proxy layer (e.g., configure HTTPS, load balancing, etc.), you can use Nginx.
155
135
@@ -194,7 +174,7 @@ This endpoint is forwarded to the official Gemini API format endpoint.
- 将身份验证凭据保存到 `configs/auth/auth-N.json`(其中 N 是从 0 开始自动递增的索引)
74
-
75
-
**工作原理**:脚本使用浏览器自动化技术捕获您的 AI Studio 会话 Cookie 和令牌,并将它们安全地存储在 JSON 文件中。认证文件使用自动递增的索引命名(auth-0.json、auth-1.json 等)以支持多个账号。这样 API 就可以在服务器上进行经过身份验证的请求,而无需交互式登录。
0 commit comments