Commit Graph
4995 Commits
Author SHA1 Message Date
Tunglies f55af3e353 chore: sync frontend cleanup release notes with v2.5.10 2026-11-02 20:17:37 +08:00
Tunglies 91aecd6a12 chore: carry lock safety release notes into v2.5.10 2026-11-02 20:15:54 +08:00
Tunglies 456fcda1fa chore: sync backend cleanup with v2.5.10 development 2026-11-02 20:15:30 +08:00
Tunglies 0f467e87b4 chore: sync frontend cleanup with lock safety 2026-11-02 19:00:09 +08:00
Tunglies b51aae8633 chore: sync lock safety with backend cleanup 2026-11-02 18:56:24 +08:00
Tunglies b59c3d8ac4 chore: merge dev into backend cleanup 2026-11-02 18:55:49 +08:00
github-actions[bot]andgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> a0e57c5962 Dev: v2.5.10 (#8511)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-02 10:47:51 +00:00
Tunglies de15283ef6 fix(release): omit comments when archiving changelog 2026-11-02 18:22:34 +08:00
Tunglies 3f39c2ceca fix(release): filter draft lookup before buffering output 2026-11-02 17:36:27 +08:00
github-actions[bot]andgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 160bb4fe8e Release: v2.5.9 (#8508)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v2.5.9
2026-11-02 17:26:28 +08:00
Tunglies a5b22fa512 fix(webdav): allow clearing saved configuration
Close #8495
2026-11-02 17:24:13 +08:00
Tunglies 07ee0a602a ci(release): unify RC and stable publication through dev 2026-11-02 00:46:06 +08:00
❤是纱雾酱哟~andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 693f2f7ac7 chore(deps): update npm dependencies (#8490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-01 13:08:26 +00:00
nrenvo 633f166e46 ci: trigger rust checks when their configuration changes (#8487) 2026-11-01 12:40:42 +00:00
Tunglies 261178b6d8 fix(updater): render release notes without remark-gfm
Remove GFM extensions that require unsupported regular expressions on older WebKit. Keep native Markdown links, existing release-note styling, and HTML sanitization.

Closes #8079
Closes #8082
2026-11-01 16:35:01 +08:00
Tunglies 0cae907de6 fix(config): wait for pending configuration writes
Serialize Verge patches behind the active configuration writer so toggling the system proxy after TUN does not fail immediately on lock contention.

CLose: #6613, #8481, #8357
2026-11-01 16:13:11 +08:00
nrenvo 94942b9105 fix(backup): publish scheduler settings with send_replace (#8386)
`watch::Sender::send` drops the value when there are no receivers at
startup, leaving the scheduler on the default disabled settings.
`send_replace` stores it for the runner that subscribes right after.
2026-11-01 07:43:42 +00:00
Tunglies 12f842d038 fix(macos): prevent menu bar flicker when closing the window
Keep the application activation policy unchanged when hiding the main window. Lightweight mode still hides the Dock icon.

Closes #8319
2026-11-01 15:33:26 +08:00
Tunglies 8e9832712a doc: clash-verge-rev with mihomo 1.19.33 2026-11-01 14:59:14 +08:00
Tunglies 719f63b57f chore: update tao and wry 2026-11-01 14:30:28 +08:00
heeeex100 ef784e459d docs: document complete development setup (#8457)
* docs: document complete development setup

* docs: follow review feedback on toolchain setup
2026-10-30 15:48:33 +00:00
❤是纱雾酱哟~andCopilot c236f5094e deps: upgrade updater to remove vulnerable zip (#8476)
* fix(deps): update updater to patched zip release

Upgrade tauri-plugin-updater to 2.14.1 and resolve the lockfile without vulnerable zip 4.6.1.

Assisted-by: Copilot SDK

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

* chore(deps): align updater package versions

Upgrade the PNPM updater plugin to match the Rust updater crate at 2.14.1.

Assisted-by: Copilot SDK

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

---------

Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-30 15:04:34 +00:00
❤是纱雾酱哟~andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> bdea31a7ca chore(deps): update dependency pnpm to v12.16.1 (#8475)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-30 15:04:11 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 44d50eb67d chore(deps): update rust crate zip to v9.1.3 [security] (#8464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-30 03:52:54 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> afd9d4b5a0 chore(deps): update rust crate zip to v9.1.2 [security] (#8461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 22:45:12 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 8bf20d199c chore(deps): update rust crate zip to v9.1.1 [security] (#8460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 17:26:16 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> e156ff09ae chore(deps): update rust crate zip to v9.1.0 [security] (#8458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 13:39:08 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> df70146b02 chore(deps): update npm dependencies (#8453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 10:37:26 +00:00
renovate[bot]andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> de22706f3b chore(deps): update rust crate zip to v9.0.5 [security] (#8454)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 08:16:28 +00:00
UddooandTunglies 4b87634da9 fix(macos): restore Big Sur home rendering without Array.at (#8358)
* fix(macos): restore Big Sur home rendering without Array.at

Include the Array.prototype.at polyfill for the declared Safari 14 target so delay and traffic rendering can read their latest records.

Fixes clash-verge-rev/clash-verge-rev#8333

AI assistance: Codex generated the change and ran validation; the implementation model identifier and effort are not exposed. Independent review used GPT-6.1-Sol at medium effort.

* build(web): auto-detect modern polyfills instead of a manual list

modernPolyfills: true lets @vitejs/plugin-legacy derive the polyfill
set from the emitted bundle, dependencies included, so post-Safari-14
API coverage no longer depends on remembering to extend the list
(#8333, and the dependency-side gaps behind #1126 and #6582).

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2026-10-29 08:04:33 +00:00
❤是纱雾酱哟~andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> c9a6cf240d chore(deps): update node.js to v26 (#8450)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-29 04:21:49 +00:00
❤是纱雾酱哟~andrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com> 8128227302 chore(deps): update dependency react-i18next to v17.1.9 (#8448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-28 17:33:10 +00:00
Tunglies 2fd6be642e refactor(services): drop the bespoke retry engine from the query wrapper
The custom onErrorRetry existed only to honor a function-form
retryDelay, which exactly one caller (the app data provider) used for
exponential backoff. Fall back to SWR's built-in error retry and
express that caller's cadence with constant options.
2026-10-28 10:52:18 +08:00
Tunglies 433230aedc refactor(hooks): trim dead surface from proxy selection
Drop the connection-cleanup option nobody ever disabled (behavior now
unconditional), the returned changeProxy no consumer called and the two
one-caller argument adapters; both call sites use the shared select
entry directly.
2026-10-28 10:43:01 +08:00
Tunglies 05475c7bb5 refactor(hooks): drop the write-only error channel and key-rotating refresh
The mihomo ws subscription's next callback accepted an error half that
baseNext silently discarded while traffic, memory and log consumers
kept constructing fallback payloads for it. Refresh minted a fresh
SWR key per call via a localStorage timestamp, abandoning old keys in
the cache forever. Reduce next to its data half and reset the snapshot
under a stable key instead.
2026-10-28 10:31:43 +08:00
Tunglies eb60c21c62 refactor(shared): replace the traffic error boundary with ErrorBoundary
TrafficErrorBoundary maintained a second boundary system beside
BaseErrorBoundary: a report builder that only console.logged constants
in the Tauri webview, an onError that re-logged what componentDidCatch
already logged, and a fallback wrapper with a single consumer. Fold
both mount points into react-error-boundary (the primitive behind
BaseErrorBoundary) with local fallbacks that keep the panel styling,
message text and retry reset, log each error once, and drop the retry
attempt cap and the stack-details collapse along with it.
2026-10-28 10:17:37 +08:00
Tunglies 4489c9a26f refactor(traffic): drop unreachable inline monitor fallback
The inline traffic monitor duplicated the worker's message loop,
snapshot throttling and aging logic but only runs when Worker is
undefined or its constructor throws, which no supported Tauri webview
or browser hits. Keep the worker as the single implementation and
remove the mode switch and the pending-message queue that could only
ever buffer the init message.
2026-10-28 09:59:44 +08:00
Tunglies 98a7932742 fix(services): make retries viable and align polling freshness window
Share no abort signal across retry attempts: after a timeout abort the
old signal stays dead and every later fetch rejects immediately, so
retries only burned backoff time. Also drop the system state query's
staleTime: the wrapper maps it to SWR's dedupingInterval, which
swallowed every other 3s poll tick while it exceeded the interval.
2026-10-28 09:42:04 +08:00
Tunglies c678d60964 fix(delay): write pending state once per node in batch checks
checkListDelay pre-marked every node as checking, help() re-marked it
when picked up and measureDelay marked it a third time on entry, so
each batch run queued three identical pending updates per node. Keep
the pre-mark (immediate feedback for queued nodes) and drop the
redundant marks along the chain.
2026-10-28 09:27:29 +08:00
Tunglies d5bc4ff58b fix(setting): mount only reachable proxy control viewers
ProxyControlSwitches unconditionally mounted both SysproxyViewer and
TunViewer while its switch rows are mutually exclusive, so every
instance carried a dialog that could never open, each firing
getEmbeddedServerPort or a clash query subscription on mount. Mount
each viewer under the same condition as the switch row that opens it.

SettingSystem also mounted its own SysproxyViewer and TunViewer whose
refs were never opened there; the reachable entries are the
ProxyControlSwitches rows, so the dead pair is removed. Viewer mounts
across the app drop from eight (setting-system: two own + two per
instance, proxy-tun-card: two) to three (one per rendered switch
variant).
2026-10-28 09:19:23 +08:00
Tunglies c2bb6cc362 fix(clash): take config write lock when changing mode
change_clash_mode committed the clash draft and saved config.yaml without
claiming CONFIG_WRITE_LOCK, so a concurrent patch_clash transaction could
have its staged draft committed here or its file-snapshot rollback swallow
the mode change. Take lock_config_write (waiting) rather than
try_lock_config_write: two of the three callers (hotkey, tray) discard the
result, so fail-fast would silently drop the switch, and the lock is only
attempted after the mihomo patch already applied, where an Err would roll
the frontend back while the core runs the new mode.
2026-10-28 09:17:54 +08:00
Tunglies cefc0d8c62 perf(backup): extract archive off the runtime
Run File::open, ZipArchive::new and the extraction of the backup
archive inside spawn_blocking. Extracting a multi-file backup blocked
a tokio worker for hundreds of milliseconds to seconds while the
runtime kept serving other work on the remaining workers.

Move the PROFILE_WRITE_LOCK acquisition after the extraction, right
before finalize_restored_verge_config: the lock protects the
config-data transition (extracted files reloaded into drafts), not the
plain filesystem writes, so profile operations no longer queue behind
the blocking unzip.
2026-10-28 09:17:38 +08:00
Tunglies 34607dce55 fix(backup): serialize restore with config write lock
Acquire the configuration write lock at the entry of
finalize_restored_verge_config so the clash, profiles and verge draft
applies all happen under it, instead of only the verge layer. A
concurrent patch (patch_clash / patch_verge via try_lock_config_write)
could otherwise stage a draft that the unlocked restore applies
overwrite, or interleave its persistence with the restore.

Also drop the pointless clones in the clash and profiles edit_draft
closures; edit_draft takes FnOnce so the restored values can be moved
in. The lock is released before patch_verge, which re-acquires it via
try_lock_config_write.
2026-10-28 09:17:15 +08:00
Tunglies acef575935 refactor(enhance): call the hysteria alpn builtin directly
builtin() existed to feed the uid-dispatch loop; with a single
builtin the vec and match are ceremony. apply_builtin_scripts calls
builtin_hy_alpn directly and to_script goes away; tests construct
ChainItem literals the way the merge items already did.
2026-10-28 09:15:46 +08:00
Tunglies f489c7afa6 refactor(enhance): drop unreachable mode script guard
merge_default_config overwrites the profile's mode with the verge-owned
clash config, whose mode is always present (template seeds rule and
patch semantics never clear it) and restricted to rule/global/direct;
change_clash_mode is rejected by the core before persisting anything
else. mode:script can therefore only arrive through a hand-crafted
patch_clash call, and for that path an explicit invalid-mode validation
error is more honest than silently rewriting to rule. mihomo rejects
mode:script outright (invalid mode), and user merge/script chains run
after the builtins, so the guard never covered them anyway.
2026-10-28 09:15:46 +08:00
Tunglies 238d4de328 refactor(enhance): drop builtin core filtering that never discriminates
Both valid cores matched a different ChainSupport variant, yet each
variant registered the same uid pair, so the filtered builtin list was
identical for stable and alpha. Invalid cores are coerced at startup
(validate_and_fix_config / get_valid_clash_core) and the None arm of
is_support was unreachable. builtin() now returns the items directly
and the clash_core threading through ConfigValues goes away; re-add
core discrimination when a builtin actually differs per core.
2026-10-28 09:15:46 +08:00
Tunglies ab0e1b957a refactor: replace remaining clash meta naming with mihomo
Doc comment, generated bindings and the prebuild sidecar helpers stop
referring to the legacy Clash Meta name; installer legacy-process
cleanup keeps the old executable names on purpose.
2026-10-28 09:15:46 +08:00
Tunglies 1313692b3d refactor(sysopt): name the proxy state lock for its full role
The lock now owns the (Sysproxy, Autoproxy) state, so proxy_state_lock
says what it guards; the guard locals follow. constants::proxy held a
single sysproxy constant and is renamed sysproxy.
2026-10-28 09:15:46 +08:00
Tunglies a5d0b8dacb refactor(config): name prfitem constructor for what it builds
new_seq_item states that a fresh item is built from a template; the
from_ prefix wrongly implied an existing source. append_companion_item
returns the uid directly: append_item bails on a missing uid, so the
Option was always Some on the Ok path.
2026-10-28 09:15:46 +08:00
Tunglies 1a5094caf0 refactor(enhance): lowercase takes a reference and chain support is copy
use_lowercase borrows the mapping and clones only the values; call
sites no longer clone whole configs. ChainSupport is a fieldless enum
and now Copy; builtin() registers each support pair without clones.
2026-10-28 09:15:46 +08:00