diff --git a/.gitignore b/.gitignore index fabb175..c7c4d52 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ configs/auth/ # Temporary files tmp/ ui/dist/ +*.css +test/ diff --git a/README.md b/README.md index 8cc3beb..ac14a8d 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,8 @@ 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)及其他贡献者 +[![Contributors](https://contrib.rocks/image?repo=iBUHub/AIStudioToAPI)](https://github.com/iBUHub/AIStudioToAPI/graphs/contributors) + +感谢所有为本项目付出汗水与智慧的开发者。 diff --git a/README_EN.md b/README_EN.md index d780bff..feedbd4 100644 --- a/README_EN.md +++ b/README_EN.md @@ -248,7 +248,8 @@ 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 +## 🤝 Contributors -- 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](https://contrib.rocks/image?repo=iBUHub/AIStudioToAPI)](https://github.com/iBUHub/AIStudioToAPI/graphs/contributors) + +We would like to thank all developers who have contributed their time, effort, and wisdom to this project. 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..94567df 100644 --- a/scripts/client/build.js +++ b/scripts/client/build.js @@ -1,8 +1,8 @@ /** * 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 + * Author: Ellinav, iBenzene, bbbugg */ /* eslint-env browser */ 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..9b7343c 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"); @@ -255,7 +254,7 @@ class StatusRoutes { const { authSource } = this.serverSystem; - if (!authSource.availableIndices.includes(targetIndex)) { + if (!authSource.initialIndices.includes(targetIndex)) { return res.status(404).json({ index: targetIndex, message: "errorAccountNotFound" }); } 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 -->