Commit Graph

1765 Commits

Author SHA1 Message Date
oomeow
121b8c433b chore: update tauri-plugin-mihomo dep 2025-10-11 20:57:30 +08:00
Sline
3d2507430b fix(shutdown): mark shutdown as exiting to stop background tasks (#5024)
* fix(shutdown): mark shutdown as exiting to stop background tasks

- lib.rs:570 → Flag app as exiting on ExitRequested, notify proxy guard, start cleanup immediately, with fallback in Exit event
- tray/mod.rs:190 → Add unified exit checks around tray init/updates to prevent UI recreation during shutdown
- event_driven_proxy.rs:252 → Ensure proxy guard skips all restore/re-enable work (including sysproxy.exe calls) once exit flag is set

* fix(shutdown): refine exit handling and proxy guard notifications

* fix(shutdown): add guard to run shutdown routine only once per lifecycle
2025-10-11 16:49:47 +08:00
Tunglies
5370bd45ed refactor: clash-verge-rev-service-ipc (#4841)
* feat: update service installation scripts and IPC integration

- Updated `Cargo.toml` to use version 2.0.8 of `clash_verge_service_ipc` with "client" feature.
- Renamed service installation and uninstallation scripts in `post-install.sh` and `pre-remove.sh`.
- Removed `service_ipc` module and refactored IPC handling in `service.rs` to use the new `clash_verge_service_ipc` directly.
- Adjusted service version checking and core management to align with the new IPC structure.
- Simplified directory checks in `dirs.rs` and updated logging configurations in `init.rs`.
- Updated Linux configuration file to reflect new script names.
- Enhanced service installer hook to manage state more effectively.

* refactor: simplify ClashConfig instantiation and remove unused service log file function

* feat: update clash_verge_service_ipc to version 2.0.9 and enhance service initialization logging

* chore: update clash_verge_service_ipc to version 2.0.10 and refactor async service manager initialization

* fix: update clash_verge_service_ipc to version 2.0.11 and improve service manager initialization

* fix: increase sleep duration for socket readiness check to improve stability

* fix: update clash_verge_service_ipc to version 2.0.12 and kode-bridge to version 0.3.4; refactor service management and IPC path checks

* fix: update clash_verge_service_ipc to version 2.0.13; refactor service connection and initialization logic
2025-10-11 15:35:26 +08:00
renovate[bot]
79d14f1d51 chore(deps): update rust crate regex to 1.12.1 (#5017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-11 13:12:27 +08:00
Tunglies
59dd71ebaa refactor: simplify logging calls by removing unnecessary parameters 2025-10-10 13:46:26 +08:00
Tunglies
8c0af66ca9 Refactor logging macros to remove print control parameter
- Updated logging macros to eliminate the boolean parameter for print control, simplifying the logging calls throughout the codebase.
- Adjusted all logging calls in various modules (lib.rs, lightweight.rs, help.rs, init.rs, logging.rs, resolve/mod.rs, resolve/scheme.rs, resolve/ui.rs, resolve/window.rs, server.rs, singleton.rs, window_manager.rs) to reflect the new macro structure.
- Ensured consistent logging behavior across the application by standardizing the logging format.
2025-10-10 13:05:37 +08:00
Sline
a4d94c8bc9 refactor: enhance compositor detection logic (#5007)
* refactor: enhance compositor detection logic

* docs: UPDATELOG.md
2025-10-10 10:13:24 +08:00
renovate[bot]
0a771bd67a chore(deps): update rust crate libc to 0.2.177 (#5003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 22:24:19 +08:00
renovate[bot]
2798e930ac chore(deps): update rust crate zip to v6 (#5000)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 22:17:45 +08:00
oomeow
1357913f8b fix: restart app failed (#4974)
* fix: failed to restart app

* chore: cleanup

* chore: cargo fmt

* chore: use AsyncHandler

* chore: clippy

* chore: update
2025-10-09 20:08:25 +08:00
❤是纱雾酱哟~
14b990ad9f Revert "build(tauri): add pkexec dependency for Linux packages (#4833)" (#4996)
- This reverts commit b608a38
- This may reopen issue #4831
- Issue #4992 may still remain unresolved

Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>
2025-10-09 18:45:02 +08:00
Slinetrac
58bd2032f3 refactor(sidecar): inline Record construction for safer logging
- Build Record inline so fmt::Arguments temporary only lives through writer.write, avoiding dropped-temporary borrow.
- Add explicit 'static annotation on leaked string before reboxing for clarity.
2025-10-09 18:41:09 +08:00
Slinetrac
fe7eb59f18 refactor(core): stabilize 'static backing for sidecar logging
Introduced `write_sidecar_log` to prevent temporary `format_args!` values
from dropping early.

- src-tauri/src/core/core.rs:60 — adds `write_sidecar_log`, which temporarily
  leaks the message into a `Box<str>`, builds the `Record`, writes it, then
  immediately reclaims the boxed string. The `unsafe` block is limited to
  `Box::from_raw` needed to undo `Box::leak`.
- src-tauri/src/core/core.rs:794, 802, 806 — all three sidecar events now route
  through this helper, reusing the returned string for the in-memory log and
  avoiding extra UTF-8 decoding.
2025-10-09 16:46:11 +08:00
Sline
5db4677ff8 fix: linux tun timeout (#4993)
* fix: linux tun timeout

* docs: UPDATELOG.md
2025-10-09 15:09:17 +08:00
Sline
c7cd47fbdc fix: silent start (#4990) 2025-10-09 14:02:27 +08:00
Tunglies
02c271dfb2 feat: update tauri-plugin-mihomo to version 0.1.1 with new source reference 2025-10-09 11:32:09 +08:00
Tunglies
4417fe6cd9 feat: update tray tooltip to include reassembled version format #4727 2025-10-09 05:53:49 +08:00
renovate[bot]
a9733d9746 chore(deps): update rust crate flexi_logger to 0.31.7 (#4986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 05:10:32 +08:00
Sline
9750cd3ce6 fix: multi-monitor-crash (#4980) 2025-10-08 22:02:17 +08:00
Tunglies
bfd1274a8c feat: Implement custom window controls and titlebar management (#4919)
- Added WindowControls component for managing window actions (minimize, maximize, close) based on the operating system.
- Integrated window decoration toggle functionality to allow users to prefer system titlebar.
- Updated layout styles to accommodate new titlebar and window controls.
- Refactored layout components to utilize new window management hooks.
- Enhanced layout viewer to include a switch for enabling/disabling window decorations.
- Improved overall window management by introducing useWindow and useWindowDecorations hooks for better state handling.
2025-10-08 20:23:26 +08:00
renovate[bot]
f195b3bccf chore(deps): update rust crate flexi_logger to 0.31.6 (#4979)
* chore(deps): update rust crate flexi_logger to 0.31.6

* chore: up lock

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Slinetrac <realakayuki@gmail.com>
2025-10-08 19:14:00 +08:00
Tunglies
5376d50cfb feat: add clash_verge_logger and clash_verge_service_ipc dependencies; refactor logging and process management 2025-10-08 18:06:11 +08:00
oomeow
7fc238c27b refactor: invock mihomo api by use tauri-plugin-mihomo (#4926)
* feat: add tauri-plugin-mihomo

* refactor: invock mihomo api by use tauri-plugin-mihomo

* chore: todo

* chore: update

* chore: update

* chore: update

* chore: update

* fix: incorrect delay status and update pretty config

* chore: update

* chore: remove cache

* chore: update

* chore: update

* fix: app freezed when change group proxy

* chore: update

* chore: update

* chore: add rustfmt.toml to tauri-plugin-mihomo

* chore: happy clippy

* refactor: connect mihomo websocket

* chore: update

* chore: update

* fix: parse bigint to number

* chore: update

* Revert "fix: parse bigint to number"

This reverts commit 74c006522e.

* chore: use number instead of bigint

* chore: cleanup

* fix: rule data not refresh when switch profile

* chore: update

* chore: cleanup

* chore: update

* fix: traffic graph data display

* feat: add ipc connection pool

* chore: update

* chore: clippy

* fix: incorrect delay status

* fix: typo

* fix: empty proxies tray menu

* chore: clippy

* chore: import tauri-plugin-mihomo by using git repo

* chore: cleanup

* fix: mihomo api

* fix: incorrect delay status

* chore: update tauri-plugin-mihomo dep

chore: update
2025-10-08 12:32:40 +08:00
renovate[bot]
2bc720534d chore(deps): update rust crate flexi_logger to 0.31.5 (#4965)
* chore(deps): update rust crate flexi_logger to 0.31.5

* chore: up lock

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Slinetrac <realakayuki@gmail.com>
2025-10-08 08:34:41 +08:00
Slinetrac
10f250b7e7 Revert "fix(windows): show UAC prompt for TUN service install/uninstall (#4959)"
This reverts commit c05395c258.
2025-10-08 07:47:05 +08:00
Sline
d3477159a8 fix: improve Linux tray support and add --no-tray option (#4958) 2025-10-07 10:02:11 +08:00
Sline
c05395c258 fix(windows): show UAC prompt for TUN service install/uninstall (#4959) 2025-10-07 10:01:35 +08:00
Sline
d25eb49bfe fix(tray): resolve "Restart App" failure on Windows (#4960)
* fix(tray): resolve "Restart App" failure on Windows

* style: rm useless comment
2025-10-07 10:01:15 +08:00
renovate[bot]
f3f8ea0481 chore(deps): update cargo dependencies (#4899)
* chore(deps): update cargo dependencies

* chore: up lock

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Slinetrac <realakayuki@gmail.com>
2025-10-07 08:22:35 +08:00
Sline
a7fa63f054 fix: implement proper error handling for "Restart App" failures (#4951)
* fix: implement proper error handling for "Restart App" failures

* fix: make clippy happy
2025-10-07 07:32:01 +08:00
Sline
b20b30baad refactor(config): move verify_config_initialization with backoff retry (#4952) 2025-10-07 07:31:35 +08:00
Sline
cb15a38cb3 fix: restore periodic proxy guard checks removed in event-driven migration (#4954)
* fix: restore periodic proxy guard checks removed in event-driven migration

* style: cargo fmt
2025-10-07 07:18:07 +08:00
Sline
39673af46f fix: ensure frontend sync after profile create/delete (#4956) 2025-10-07 07:17:21 +08:00
Tunglies
abb0df59df refactor: simplify auto proxy disabling logic in clean_async function 2025-10-06 18:26:01 +08:00
Sline
b0decf824e fix(webdav/app): reset client on errors and improve app restart (#4941)
* fix(webdav/app): reset client on errors and improve app restart

* refactor: rm unused function
2025-10-06 16:54:35 +08:00
Sline
5ec5fdcfc7 fix(init): ensure runtime config is ready before core manager startup (#4942)
* fix(init): ensure runtime config is ready before core manager startup

* refactor: simplify verify_config_initialization function
2025-10-06 16:51:47 +08:00
wonfen
f9bc739c51 feat: add system proxy cleanup on system shutdown & prevent DLL errors 2025-10-06 11:19:23 +08:00
Tunglies
a1b3f267de feat: enhance exit handling to prevent initialization and event processing during application exit 2025-10-05 18:07:47 +08:00
wonfen
dbcad24093 refactor: Uses tokio Command with CREATE_NO_WINDOW flag to avoid DLL initialization issues during shutdown 2025-10-05 11:11:14 +08:00
Tunglies
14288568bf feat: optimize backend i18n resource usage and improve language loading 2025-09-30 15:22:08 +08:00
Tunglies
ecdeadfe1e feat: enhance CI workflows with paths filtering for Rust and web changes 2025-09-30 03:35:38 +08:00
renovate[bot]
3e23609b68 chore(deps): update cargo dependencies (#4842)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:51:25 +08:00
wonfen
1b4691d0ac chore: update log 2025-09-27 18:40:59 +08:00
❤是纱雾酱哟~
b608a389c5 build(tauri): add pkexec dependency for linux packages (#4833)
* build(tauri): add pkexec dependency for linux packages

- Include pkexec in deb package dependencies
- Include pkexec in rpm package dependencies
- Update dependency arrays formatting in tauri linux config

Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>

* refactor(tauri): Prettify configurations according to suggestions

- Format `src-tauri/tauri.linux.conf.json` using Prettier

Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>

* feat: add pkexec dependency for Linux .deb and .rpm packaging

---------

Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
2025-09-24 08:42:14 +08:00
Hank
9de90200f5 fix: main thread block by sidecar launching. (#4795)
* fix: main thread block by sidecar launching.

#4791

* Refactor async runtime spawn to use AsyncHandler::spawn

for unify debugging.

* Fix compile error on non-windows platform

by remove Windows-specific configuration import.
2025-09-24 08:38:06 +08:00
renovate[bot]
860f154d54 chore(deps): update cargo dependencies (#4796)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-23 14:02:43 +08:00
Thomas
b3075cce24 recommit #4765 overwritten by #4815 (#4834) 2025-09-23 13:59:41 +08:00
Junkai W.
909c4028f1 添加链式代理下规则适配 2025-09-22 18:16:17 +08:00
Tunglies
620922f82e feat: add configurable log size and count options in settings 2025-09-22 16:31:38 +08:00
Tunglies
22e1d329cb fix: breaks the behavior of entering lightweight mode from tray menu #4815 2025-09-21 21:34:47 +08:00