From 1b118cad9d078ef9445b109ee4241444e6baa2ee Mon Sep 17 00:00:00 2001 From: iBenzene Date: Fri, 23 Jan 2026 22:06:02 +0800 Subject: [PATCH 01/11] refactor(ui): redesign user interface and improve styles --- README.md | 24 +- README_EN.md | 24 +- main.js | 3 +- scripts/auth/saveAuth.js | 3 +- scripts/auth/setupAuth.js | 3 +- scripts/client/build.js | 21 +- src/auth/AuthSource.js | 3 +- src/auth/AuthSwitcher.js | 3 +- src/auth/CreateAuth.js | 3 +- src/core/BrowserManager.js | 3 +- src/core/ConnectionRegistry.js | 3 +- src/core/FormatConverter.js | 3 +- src/core/ProxyServerSystem.js | 3 +- src/core/RequestHandler.js | 3 +- src/routes/AuthRoutes.js | 3 +- src/routes/StatusRoutes.js | 3 +- src/routes/WebRoutes.js | 3 +- src/utils/ConfigLoader.js | 3 +- src/utils/LoggingService.js | 3 +- src/utils/MessageQueue.js | 3 +- src/utils/VersionChecker.js | 2 +- ui/app/App.vue | 3 +- ui/app/index.js | 3 +- ui/app/pages/AuthPage.vue | 3 +- ui/app/pages/LoginPage.vue | 3 +- ui/app/pages/NotFound.vue | 3 +- ui/app/pages/StatusPage.vue | 1638 ++++++++++++++++++++------------ ui/app/router/index.js | 3 +- ui/app/styles/global.less | 3 +- ui/app/styles/variables.less | 3 +- ui/app/utils/i18n.js | 3 +- ui/locales/en.json | 17 +- ui/locales/zh.json | 17 +- vite.config.js | 3 +- 34 files changed, 1126 insertions(+), 698 deletions(-) diff --git a/README.md b/README.md index 8cc3beb..c6ad0f6 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,23 @@ sudo docker compose down 本项目基于 [**ais2api**](https://github.com/Ellinav/ais2api)(作者:[**Ellinav**](https://github.com/Ellinav))分支开发,并完全沿用上游项目所采用的 CC BY-NC 4.0 许可证,其使用、分发与修改行为均需遵守原有许可证的全部条款,完整许可的内容请参见 [LICENSE](LICENSE) 文件。 -### ©️ 版权 / 署名 - -- 原始作品 Copyright © [Ellinav](https://github.com/Ellinav) -- 修改与新增部分 Copyright © 2024 [iBenzene](https://github.com/iBenzene)、[bbbugg](https://github.com/bbbugg)、[挈挈](https://github.com/ljh156705)及其他贡献者 +## 🤝 贡献者 + + + Ellinav + + + iBenzene + + + bbbugg + + + ljh156705 + + + MasakiMu319 + + + Make-magic + diff --git a/README_EN.md b/README_EN.md index d780bff..f2b4595 100644 --- a/README_EN.md +++ b/README_EN.md @@ -248,7 +248,23 @@ Edit `configs/models.json` to customize available models and their settings. This project is a fork of [**ais2api**](https://github.com/Ellinav/ais2api) by [**Ellinav**](https://github.com/Ellinav), and fully adopts the CC BY-NC 4.0 license used by the upstream project. All usage, distribution, and modification activities must comply with all terms of the original license. See the full license text in [LICENSE](LICENSE). -### ©️ Copyright / Attribution - -- Original work Copyright © [Ellinav](https://github.com/Ellinav) -- Modifications and additions Copyright © 2024 [iBenzene](https://github.com/iBenzene)、[bbbugg](https://github.com/bbbugg)、[挈挈](https://github.com/ljh156705) and contributors +## 🤝 Contributors + + + Ellinav + + + iBenzene + + + bbbugg + + + ljh156705 + + + MasakiMu319 + + + Make-magic + diff --git a/main.js b/main.js index 1962467..169fac1 100644 --- a/main.js +++ b/main.js @@ -2,8 +2,7 @@ * File: main.js * Description: Main entry file that initializes and starts the AIStudio To API proxy server system * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ // Load environment variables based on NODE_ENV diff --git a/scripts/auth/saveAuth.js b/scripts/auth/saveAuth.js index 746a84e..cd57302 100644 --- a/scripts/auth/saveAuth.js +++ b/scripts/auth/saveAuth.js @@ -2,8 +2,7 @@ * File: scripts/auth/saveAuth.js * Description: Automated script to launch browser, extract authentication state from Google AI Studio, and save to config files * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const { firefox } = require("playwright"); diff --git a/scripts/auth/setupAuth.js b/scripts/auth/setupAuth.js index 9b3e470..d596c86 100644 --- a/scripts/auth/setupAuth.js +++ b/scripts/auth/setupAuth.js @@ -2,8 +2,7 @@ * File: scripts/auth/setupAuth.js * Description: Cross-platform auth setup helper. Installs dependencies, downloads Camoufox, and runs saveAuth.js. * - * Maintainers: iBenzene, bbbugg, MasakiMu319 - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg, MasakiMu319 */ const { spawnSync } = require("child_process"); diff --git a/scripts/client/build.js b/scripts/client/build.js index b24d0e7..faf7d8d 100644 --- a/scripts/client/build.js +++ b/scripts/client/build.js @@ -1,6 +1,6 @@ /** * File: scripts/client/build.js - * Description: Client-side browser script (圈内人称「build 反代」) that runs in the headless browser to proxy API requests through WebSocket + * Description: Client-side browser script that runs in the headless browser to proxy API requests through WebSocket * * Author: Ellinav */ @@ -399,12 +399,6 @@ class RequestProcessor { } } - // adapt gemini 3 pro preview - // if raise `400 INVALID_ARGUMENT`, try to delete `thinkingLevel` - // if (bodyObj.generationConfig?.thinkingConfig?.thinkingLevel) { - // delete bodyObj.generationConfig.thinkingConfig.thinkingLevel; - // } - // upper case `thinkingLevel` if (bodyObj.generationConfig?.thinkingConfig?.thinkingLevel) { bodyObj.generationConfig.thinkingConfig.thinkingLevel = String( @@ -426,19 +420,6 @@ class RequestProcessor { } } - // if raise `400 INVALID_ARGUMENT`, try to delete `thoughtSignature` - // if (Array.isArray(bodyObj.contents)) { - // bodyObj.contents.forEach(msg => { - // if (Array.isArray(msg.parts)) { - // msg.parts.forEach(part => { - // if (part.thoughtSignature) { - // delete part.thoughtSignature; - // } - // }); - // } - // }); - // } - config.body = JSON.stringify(bodyObj); } catch (e) { Logger.output("Error occurred while processing request body:", e.message); diff --git a/src/auth/AuthSource.js b/src/auth/AuthSource.js index 2dd515d..f2ab9ee 100644 --- a/src/auth/AuthSource.js +++ b/src/auth/AuthSource.js @@ -2,8 +2,7 @@ * File: src/auth/AuthSource.js * Description: Authentication source manager that loads and validates authentication data from config files * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const fs = require("fs"); diff --git a/src/auth/AuthSwitcher.js b/src/auth/AuthSwitcher.js index 4c9e687..e4ba8d7 100644 --- a/src/auth/AuthSwitcher.js +++ b/src/auth/AuthSwitcher.js @@ -2,8 +2,7 @@ * File: src/auth/AuthSwitcher.js * Description: Authentication switcher that handles account rotation logic, failure tracking, and usage-based switching * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ /** diff --git a/src/auth/CreateAuth.js b/src/auth/CreateAuth.js index 6a0e7ce..1cf2a4e 100644 --- a/src/auth/CreateAuth.js +++ b/src/auth/CreateAuth.js @@ -2,8 +2,7 @@ * File: src/auth/CreateAuth.js * Description: Authentication creation handler for VNC-based auth generation * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const fs = require("fs"); diff --git a/src/core/BrowserManager.js b/src/core/BrowserManager.js index 25029b5..7bdaf4e 100644 --- a/src/core/BrowserManager.js +++ b/src/core/BrowserManager.js @@ -2,8 +2,7 @@ * File: src/core/BrowserManager.js * Description: Browser manager for launching and controlling headless Firefox instances with authentication contexts * - * Maintainers: iBenzene, bbbugg, 挈挈 - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg, 挈挈 */ const fs = require("fs"); diff --git a/src/core/ConnectionRegistry.js b/src/core/ConnectionRegistry.js index 5c0f3db..a8bcd6c 100644 --- a/src/core/ConnectionRegistry.js +++ b/src/core/ConnectionRegistry.js @@ -2,8 +2,7 @@ * File: src/core/ConnectionRegistry.js * Description: Connection registry that manages WebSocket connections and routes messages to appropriate message queues * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const { EventEmitter } = require("events"); diff --git a/src/core/FormatConverter.js b/src/core/FormatConverter.js index 343113b..610b0be 100644 --- a/src/core/FormatConverter.js +++ b/src/core/FormatConverter.js @@ -2,8 +2,7 @@ * File: src/core/FormatConverter.js * Description: Format converter that translates between OpenAI and Google Gemini API request/response formats * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const axios = require("axios"); diff --git a/src/core/ProxyServerSystem.js b/src/core/ProxyServerSystem.js index e42411d..0ba8f3f 100644 --- a/src/core/ProxyServerSystem.js +++ b/src/core/ProxyServerSystem.js @@ -2,8 +2,7 @@ * File: src/core/ProxyServerSystem.js * Description: Main proxy server system that orchestrates all components including HTTP/WebSocket servers, authentication, and request handling * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const { EventEmitter } = require("events"); diff --git a/src/core/RequestHandler.js b/src/core/RequestHandler.js index 83b6b94..7bd3822 100644 --- a/src/core/RequestHandler.js +++ b/src/core/RequestHandler.js @@ -2,8 +2,7 @@ * File: src/core/RequestHandler.js * Description: Main request handler that processes API requests, manages retries, and coordinates between authentication and format conversion * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ /** diff --git a/src/routes/AuthRoutes.js b/src/routes/AuthRoutes.js index a331746..8d6a72b 100644 --- a/src/routes/AuthRoutes.js +++ b/src/routes/AuthRoutes.js @@ -2,8 +2,7 @@ * File: src/routes/AuthRoutes.js * Description: Authentication routes for login and logout functionality * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const CreateAuth = require("../auth/CreateAuth"); diff --git a/src/routes/StatusRoutes.js b/src/routes/StatusRoutes.js index cb7fd3a..65430c9 100644 --- a/src/routes/StatusRoutes.js +++ b/src/routes/StatusRoutes.js @@ -2,8 +2,7 @@ * File: src/routes/StatusRoutes.js * Description: Status and system management routes * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const fs = require("fs"); diff --git a/src/routes/WebRoutes.js b/src/routes/WebRoutes.js index ff78760..6906405 100644 --- a/src/routes/WebRoutes.js +++ b/src/routes/WebRoutes.js @@ -2,8 +2,7 @@ * File: src/routes/WebRoutes.js * Description: Web routes coordinator - delegates to specialized route handlers * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const session = require("express-session"); diff --git a/src/utils/ConfigLoader.js b/src/utils/ConfigLoader.js index 719404d..2247d8c 100644 --- a/src/utils/ConfigLoader.js +++ b/src/utils/ConfigLoader.js @@ -2,8 +2,7 @@ * File: src/utils/ConfigLoader.js * Description: Configuration loader that reads and validates system settings from environment variables * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const fs = require("fs"); diff --git a/src/utils/LoggingService.js b/src/utils/LoggingService.js index 3478d27..f06527a 100644 --- a/src/utils/LoggingService.js +++ b/src/utils/LoggingService.js @@ -2,8 +2,7 @@ * File: src/utils/LoggingService.js * Description: Logging service that formats, buffers, and outputs system logs with different severity levels * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ /** diff --git a/src/utils/MessageQueue.js b/src/utils/MessageQueue.js index c6edbdf..5a695a5 100644 --- a/src/utils/MessageQueue.js +++ b/src/utils/MessageQueue.js @@ -2,8 +2,7 @@ * File: src/utils/MessageQueue.js * Description: Asynchronous message queue for managing request/response communication between server and browser client * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg */ const { EventEmitter } = require("events"); diff --git a/src/utils/VersionChecker.js b/src/utils/VersionChecker.js index 7ac672e..32fcc3b 100644 --- a/src/utils/VersionChecker.js +++ b/src/utils/VersionChecker.js @@ -2,7 +2,7 @@ * File: src/utils/VersionChecker.js * Description: Checks for new versions by querying GitHub Tags API * - * Maintainers: iBenzene, bbbugg + * Author: Ellinav, iBenzene, bbbugg */ const axios = require("axios"); diff --git a/ui/app/App.vue b/ui/app/App.vue index a6f79d8..8ca7e6b 100644 --- a/ui/app/App.vue +++ b/ui/app/App.vue @@ -2,8 +2,7 @@ * File: ui/app/App.vue * Description: Root Vue component that serves as the main entry point for the application router * - * Maintainers: iBenzene, bbbugg - * Original Author: Ellinav + * Author: Ellinav, iBenzene, bbbugg -->