Commit Graph
198 Commits
Author SHA1 Message Date
oomeowandTunglies 562828e14d fix: provider proxy delay check (#7456)
* refactor(proxy): support delay testing for provider-based proxies

* style: remove debug console logs

* docs: update changelog

* feat(services): merge provider nodes into records in calcuProxies

---------

Co-authored-by: Tunglies <tunglies.dev@outlook.com>
2026-07-11 05:24:41 +00:00
wonfen 979defc070 fix: prevent rules editor from clearing custom rules before load 2026-07-09 13:46:24 +08:00
wonfen 49ea0cd5df fix(config): remove redundant write that clobbered global hotkey setting 2026-07-05 01:10:56 +08:00
wonfen 4fa2f9a329 fix(macos): recover webview and stop ws leak after render process terminate 2026-07-04 09:39:44 +08:00
oomeow dd3ef698f5 feat: sticky groups (#7195)
* feat(proxy): implement sticky virtual list and group tools

- Add new StickyVirtualList component for better performance with sticky headers
- Create ProxyGroupTools component for filtering, sorting and testing proxy groups
- Enhance proxy groups with improved scrolling and group toggle functionality
- Integrate search box with click event handling
- Remove redundant ProxyHead component usage

* style: remove unused import and update TypeScript types

* refactor: convert function component to forwardRef component to fix biome lint error

* feat(proxy): extract proxy chain UI to separate component

* refactor: remove custom throttle implementation and simplify dependencies

* feat(proxy): improve proxy groups UI and scrolling behavior

- Add initialOffset prop to StickyVirtualList for better scroll position restoration
- Refactor ProxyGroups component to separate chain and normal modes
- Implement scroll position persistence for both chain and normal modes
- Add sticky shadow effect for expanded proxy groups
- Remove unnecessary ScrollTopButton component
- Optimize scroll event handling with throttling
- Improve code organization with custom hooks and component separation

* docs(proxy-groups): Add TODO comment for initial render position issue

* feat(proxy): improve scroll position handling and UI display

* refactor(proxy): simplify scroll handling logic and remove unused code

* fix(sticky-virtual-list): remove duplicate styles and add padding

* refactor(proxy): rename scroll offset variables and functions for clarity

* refactor: remove unnecessary refs and simplify onClick handlers

* fix(proxy-groups): handle initial scroll position state

* feat(zed): add biome formatter configuration

* refactor(proxy): remove unused headState import and type annotations

* style(proxy): improve type imports and conditional rendering

* .

* feat(proxy): add ProxyHead component to render in global mode

* chore: ignore .zed directory

* docs: update changelog
2026-07-02 13:22:40 +00:00
oomeow c2ddb5c111 refactor: activate selected proxies (#7285)
* feat(profiles): add automatic node activation after profile switch

* refactor(use-profiles): simplify patchCurrent logic by always mutating profiles

* refactor(use-profiles): remove unused activateSelected function and related imports

* refactor: rename worker handle to activate selected task

* fix: clippy

* refactor(config): replace log statements with structured logging

* refactor(config): fix incorrect retry logic in profile activation

* feat(profiles): update proxy cache when switching profiles

* docs: update changelog with bug fixes and logic improvements

* refactor(profiles): remove unused imports and redundant cache update
2026-07-01 12:47:03 +00:00
wonfen deae6442a7 fix(backup): make WebDAV directory creation idempotent 2026-06-29 12:09:55 +08:00
wonfen 3b52fceca1 fix: DNS overrides could not be edited in advanced mode 2026-06-29 11:31:57 +08:00
wonfen 294955cb8c feat: add fake-ip-range6 2026-06-28 13:08:55 +08:00
wonfen 86072e599d chore: update change log 2026-06-28 07:48:47 +08:00
wonfen 1112f0730d fix(core): improve service startup and cleanup reliability
Wait longer for slow Windows service startup, then hand off from sidecar
to service when it becomes ready. Retry service core startup during the
handoff window, and clean up root-owned macOS service core/IPC leftovers
before uninstalling the service.
2026-06-28 04:34:01 +08:00
wonfen 7e233efd10 feat: add reset button to Global script 2026-06-18 15:13:38 +08:00
Tunglies f763fcb244 fix: fallback clash mode from runtime config 2026-06-13 14:47:29 +08:00
sijie-ZandTunglies b79e3a0569 fix: replace toSorted with slice().sort() for macOS 12 compatibility (#7247)
* fix: replace toSorted with slice().sort() for macOS 12 compatibility

Array.prototype.toSorted() is ES2023 and not supported in WebKit < 16
(bundled with macOS 12 Monterey). Using slice().sort() is functionally
identical and works on all platforms.

Fixes #7216

* chore: update Changelog

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-06-09 05:11:58 +00:00
Tunglies 45afb1c15a fix(frontend): reduce long-running memory pressure in connections (#7227)
* fix(connections): stabilize table memory usage

Render the connections table and list from stable row view models, and replace the TanStack row/cell instantiation path with a lightweight virtualized table body.

The leak was isolated to the frontend table render path: websocket data without the table stayed flat, while the normal table path kept producing large per-snapshot object graphs under active/closed churn.

Introduced-by: bf06cbc87d (introduced the TanStack table path)

Related-hot-path: 068678135 (made default ordering/filtering hot enough for long-running /connections sessions to amplify retained heap/RSS)

Related-retention-path: 7fc238c27b (moved Home stats to the full connection websocket subscription, so Home could keep connection snapshots alive for totals/count)

Keep UI behavior intact: column visibility, column order, resizing, sorting, connection details, the closed-connection cap, and the 500ms refresh cadence remain.

* fix(connections): lazily release connection snapshots

Keep the full active/closed connection snapshot scoped to /connections by using a short React Query gcTime for the full subscription.

Home now subscribes to a lightweight connection summary for totals and active count, so leaving /connections no longer keeps the full active/closed arrays and closed history alive for the dashboard.

Only the selected Active or Closed mode feeds filtering, sorting, row-view derivation, and table/list rendering. Switching modes remounts the row subtree and closes detail/column-manager state without changing the capped closed-history behavior.

* fix(connections): decouple collection from rendering

Move the high-frequency connection websocket path out of React Query and into a module-level external store consumed with useSyncExternalStore.

The store keeps one normalized active snapshot plus the capped closed history, continues collecting across route changes, and only notifies mounted subscribers. Home reads the same store through a lightweight summary snapshot, so leaving /connections no longer renders the table/list while connection history is still preserved.

This replaces the short-gc release behavior that made Active/Closed history disappear after navigating away, and bounds retained data to current active connections plus the closed cap instead of React Query cache objects.

* fix(connections): keep collection store authoritative

Remove the temporary per-subscription gcTime override added for /connections. The connection monitor now owns active/closed retention outside React Query, so route changes should stop rendering without clearing collected history.

This leaves the shared Mihomo websocket hook on its original 30s cache behavior for logs, traffic, and memory while /connections uses the external store introduced in the previous commit.

* perf(connections): coalesce snapshots before parsing

Keep only the latest raw websocket message during the 500ms throttle window and parse it when the store flushes. High-churn connection bursts no longer allocate parsed object graphs for snapshots that will be overwritten before React can observe them.

Also compare incoming metadata through the same normalization used for retained records, so optional undefined fields do not prevent metadata reference reuse.

* perf(connections): trim render allocations

Reuse existing row view objects before formatting derived strings when the retained connection object reference is unchanged. Stable closed-history rows no longer allocate throwaway display strings on every snapshot.

Measure the table scroll viewport on mount and resize instead of assuming a 1200px body, so virtual rendering starts from the real visible row count. Keep table state across Active/Closed switches and share the relative-time cell between table and list rows.

* perf(connections): tighten shared time updates

Refresh the shared relative-time clock before the first subscriber render and switch the listener registry back to a Set, avoiding stale labels after returning to /connections and keeping subscriber churn O(1).

Also sort table time rows by the existing numeric startTime field, drop the redundant row-view startTime equality check, and remove one unnecessary table prop guard.

* perf(connections): skip table-wide row projection

Stop materializing ConnectionRowView objects for the whole filtered dataset in table layout. The page now keeps raw connection records for the table path and only formats visible cells inside the virtualized table body, while list layout keeps the cached row-view path.

This removes the steady 500ms allocation pass that was still walking every filtered connection before table rendering. Detail lookup now reads the current filtered raw record directly, and the table clamps scroll state when switching between datasets of different lengths.

* perf(connections): skip unnecessary filter clone when table not searching

In table mode, avoid creating a filtered copy when search is empty: only apply search/sort work for non-empty query while retaining the same default order behavior. Also replace  parsing in order comparators with numeric startTime to avoid per-tick Date object churn and use SearchBox state to detect an empty search.

In table layout without search input, use upstream connection snapshot directly for rendering instead of cloning/sorting every interval tick. This removes a persistent per-update array allocation path while keeping list-mode sort/search behavior unchanged.

* perf(connections): bound closed merge without full transient arrays

Cap closed-history promotion while iterating previous active set without building a temporary large closed array. This preserves the 500-item limit while avoiding 100k-scale transient allocations when many connections close between snapshots.

* fix(changelog): address memory leak caused by frontend

* perf(connections): cache visible table cell snapshots

Add a bounded row snapshot cache for the virtualized table so repeated paints and optional column sorting reuse stable formatted strings instead of rebuilding host/source/rule/chains/traffic text on every refresh. The cache is capped to avoid retaining large active sets.

Also skip full connection-data snapshot merging when only summary listeners are mounted, keeping Home on the summary-only path without changing Connections history while the page is subscribed.

* chore: update Changelog

* chore: update Changelog
2026-06-07 13:08:15 +08:00
Tunglies fa27d3eae5 Revert "feat(cvd): add device-bound subscription protocol"
This reverts commit 2cb9c13ab6.
2026-06-02 21:02:19 +08:00
wonfen 2cb9c13ab6 feat(cvd): add device-bound subscription protocol 2026-06-02 13:43:54 +08:00
Tunglies dc094033b8 Revert "refactor: remove subscription TLS roots fallback"
This reverts commit 746279fa03.
2026-05-28 02:42:13 +08:00
Li Yangandliyang f916711717 fix(tray): use an app-specific tray id (#6772)
Co-authored-by: liyang <liyang25@pku.edu.cn>
2026-05-26 13:34:39 +00:00
Tunglies 746279fa03 refactor: remove subscription TLS roots fallback 2026-05-26 00:23:55 +08:00
Tunglies e2d14a5ea7 fix: support empty basic auth passwords 2026-05-25 23:12:44 +08:00
Tunglies d75c4cf59e fix: enable gzip subscription responses
docs: update changelog for gzip subscriptions
2026-05-25 22:59:11 +08:00
Tunglies ec9ef0f85e fix: report legacy TLS subscription failures 2026-05-25 22:22:24 +08:00
Tunglies bedcb8a07c fix: update tauri-plugin-mihomo and related dependencies
close #7073
2026-05-21 18:34:47 +08:00
Tunglies c7a989b484 fix(macOS): improve tray speed rendering attributes 2026-05-21 12:41:51 +08:00
AetherWing bdbc617aff fix: disable WebView2 general autofill (#7062) 2026-05-21 04:01:31 +00:00
Tunglies 46fb817fe4 chore:bump version to 2.5.2 2026-05-20 14:27:32 +08:00
Tunglies a00c67e8ae chore: update changelog 2026-05-20 14:23:46 +08:00
wonfen 15de400f2f fix: align backup dialogs with in-app modal behavior 2026-05-20 10:24:11 +08:00
Tunglies 6f36613103 chore: bump version to 2.5.1 2026-05-19 14:01:41 +08:00
Tunglies d95e9ffab9 chore: bump version mihomo to 1.19.25 2026-05-18 22:03:26 +08:00
Tunglies 513b4cf6b2 chore: automate mihomo changelog sync 2026-05-18 21:52:53 +08:00
Tunglies fc2ff69bdb fix(proxy): stabilize proxy group sticky scroll #6982
Close #6982
2026-05-16 02:48:51 +08:00
Tunglies 662dd20be1 fix(linux): show window after page load #7002 2026-05-14 21:52:03 +08:00
Tunglies b7ae54b9f3 fix(wayland): disable webkit dmabuf renderer on legacy wayland versions (<1.23) #6999 (#7000) 2026-05-14 21:11:08 +08:00
mocxda1andmocxda1 d58b054d93 fix(hotkey): parse key 'OS' as 'CMD' instead of keeping 'OS' clash-verge-rev#6899 (#6967)
Co-authored-by: mocxda1 <mocxda1@imashr.com>
2026-05-10 09:07:39 +00:00
Tunglies 178b33beef Release 2.5.0-rc 2026-05-06 16:25:23 +08:00
wonfen db0fee7894 feat: add sticky scroll for proxy groups 2026-05-03 03:55:50 +08:00
wonfen 33d7988ac9 feat: retry subscription downloads with webpki roots on TLS failures 2026-04-27 08:43:30 +08:00
Tunglies 5882722031 chore: update changelog for front-end performance optimizations 2026-04-25 01:38:54 +08:00
wonfen 4d408a8c1a fix: serialize OS state reads with in-progress update_sysproxy 2026-04-22 12:20:26 +08:00
Tunglies 72394eb9b7 feat(ui): add QR code sharing for remote profiles
Add "Share QR Code" context menu item to remote profile cards.
2026-04-19 22:20:17 +08:00
sgt57andTunglies 8c7b5abcb5 fix(tun): restart core when tun mode is toggled to true on linux (#6800)
* fix(tun): restart core when tun mode is toggled to true on linux

* fix(changelog): add note for Linux TUN not taking effect immediately

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-04-15 14:08:17 +08:00
9e5da1a851 feat(tray): 恢复并重构托盘显示速率功能 (#6487)
* feat(tray): 恢复并重构托盘显示速率功能

* docs(changelog): add tray speed feature entry for v2.4.7

* refactor(tray): 将托盘速率显示限制为仅 macOS

* chore(style): 统一托盘速率设置相关代码风格

* refactor(tray): 统一 speed 任务调度并移除循环内配置轮询

* chore(tauri): enable createUpdaterArtifacts for updater support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(tray): refine macOS tray speed formatting and two-line alignment

* refactor(tray): move to utils

* refactor(tray): improve macOS speed display formatting, alignment, and structure

* chore: 降级 Node.js 版本至 21.7.1

* refactor(tray): 优化 macOS 托盘速率流与显示逻辑

* refactor(tray): 将速率任务重构为独立控制器并切换至 /traffic 流

* refactor(tray): 缩短速率宽度

* refactor(tray): 收敛测速流抽象并修正停止清理时序

* docs(changelog): 更新变更日志

* refactor(tray): simplify speed formatting logic and remove redundant functions

* refactor(tray): optimize speed display logic and reduce redundant attribute initialization

* refactor(tray): enhance traffic event parsing and improve stale event handling

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-04-09 14:40:32 +00:00
Tunglies e63e3aa63f chore: update changelog for Mihomo(Meta) kernel upgrade to v1.19.23 2026-04-08 21:30:36 +08:00
wysha-objectandTunglies b7230967b4 feat: show detailed results in hotkey notifications (#6639)
* feat: show detailed results in hotkey notifications

* fix: Japanese locale appears to have a truncated translation key label

* fix: variable naming

* Update documentation to English

* Remove unnecessary mut

* feat: enhance system proxy notifications with toggle state

* chore: update changelog to include new shortcut notification feature

* fix: remove unnecessary quotes from system proxy toggle messages in localization files

* fix: tun mode toggled hotkey notifications

* fix: correct toggle_tun_mode logic to handle current state and errors

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-03-30 17:06:45 +00:00
Tunglies c3aba3fc79 fix(profile): refresh profile data after timer auto-update completes
The profile-update-completed event handler was missing a mutate('getProfiles')
call, causing the "X time ago" display to show stale timestamps after
backend timer auto-updates.
2026-03-28 02:37:59 +08:00
Tunglies c8f737d44e chore!(deps): update sysproxy dependency to version 0.5.3 2026-03-28 01:03:56 +08:00
Tunglies ca8e350694 fix(proxy): resolve system proxy toggle stuck and state desync (#6614) (#6657)
* fix(proxy): resolve system proxy toggle stuck and state desync (#6614)

Backend: replace hand-rolled AtomicBool lock in update_sysproxy() with
tokio::sync::Mutex so concurrent calls wait instead of being silently
dropped, ensuring the latest config is always applied.

Move blocking OS calls (networksetup on macOS) to spawn_blocking so
they no longer stall the tokio worker thread pool.

Frontend: release SwitchRow pendingRef in .finally() so the UI always
re-syncs with the actual OS proxy state, and rollback checked on error.

Closes #6614

* fix(changelog): add note for macOS proxy toggle freeze issue
2026-03-27 15:40:03 +00:00
Tunglies 77fa721119 fix(sysproxy): fully clear PAC when disabling system proxy (#6591) 2026-03-23 08:03:20 +00:00