From e6548a0bc3ffc1c4e8681587d7a9e01c903f7b2a Mon Sep 17 00:00:00 2001 From: Memory <134070804+Memory2314@users.noreply.github.com> Date: Fri, 9 Jan 2026 19:56:36 +0800 Subject: [PATCH 1/3] fix: update sysproxy-rs path in package.json and pnpm-lock.yaml --- package.json | 4 ++-- pnpm-lock.yaml | 29 +++++------------------------ 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 68c4781..d846cc4 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "express": "^5.1.0", "i18next": "^25.6.2", "iconv-lite": "^0.7.1", - "sysproxy-rs": "file:sysproxy-rs", + "sysproxy-rs": "file:src/native/sysproxy", "webdav": "^5.8.0", "ws": "^8.18.3", "yaml": "^2.8.1" @@ -107,5 +107,5 @@ "vite": "^7.2.2", "vite-plugin-monaco-editor": "^1.1.0" }, - "packageManager": "pnpm@10.22.0" + "packageManager": "pnpm@10.27.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f8fcc2..1b750c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: ^0.7.1 version: 0.7.1 sysproxy-rs: - specifier: file:sysproxy-rs - version: file:sysproxy-rs + specifier: file:src/native/sysproxy + version: file:src/native/sysproxy webdav: specifier: ^5.8.0 version: 5.8.0 @@ -1918,67 +1918,56 @@ packages: resolution: {integrity: sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.54.0': resolution: {integrity: sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.54.0': resolution: {integrity: sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.54.0': resolution: {integrity: sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.54.0': resolution: {integrity: sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.54.0': resolution: {integrity: sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.54.0': resolution: {integrity: sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.54.0': resolution: {integrity: sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.54.0': resolution: {integrity: sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.54.0': resolution: {integrity: sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.54.0': resolution: {integrity: sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openharmony-arm64@4.54.0': resolution: {integrity: sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==} @@ -2057,28 +2046,24 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.1.18': resolution: {integrity: sha512-1px92582HkPQlaaCkdRcio71p8bc8i/ap5807tPRDK/uw953cauQBT8c5tVGkOwrHMfc2Yh6UuxaH4vtTjGvHg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.1.18': resolution: {integrity: sha512-v3gyT0ivkfBLoZGF9LyHmts0Isc8jHZyVcbzio6Wpzifg/+5ZJpDiRiUhDLkcr7f/r38SWNe7ucxmGW3j3Kb/g==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.1.18': resolution: {integrity: sha512-bhJ2y2OQNlcRwwgOAGMY0xTFStt4/wyU6pvI6LSuZpRgKQwxTec0/3Scu91O8ir7qCR3AuepQKLU/kX99FouqQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.1.18': resolution: {integrity: sha512-LffYTvPjODiP6PT16oNeUQJzNVyJl1cjIebq/rWWBF+3eDst5JGEFSc5cWxyRCJ0Mxl+KyIkqRxk1XPEs9x8TA==} @@ -3821,28 +3806,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.30.2: resolution: {integrity: sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.30.2: resolution: {integrity: sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.30.2: resolution: {integrity: sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.30.2: resolution: {integrity: sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==} @@ -4850,8 +4831,8 @@ packages: resolution: {integrity: sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==} engines: {node: ^14.18.0 || >=16.0.0} - sysproxy-rs@file:sysproxy-rs: - resolution: {directory: sysproxy-rs, type: directory} + sysproxy-rs@file:src/native/sysproxy: + resolution: {directory: src/native/sysproxy, type: directory} tailwind-merge@3.4.0: resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} @@ -11220,7 +11201,7 @@ snapshots: dependencies: '@pkgr/core': 0.2.9 - sysproxy-rs@file:sysproxy-rs: {} + sysproxy-rs@file:src/native/sysproxy: {} tailwind-merge@3.4.0: {} From 52cefa39d326c674de3fa0205eaab984b4ba920b Mon Sep 17 00:00:00 2001 From: Memory <134070804+Memory2314@users.noreply.github.com> Date: Sat, 10 Jan 2026 14:55:10 +0800 Subject: [PATCH 2/3] feat: add option to hide unavailable proxies in proxy list --- src/renderer/src/locales/en-US.json | 2 ++ src/renderer/src/locales/fa-IR.json | 2 ++ src/renderer/src/locales/ru-RU.json | 2 ++ src/renderer/src/locales/zh-CN.json | 2 ++ src/renderer/src/locales/zh-TW.json | 2 ++ src/renderer/src/pages/proxies.tsx | 54 ++++++++++++++++++++++++++--- src/shared/types.d.ts | 1 + 7 files changed, 60 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/locales/en-US.json b/src/renderer/src/locales/en-US.json index 09203c5..5163c53 100644 --- a/src/renderer/src/locales/en-US.json +++ b/src/renderer/src/locales/en-US.json @@ -342,6 +342,8 @@ "actions.version.title": "App Version", "theme.editor.title": "Edit Theme", "proxies.title": "Proxy Groups & Nodes", + "proxies.hideUnavailable.enabled": "Show Unavailable Proxies", + "proxies.hideUnavailable.disabled": "Hide Unavailable Proxies", "proxies.card.title": "ProxyGrp", "proxies.delay.test": "Test", "proxies.delay.timeout": "Timeout", diff --git a/src/renderer/src/locales/fa-IR.json b/src/renderer/src/locales/fa-IR.json index 279754a..8255cf4 100644 --- a/src/renderer/src/locales/fa-IR.json +++ b/src/renderer/src/locales/fa-IR.json @@ -318,6 +318,8 @@ "actions.version.title": "نسخه برنامه", "theme.editor.title": "ویرایش پوسته", "proxies.title": "گروه‌های پراکسی و گره‌ها", + "proxies.hideUnavailable.enabled": "نمایش گره‌های غیرفعال", + "proxies.hideUnavailable.disabled": "پنهان کردن گره‌های غیرفعال", "proxies.card.title": "گروه‌پراکسی", "proxies.delay.test": "تست", "proxies.delay.timeout": "وقفه", diff --git a/src/renderer/src/locales/ru-RU.json b/src/renderer/src/locales/ru-RU.json index 059223f..f0a4f57 100644 --- a/src/renderer/src/locales/ru-RU.json +++ b/src/renderer/src/locales/ru-RU.json @@ -318,6 +318,8 @@ "actions.version.title": "Версия приложения", "theme.editor.title": "Редактор темы", "proxies.title": "Прокси группы и узлы", + "proxies.hideUnavailable.enabled": "Показать недоступные узлы", + "proxies.hideUnavailable.disabled": "Скрыть недоступные узлы", "proxies.card.title": "Прокси группы", "proxies.delay.test": "Тест", "proxies.delay.timeout": "Таймаут", diff --git a/src/renderer/src/locales/zh-CN.json b/src/renderer/src/locales/zh-CN.json index acd2f45..bb70e6b 100644 --- a/src/renderer/src/locales/zh-CN.json +++ b/src/renderer/src/locales/zh-CN.json @@ -342,6 +342,8 @@ "actions.version.title": "应用版本", "theme.editor.title": "编辑主题", "proxies.title": "代理组与节点", + "proxies.hideUnavailable.enabled": "显示不可用节点", + "proxies.hideUnavailable.disabled": "隐藏不可用节点", "proxies.card.title": "代理组", "proxies.delay.test": "测试", "proxies.delay.timeout": "超时", diff --git a/src/renderer/src/locales/zh-TW.json b/src/renderer/src/locales/zh-TW.json index 1b722de..3185eb8 100644 --- a/src/renderer/src/locales/zh-TW.json +++ b/src/renderer/src/locales/zh-TW.json @@ -342,6 +342,8 @@ "actions.version.title": "應用程式版本", "theme.editor.title": "編輯主題", "proxies.title": "代理組與節點", + "proxies.hideUnavailable.enabled": "顯示不可用節點", + "proxies.hideUnavailable.disabled": "隱藏不可用節點", "proxies.card.title": "代理組", "proxies.delay.test": "測試", "proxies.delay.timeout": "逾時", diff --git a/src/renderer/src/pages/proxies.tsx b/src/renderer/src/pages/proxies.tsx index cfaf644..44c723b 100644 --- a/src/renderer/src/pages/proxies.tsx +++ b/src/renderer/src/pages/proxies.tsx @@ -11,11 +11,11 @@ import { CgDetailsLess, CgDetailsMore } from 'react-icons/cg' import { TbCircleLetterD } from 'react-icons/tb' import { FaLocationCrosshairs } from 'react-icons/fa6' import { RxLetterCaseCapitalize } from 'react-icons/rx' +import { MdVisibilityOff, MdDoubleArrow, MdOutlineSpeed } from 'react-icons/md' import { useEffect, useMemo, useRef, useState, useCallback } from 'react' import { GroupedVirtuoso, GroupedVirtuosoHandle } from 'react-virtuoso' import ProxyItem from '@renderer/components/proxies/proxy-item' import { IoIosArrowBack } from 'react-icons/io' -import { MdDoubleArrow, MdOutlineSpeed } from 'react-icons/md' import { useGroups } from '@renderer/hooks/use-groups' import CollapseInput from '@renderer/components/base/collapse-input' import { includesIgnoreCase } from '@renderer/utils/includes' @@ -160,9 +160,25 @@ const Proxies: React.FC = () => { groups.forEach((group, index) => { if (isOpen[index]) { - const filtered = group.all.filter( - (proxy) => proxy && includesIgnoreCase(proxy.name, searchValue[index]) - ) + const filtered = group.all.filter((proxy) => { + if (!includesIgnoreCase(proxy.name, searchValue[index])) { + return false + } + if (appConfig?.hideUnavailableProxies) { + const isGroup = 'all' in proxy + if (isGroup) { + return true + } + if (!proxy.history || proxy.history.length === 0) { + return true + } + const lastDelay = proxy.history[proxy.history.length - 1].delay + if (lastDelay === 0) { + return false + } + } + return true + }) const sorted = sortProxies(filtered, proxyDisplayOrder) const count = Math.ceil(sorted.length / cols) groupCounts.push(count) @@ -173,7 +189,15 @@ const Proxies: React.FC = () => { } }) return { groupCounts, allProxies } - }, [groups, isOpen, proxyDisplayOrder, cols, searchValue, sortProxies]) + }, [ + groups, + isOpen, + proxyDisplayOrder, + cols, + searchValue, + sortProxies, + appConfig?.hideUnavailableProxies + ]) const onChangeProxy = useCallback( async (group: string, proxy: string): Promise => { @@ -509,6 +533,26 @@ const Proxies: React.FC = () => { title={t('proxies.title')} header={ <> +