From 10dbe60671ff8881d9d0cbe0f8eb318d74728b57 Mon Sep 17 00:00:00 2001 From: oomeow Date: Thu, 30 Jul 2026 22:49:38 +0800 Subject: [PATCH] fix(proxy): fix inline providers being filtered after Mihomo API change (#7640) * feat(proxy): add Inline vehicle type support * docs: add fix for Mihomo API proxy-provider filtering to changelog --- Changelog.md | 1 + src-tauri/src/core/proxy_view.rs | 3 +++ src/types/proxy-view.ts | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 116e57c1a..e456851d7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ ### 🐞 修复问题 修复 macOS 多显示器切换时托盘速率样式不同步 +修复 Mihomo API 变更后 inline proxy-provider 被错误过滤的问题,解决节点显示 Unknown 及延迟测试失败的问题
✨ 新增功能 diff --git a/src-tauri/src/core/proxy_view.rs b/src-tauri/src/core/proxy_view.rs index d0cf989aa..588f2b699 100644 --- a/src-tauri/src/core/proxy_view.rs +++ b/src-tauri/src/core/proxy_view.rs @@ -155,6 +155,8 @@ pub enum ProxyProviderVehicleType { Http, #[serde(rename = "File")] File, + #[serde(rename = "Inline")] + Inline, } #[derive(Debug, PartialEq, Eq, Serialize)] @@ -307,6 +309,7 @@ fn build_provider_records( let vehicle_type = match vehicle_type { VehicleType::HTTP => ProxyProviderVehicleType::Http, VehicleType::File => ProxyProviderVehicleType::File, + VehicleType::Inline => ProxyProviderVehicleType::Inline, _ => continue, }; let provider_index = views.len(); diff --git a/src/types/proxy-view.ts b/src/types/proxy-view.ts index 1425c465a..3f4522f52 100644 --- a/src/types/proxy-view.ts +++ b/src/types/proxy-view.ts @@ -67,7 +67,7 @@ export type ProxyMemberRef = interface ProxyProviderView { name: string - vehicleType: 'HTTP' | 'File' + vehicleType: 'HTTP' | 'File' | 'Inline' updatedAt?: string subscriptionInfo?: ProxySubscriptionInfo proxyRecordIds: string[]