Tunglies
251678493c
edition 2024 ( #4702 )
...
* feat: update Cargo.toml for 2024 edition and optimize release profiles
* feat: refactor environment variable settings for Linux and improve code organization
* Refactor conditional statements to use `&&` for improved readability
- Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness.
- This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward.
- Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module.
* refactor: streamline conditional checks using `&&` for improved readability
* fix: update release profile settings for panic behavior and optimization
* fix: adjust optimization level in Cargo.toml and reorder imports in lightweight.rs
2025-09-10 09:49:06 +08:00
Tunglies
55b95a1985
Revert "feat: update Cargo.toml for 2024 edition and optimize release profiles ( #4681 )"
...
This reverts commit 31e3104c7f .
2025-09-08 21:48:09 +08:00
Tunglies
31e3104c7f
feat: update Cargo.toml for 2024 edition and optimize release profiles ( #4681 )
...
* feat: update Cargo.toml for 2024 edition and optimize release profiles
* feat: refactor environment variable settings for Linux and improve code organization
* Refactor conditional statements to use `&&` for improved readability
- Updated multiple files to combine nested `if let` statements using `&&` for better clarity and conciseness.
- This change enhances the readability of the code by reducing indentation levels and making the conditions more straightforward.
- Affected files include: media_unlock_checker.rs, profile.rs, clash.rs, profiles.rs, async_proxy_query.rs, core.rs, handle.rs, hotkey.rs, service.rs, timer.rs, tray/mod.rs, merge.rs, seq.rs, config.rs, proxy.rs, window.rs, general.rs, dirs.rs, i18n.rs, init.rs, network.rs, and window.rs in the resolve module.
* refactor: streamline conditional checks using `&&` for improved readability
2025-09-08 13:57:32 +08:00
Tunglies
3939741a06
refactor: migrate from serde_yaml to serde_yaml_ng for improved YAML handling ( #4568 )
...
* refactor: migrate from serde_yaml to serde_yaml_ng for improved YAML handling
* refactor: format code for better readability in DNS configuration
2025-08-30 02:24:47 +08:00
Tunglies
6eecd70bd5
fix(subscription): resolve issues causing import failures in some cases #4534 , #4436 , #4552 , #4519 , #4517 , #4503 , #4336 , #4301 ( #4553 )
...
* fix(subscription): resolve issues causing import failures in some cases #4534 , #4436 , #4552 , #4519 , #4517 , #4503 , #4336 , #4301
* fix(profile): update profile creation to include file data handling
* fix(app): improve singleton instance exit handling
* fix: remove unsued handle method
2025-08-29 17:46:46 +08:00
Tunglies
355a18e5eb
refactor(async): migrate from sync-blocking async execution to true async with unified AsyncHandler::spawn ( #4502 )
...
* feat: replace all tokio::spawn with unified AsyncHandler::spawn
- 🚀 Core Improvements:
* Replace all tokio::spawn calls with AsyncHandler::spawn for unified Tauri async task management
* Prioritize converting sync functions to async functions to reduce spawn usage
* Use .await directly in async contexts instead of spawn
- 🔧 Major Changes:
* core/hotkey.rs: Use AsyncHandler::spawn for hotkey callback functions
* module/lightweight.rs: Async lightweight mode switching
* feat/window.rs: Convert window operation functions to async, use .await internally
* feat/proxy.rs, feat/clash.rs: Async proxy and mode switching functions
* lib.rs: Window focus handling with AsyncHandler::spawn
* core/tray/mod.rs: Complete async tray event handling
- ✨ Technical Advantages:
* Unified task tracking and debugging capabilities (via tokio-trace feature)
* Better error handling and task management
* Consistency with Tauri runtime
* Reduced async boundaries for better performance
- 🧪 Verification:
* Compilation successful with 0 errors, 0 warnings
* Maintains complete original functionality
* Optimized async execution flow
* feat: complete tokio fs migration and replace tokio::spawn with AsyncHandler
🚀 Major achievements:
- Migrate 8 core modules from std::fs to tokio::fs
- Create 6 Send-safe wrapper functions using spawn_blocking pattern
- Replace all tokio::spawn calls with AsyncHandler::spawn for unified async task management
- Solve all 19 Send trait compilation errors through innovative spawn_blocking architecture
🔧 Core changes:
- config/profiles.rs: Add profiles_*_safe functions to handle Send trait constraints
- cmd/profile.rs: Update all Tauri commands to use Send-safe operations
- config/prfitem.rs: Replace append_item calls with profiles_append_item_safe
- utils/help.rs: Convert YAML operations to async (read_yaml, save_yaml)
- Multiple modules: Replace tokio::task::spawn_blocking with AsyncHandler::spawn_blocking
✅ Technical innovations:
- spawn_blocking wrapper pattern resolves parking_lot RwLock Send trait conflicts
- Maintain parking_lot performance while achieving Tauri async command compatibility
- Preserve backwards compatibility with gradual migration strategy
🎯 Results:
- Zero compilation errors
- Zero warnings
- All async file operations working correctly
- Complete Send trait compliance for Tauri commands
* feat: refactor app handle and command functions to use async/await for improved performance
* feat: update async handling in profiles and logging functions for improved error handling and performance
* fix: update TRACE_MINI_SIZE constant to improve task logging threshold
* fix(windows): convert service management functions to async for improved performance
* fix: convert service management functions to async for improved responsiveness
* fix(ubuntu): convert install and reinstall service functions to async for improved performance
* fix(linux): convert uninstall_service function to async for improved performance
* fix: convert uninstall_service call to async for improved performance
* fix: convert file and directory creation calls to async for improved performance
* fix: convert hotkey functions to async for improved responsiveness
* chore: update UPDATELOG.md for v2.4.1 with major improvements and performance optimizations
2025-08-26 01:49:51 +08:00
Tunglies
537d27d10b
fix: clippy errors with new config ( #4428 )
...
* refactor: improve code quality with clippy fixes and standardized logging
- Replace dangerous unwrap()/expect() calls with proper error handling
- Standardize logging from log:: to logging\! macro with Type:: classifications
- Fix app handle panics with graceful fallback patterns
- Improve error resilience across 35+ modules without breaking functionality
- Reduce clippy warnings from 300+ to 0 in main library code
* chore: update Cargo.toml configuration
* refactor: resolve all clippy warnings
- Fix Arc clone warnings using explicit Arc::clone syntax across 9 files
- Add #[allow(clippy::expect_used)] to test functions for appropriate expect usage
- Remove no-effect statements from debug code cleanup
- Apply clippy auto-fixes for dbg\! macro removals and path statements
- Achieve zero clippy warnings on all targets with -D warnings flag
* chore: update Cargo.toml clippy configuration
* refactor: simplify macOS job configuration and improve caching
* refactor: remove unnecessary async/await from service and proxy functions
* refactor: streamline pnpm installation in CI configuration
* refactor: simplify error handling and remove unnecessary else statements
* refactor: replace async/await with synchronous locks for core management
* refactor: add workflow_dispatch trigger to clippy job
* refactor: convert async functions to synchronous for service management
* refactor: convert async functions to synchronous for UWP tool invocation
* fix: change wrong logging
* refactor: convert proxy restoration functions to async
* Revert "refactor: convert proxy restoration functions to async"
This reverts commit b82f5d250b2af7151e4dfd7dd411630b34ed2c18.
* refactor: update proxy restoration functions to return Result types
* fix: handle errors during proxy restoration and update async function signatures
* fix: handle errors during proxy restoration and update async function signatures
* refactor: update restore_pac_proxy and restore_sys_proxy functions to async
* fix: convert restore_pac_proxy and restore_sys_proxy functions to async
* fix: await restore_sys_proxy calls in proxy restoration logic
* fix: suppress clippy warnings for unused async functions in proxy restoration
* fix: suppress clippy warnings for unused async functions in proxy restoration
2025-08-18 02:02:25 +08:00
Tunglies
764ef48fd1
refactor(Draft): Replace latest() with latest_ref() and data() with data_mut() in multiple files for improved mutability handling and consistency across the codebase ( #3987 )
...
* feat: add benchmarking for draft operations and new draft management structure
* Refactor Config Access: Replace `latest()` with `latest_ref()` and `data()` with `data_mut()` in multiple files for improved mutability handling and consistency across the codebase.
* refactor: remove DraftNew implementation and related benchmarks for cleaner codebase
2025-07-04 22:43:23 +08:00
Tunglies
53a46d0dc6
refactor: simplify proxy type handling and improve error handling in network commands
2025-05-16 00:09:47 +08:00
Tunglies
5b6c9be99f
feat: better service status and TUN mode usable checks in Setting Page
2025-05-12 19:04:21 +08:00
wonfen
3983762202
feat: add more network control methods
2025-05-03 23:17:51 +08:00
wonfen
73b9a71c84
feat: add retry mechanism to optimize network requests, improve async message handling and timeout for scheduled tasks
2025-05-03 09:38:25 +08:00
wonfen
32b6821b8a
feat: add network manager to optimize network request handling
2025-04-30 21:30:28 +08:00
wonfen
8d62c0d521
feat: auto-fallback to Clash proxy on scheduled subscription updates; refactor fallback logic and add request timeout
2025-04-24 22:51:45 +08:00
Tunglies
b57c6e408a
chore: git hooks for linter and formatter
2025-03-13 12:51:20 +08:00
MystiPanda
689273fc24
fix: rules drag error
2024-07-03 09:45:14 +08:00
MystiPanda
a2e9523707
fix: default value of global extend config
2024-07-02 18:46:23 +08:00
MystiPanda
bf8eebe537
chore: Adjust the chain processing execution order and default value
2024-07-02 12:40:28 +08:00
MystiPanda
fb4648d2af
feat: global merge and script
2024-07-01 08:25:03 +08:00
MystiPanda
4d424e70bc
feat: support seq editor
2024-06-30 00:22:05 +08:00
MystiPanda
3efef52398
refactor: Associate Profile with Merge/Script.
2024-06-29 23:07:44 +08:00
dongchengjie
f828ed3edf
fix: update_interval won't save when creating local profile while updating does & number input locales
2024-06-23 06:47:51 +08:00
MystiPanda
c698b24e01
chore: update & fmt & clippy
2024-06-12 10:00:22 +08:00
dongchengjie
3ee3e7c17b
feat: support URL Schema 'profile-web-page-url' ( #816 )
2024-04-01 19:28:28 +08:00
Cyenoch
66db0a4751
Feat: Provide a switch for allowing invalid certificates ( #450 )
2024-02-25 16:07:06 +08:00
MystiPanda
c4768f6138
fix: Try to fix traffic parse error
...
#337
2024-02-04 10:24:37 +08:00
Lai Zn
4bb88d8e44
feat: Use url path name as fallback subscription name ( #255 )
2024-01-18 14:36:37 +08:00
MystiPanda
9b6b250cbd
fix: Can not use specify update time when create profile
2024-01-16 10:29:04 +08:00
MystiPanda
3a883b9e41
refactor: cargo clippy
2024-01-10 17:36:35 +08:00
MystiPanda
bfb7ff88d9
fix: Cargo clippy
2023-12-21 16:49:21 +08:00
MystiPanda
c36425fd3a
fix: Get filename error
...
#165
2023-12-19 19:52:13 +08:00
MystiPanda
d132357c20
fix: user-agent version error
2023-12-15 15:18:01 +08:00
MystiPanda
a719237556
fix: Subinfo parse error
2023-12-15 11:35:10 +08:00
MystiPanda
4964382966
chore: Optimize service path
2023-12-14 13:03:52 +08:00
MystiPanda
7da78d3312
chore: Fix build error
2023-12-07 16:02:29 +08:00
Pylogmon
b7e9d61c72
fix: Get Profile Filename ( #54 )
2023-12-04 12:15:01 +08:00
WhizPanda
e9f14de05d
feat: support random mixed port
2023-12-01 12:56:18 +08:00
yettera765
d283f236db
fix: import url error ( #543 )
...
use rustls instead of depending user's system tls
2023-05-05 12:08:08 +08:00
GyDi
b31b70302b
fix: compatible with UTF8 BOM, close #283
2023-01-17 19:51:02 +08:00
GyDi
c0d2994b8e
feat: guard the mixed-port and external-controller
2022-11-22 15:45:17 +08:00
GyDi
bc8be2460f
feat: support builtin script for enhanced mode
2022-11-21 21:05:00 +08:00
GyDi
bedd3abf8a
refactor: done
2022-11-18 18:18:41 +08:00
GyDi
ce2d4498e1
refactor: adjust all path methods and reduce unwrap
2022-11-18 10:26:39 +08:00
GyDi
4f3751b7ce
refactor: for windows
2022-11-17 20:19:40 +08:00
GyDi
84c12dee80
refactor: wip
2022-11-17 17:07:13 +08:00
GyDi
837422fbb8
refactor: wip
2022-11-14 01:26:33 +08:00