fix: improve error handling in patch_profiles_config to prevent requests during profile switching
fix: change error handling in patch_profiles_config to return false when a switch is in progress
fix: ensure CURRENT_SWITCHING_PROFILE is reset after config updates in perform_config_update and patch_profiles_config
- Updated multiple instances in the codebase to replace calls to latest_ref() with latest_arc() for improved performance and memory management.
- This change affects various modules including validate, enhance, feat (backup, clash, config, profile, proxy, window), utils (draft, i18n, init, network, resolve, server).
- Ensured that all references to configuration data are now using the new arc-based approach to enhance concurrency and reduce cloning overhead.
refactor: update imports to explicitly include ClashInfo and Config in command files
* refactor: replace hardcoded DNS config filename with constant reference
* refactor: remove redundant import of constants in IClashTemp template method
* refactor: add conditional compilation for DEFAULT_REDIR based on OS
* refactor: simplify default TPROXY port handling and remove unused trace_err macro
* refactor: simplify default TPROXY port fallback logic
It might breaks mihomo starting.
Due to potentiall process name processing, permissions verifing, permissions and safty FORCE KILL, find process faillure.
- Replaced direct log calls with a new logging macro that includes a logging type for better categorization.
- Updated logging in various modules including `merge.rs`, `mod.rs`, `tun.rs`, `clash.rs`, `profile.rs`, `proxy.rs`, `window.rs`, `lightweight.rs`, `guard.rs`, `autostart.rs`, `dirs.rs`, `dns.rs`, `scheme.rs`, `server.rs`, and `window_manager.rs`.
- Introduced logging types such as `Core`, `Network`, `ProxyMode`, `Window`, `Lightweight`, `Service`, and `File` to enhance log clarity and filtering.
* refactor: optimize item handling and improve profile management
* refactor: update IVerge references to use references instead of owned values
* refactor: update patch_verge to use data_ref for improved data handling
* refactor: move handle_copy function to improve resource initialization logic
* refactor: update profile handling to use references for improved memory efficiency
* refactor: simplify get_item method and update profile item retrieval to use string slices
* refactor: update profile validation and patching to use references for improved performance
* refactor: update profile functions to use references for improved performance and memory efficiency
* refactor: update profile patching functions to use references for improved memory efficiency
* refactor: simplify merge function in PrfOption to enhance readability
* refactor: update change_core function to accept a reference for improved memory efficiency
* refactor: update PrfItem and profile functions to use references for improved memory efficiency
* refactor: update resolve_scheme function to accept a reference for improved memory efficiency
* refactor: update resolve_scheme function to accept a string slice for improved flexibility
* refactor: simplify update_profile parameters and logic
* fix: check if service installed when toggle tun mode on tray
* chore: cargo fmt
* fix: auto disable tun mode
* docs: update UPDATELOG.md
* fix: init Tun mode status
* chore: update
* feat: disable tun mode tray menu when tun mode is unavailable
* fix: restart core when uninstall service is canceled
* chore: remove check notification when toggle tun mode
* chore: fix updatelog
---------
Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>