Commit Graph

30 Commits

Author SHA1 Message Date
Tunglies
d1649e3017 fix: update service to 2.1.0 and improve service installation for Unix systems (#6114)
* fix: update service to 2.1.0 and improve service installation for Unix systems

* fix: set GID environment variable during service installation on Linux

* Revert "fix: set GID environment variable during service installation on Linux"

This reverts commit 373aec579b.
2026-01-19 14:02:25 +08:00
Slinetrac
2869a35f1e chore(i18n): update backend i18n keys
translated by GPT-5.2.
2026-01-19 12:35:30 +08:00
renovate[bot]
f451a26f8c chore(deps): lock file maintenance (#6063)
* chore(deps): lock file maintenance

* chore(deps): update Cargo.toml

* chore(deps): use git repo until the next release

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Slinetrac <realakayuki@gmail.com>
2026-01-12 14:45:33 +08:00
Slinetrac
256a3f697b chore(deps): update Cargo.toml 2026-01-05 13:26:28 +08:00
oomeow
421bbd090e feat: reconfig log dynamically (#5724) 2026-01-04 16:56:16 +08:00
Tunglies
cceb0a6eb4 fix(permissions): manage umask for sidecar process in CoreManager on Unix
Co-authored-by: KaguraNaku <97681505+KaguraNaku@users.noreply.github.com>
2025-12-31 21:05:05 +08:00
Tunglies
9ce343fb45 perf(i18n): update translate function to use Cow to aovid allocate 2025-12-30 18:32:19 +08:00
Tunglies
cf08628200 fix(config): update home_cards reference to use as_ref() for improved handling 2025-12-30 18:09:10 +08:00
Tunglies
c06c15450f perf(draft): update with_data_modify to use T instead of Box<T> for better performance
Performance improved around 11.7%, avoid to allocate stack and copy to heap.
2025-12-30 17:51:50 +08:00
Tunglies
c41db51f81 feat: add governor crate for rate limiting and improve window/tray operation handling 2025-12-27 20:27:49 +08:00
Sline
c8aeae3f83 crate(i18n): add clash-verge-i18n crate and integrate localization support (#5961)
* crate(i18n): add clash-verge-i18n crate and integrate localization support

* refactor(service): remove redundant reinstall_service functions for Windows, Linux, and macOS

* chore(i18n): align i18n key

* feat(i18n): unify scan roots and add backend Rust/YAML support to cleanup script

* chore(i18n): add scripts to package.json

* fix(tray): initialize i18n locale before setup

* refactor(i18n): move locale initialization into Config::init_config

* fix(i18n): refresh systray tooltip on language change and correct docs reference

* fix(tray): remove unnecessary locale synchronization to improve performance

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2025-12-27 15:03:19 +08:00
Slinetrac
5aba848741 Revert "crate(i18n): add clash-verge-i18n crate and integrate localization support (#5959)"
This reverts commit 593751eda2.
2025-12-27 12:07:56 +08:00
Tunglies
593751eda2 crate(i18n): add clash-verge-i18n crate and integrate localization support (#5959)
* crate(i18n): add clash-verge-i18n crate and integrate localization support

* refactor(service): remove redundant reinstall_service functions for Windows, Linux, and macOS

* chore(i18n): align i18n key

* feat(i18n): unify scan roots and add backend Rust/YAML support to cleanup script

* chore(i18n): add scripts to package.json

---------

Co-authored-by: Slinetrac <realakayuki@gmail.com>
2025-12-27 11:33:58 +08:00
Tunglies
f9b8a658a1 perf(draft): optimize memory layout by removing double indirection & implemented optimistic locking via Arc::ptr_eq for with_data_modify (#5942)
* perf(draft): optimize memory layout by removing double indirection

- Replace `Arc<Box<T>>` with `Arc<T>` to reduce pointer chasing and memory overhead.
- Leverage `Arc::from(Box<T>)` in async modify path for efficient ownership transfer.
- Fix race conditions in `edit_draft` by ensuring atomicity under write lock.
- Performance improved by ~16-24% across all operations (based on Criterion bench).

Benchmarks:
- latest_arc:     41.1ns (-24.2%)
- edit_draft:     92.2ns (-17.6%)
- apply:          89.8ns (-17.7%)
- async_modify:   66.0ns (-16.6%)

* perf(draft): implemented optimistic locking via Arc::ptr_eq for with_data_modify

Benchmarks confirm only a negligible ~2% (1.3ns) overhead for async operations, ensuring total data integrity during concurrent updates.
2025-12-25 16:44:23 +08:00
oomeow
19accbd538 chore: rust related config for workspace (#5912)
* chore: move rust related config to workspace

* chore: cargo fmt
2025-12-22 15:28:55 +08:00
Tunglies
5b63f350ed fix: update edition and rust-version fields in Cargo.toml files 2025-12-15 14:17:56 +08:00
Tunglies
90b1c6e153 refactor(signal): migrate signal to handling async in windows and remove windows_sys dependency (#5741)
* refactor(signal): migrate signal to handling async in windows and remove signal-hook dependency

* refactor(signal): enhance Windows signal handling with improved cleanup logic

* refactor(signal): improve exit handling in run function for async compatibility
2025-12-06 11:33:49 +08:00
Tunglies
2ca8e6716d style: adjust rustfmt max_width to 120 2025-12-06 10:31:31 +08:00
Tunglies
d28075221c refactor(signal): migrate signal to handling async in unix and remove signal-hook dependency 2025-12-06 06:41:47 +08:00
renovate[bot]
76eb063f7d chore(deps): update cargo dependencies (#5699)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 12:18:43 +08:00
Tunglies
6897ead070 perf: change patch_config parameter from Mapping to &Mapping for efficiency 2025-11-30 20:44:21 +08:00
Tunglies
ecc272aa20 feat: integrate tauri-plugin-clipboard-manager and add system info commands (#5593) 2025-11-25 16:58:25 +08:00
oomeow
cbab199f80 fix: failed to receive shutdown signal on windows (#5533)
* fix: receive shutdown signal failed on windows

* docs: update Changelog.md

* chore: update

* fix: use tokio runtime to handle shutdown signal

* docs: update Changelog.md

* fix: move tauri dependency to the correct section in Cargo.toml

* fix: remove unused exit handling code in run function

* fix(clash-verge-signal): use global runtime to avoid tokio runtime panic on unix

* chore: update tauri-plugin-mihomo deps

* fix: handle macOS exit event to ensure proper application termination

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2025-11-22 22:36:00 +08:00
Tunglies
a271ba6ce5 feat: add update_proxy_chain_config method with detailed documentation for proxy and proxy-group configuration 2025-11-22 16:30:25 +08:00
Tunglies
82bed4910e perf: refactor IRuntime to use HashSet for exists_keys and improve related functions performance 2025-11-22 16:25:50 +08:00
Tunglies
c82cefe80e feat: add clash-verge-types crate and integrate IRuntime struct 2025-11-22 15:33:24 +08:00
Tunglies
ba3cd9b006 refactor: simplify IVerge struct by deriving Default and removing manual implementation 2025-11-19 18:40:53 +08:00
Tunglies
8339fabb17 feat(sysinfo): add tauri-plugin-clash-verge-sysinfo for system information retrieval (#5510)
* feat(sysinfo): add tauri-plugin-clash-verge-sysinfo for system information retrieval

* feat(sysinfo): add tauri-plugin-clash-verge-sysinfo for system information retrieval

* fix(service): import Manager trait for app handle in linux_running_as_root function
2025-11-18 15:48:48 +08:00
Tunglies
e672d19622 feat(signal): add clash-verge-signal crate and integrate signal handling (#5500)
* feat(signal): add clash-verge-signal crate and integrate signal handling

* fix: clippy error on type complexity
2025-11-18 10:04:21 +08:00
Tunglies
056af768e5 feat: initialize workspace with clash-verge-draft and clash-verge-logging crates (#5489)
- Add Cargo.toml for workspace management, including dependencies and profiles.
- Create clash-verge-draft crate with basic structure, including a benchmark for Draft functionality.
- Implement Draft management with shared state and asynchronous modifications.
- Add tests for Draft functionality to ensure correctness.
- Create clash-verge-logging crate for logging utilities with structured log types and macros.
- Update src-tauri to use new crates and remove unnecessary configurations.
- Refactor existing code to utilize the new Draft and logging functionalities.
2025-11-17 11:51:50 +08:00