This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 个人备份使用,该脚本适用与Mihomo Party和 Clash Verge Rev | |
| * Clash Verge Rev 全局扩展脚本(懒人配置)/ Mihomo Party 覆写脚本 | |
| * | |
| * V6: Applied modern DNS and performance optimizations. | |
| * - Replaced old DNS structure with a robust nameserver/fallback model to prevent leaks. | |
| * - Enabled DNS over QUIC (prefer-h3) for faster lookups. | |
| * - Removed default-nameserver to eliminate startup leaks. | |
| * - Added experimental tcp-concurrent for latency reduction. | |
| * V5: Added proxy node preprocessing to rename nodes conflicting with group names. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .clang-format | |
| BasedOnStyle: LLVM | |
| # —— 缩进用 Tab,对齐用空格(更稳妥)—— | |
| UseTab: ForIndentation # 缩进使用 Tab,水平对齐仍用空格 | |
| TabWidth: 4 # 一个 Tab 等于 4 列 | |
| IndentWidth: 4 # 每一级缩进 = 1 个 Tab(= TabWidth) | |
| # —— 紧凑度/可读性:更像竞赛模板 —— | |
| ColumnLimit: 0 # 不自动换行(模板/长宏更安全) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Deno single-file gateway that converts a "markdown-image via /v1(chat|)completions" upstream | |
| // into an OpenAI-compatible /v1/images/generations (b64_json) response. | |
| // | |
| // ✅ Simplified for "prompt-only" inputs: always converts `prompt` to `messages` for chat endpoints. | |
| // ✅ URL passing: POST http://localhost:8787/?address=https://upstream.example/v1/chat/completions$/v1/images/generations | |
| // ✅ Works even if real upstream path is nested in query: ?address=https://rev-proxy/?address=https://api.example/v1/chat/completions | |
| // ✅ Forwards Authorization, parses markdown URLs, downloads images, returns base64 | |
| // ✅ Zero deps; uses btoa for base64 | |
| // ✅ Extremely detailed debugging with structured logs (DEBUG=1 by default) |
OlderNewer