From 31c0910919c740e60b38b4bdd35ff81844d3ccce Mon Sep 17 00:00:00 2001 From: Sline Date: Wed, 11 Feb 2026 20:38:44 +0800 Subject: [PATCH] feat: Masque (#6303) --- Cargo.lock | 4 ++-- Changelog.md | 1 + pnpm-lock.yaml | 10 +++++----- src/components/profile/groups-editor-viewer.tsx | 1 + src/types/global.d.ts | 17 +++++++++++++++++ 5 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 482ae9cd0..36facd3b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7612,8 +7612,8 @@ dependencies = [ [[package]] name = "tauri-plugin-mihomo" -version = "0.1.4" -source = "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#250839f40fbc78768c96eb0f2535ebc4adfe8cd3" +version = "0.1.5" +source = "git+https://github.com/clash-verge-rev/tauri-plugin-mihomo#1cc80bc0fbe1245315617f4cecd93710a152325b" dependencies = [ "base64 0.22.1", "bytes", diff --git a/Changelog.md b/Changelog.md index 94a6c215d..24e787ea7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,7 @@ - 支持订阅设置自动延时监测间隔 - 新增流量隧道管理界面,支持可视化添加/删除隧道配置 +- Masque 协议的 GUI 支持 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6d22ec37f..26837260b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -136,7 +136,7 @@ importers: version: 2.4.0(react@19.2.4) tauri-plugin-mihomo-api: specifier: github:clash-verge-rev/tauri-plugin-mihomo#main - version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/250839f40fbc78768c96eb0f2535ebc4adfe8cd3 + version: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1cc80bc0fbe1245315617f4cecd93710a152325b types-pac: specifier: ^1.0.3 version: 1.0.3 @@ -3549,9 +3549,9 @@ packages: resolution: {integrity: sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==} engines: {node: '>=18'} - tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/250839f40fbc78768c96eb0f2535ebc4adfe8cd3: - resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/250839f40fbc78768c96eb0f2535ebc4adfe8cd3} - version: 0.1.2 + tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1cc80bc0fbe1245315617f4cecd93710a152325b: + resolution: {tarball: https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1cc80bc0fbe1245315617f4cecd93710a152325b} + version: 0.1.5 terser@5.46.0: resolution: {integrity: sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==} @@ -7385,7 +7385,7 @@ snapshots: minizlib: 3.1.0 yallist: 5.0.0 - tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/250839f40fbc78768c96eb0f2535ebc4adfe8cd3: + tauri-plugin-mihomo-api@https://codeload.github.com/clash-verge-rev/tauri-plugin-mihomo/tar.gz/1cc80bc0fbe1245315617f4cecd93710a152325b: dependencies: '@tauri-apps/api': 2.10.1 diff --git a/src/components/profile/groups-editor-viewer.tsx b/src/components/profile/groups-editor-viewer.tsx index adcc8ce3b..55caa7feb 100644 --- a/src/components/profile/groups-editor-viewer.tsx +++ b/src/components/profile/groups-editor-viewer.tsx @@ -841,6 +841,7 @@ export const GroupsEditorViewer = (props: Props) => { "WireGuard", "Tuic", "Mieru", + "Masque", "AnyTLS", "Sudoku", "Relay", diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 940fddeb0..de2c77e64 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -595,6 +595,21 @@ interface IProxyMieruConfig extends IProxyBaseConfig { multiplexing?: MieruMultiplexing; "handshake-mode"?: string; } +// masque +interface IProxyMasqueConfig extends IProxyBaseConfig { + name: string; + type: "masque"; + server?: string; + port?: number; + "private-key"?: string; + "public-key"?: string; + ip?: string; + ipv6?: string; + mtu?: number; + udp?: boolean; + "remote-dns-resolve"?: boolean; + dns?: string[]; +} // vless interface IProxyVlessConfig extends IProxyBaseConfig { name: string; @@ -837,6 +852,7 @@ interface IProxyConfig IProxyAnyTLSConfig, IProxyTuicConfig, IProxyMieruConfig, + IProxyMasqueConfig, IProxyVlessConfig, IProxyVmessConfig, IProxyWireguardConfig, @@ -862,6 +878,7 @@ interface IProxyConfig | "wireguard" | "ssh" | "socks5" + | "masque" | "vmess" | "vless" | "mieru"