355a18e5ebf602cf881b90f9b20709ff93811ade
* 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
355a18e5eb
·
2025-08-26 01:49:51 +08:00
3,036 Commits
refactor(async): migrate from sync-blocking async execution to true async with unified AsyncHandler::spawn (#4502)
chore: update Prettier configuration and dependencies; refactor code formatting for consistency (#3926)
Continuation of Clash Verge
A Clash Meta GUI based on Tauri.
Preview
| Dark | Light |
|---|---|
![]() |
![]() |
Install
请到发布页面下载对应的安装包:Release page
Go to the Release page to download the corresponding installation package
Supports Windows (x64/x86), Linux (x64/arm64) and macOS 10.15+ (intel/apple).
我应当怎样选择发行版
| 版本 | 特征 | 链接 |
|---|---|---|
| Stable | 正式版,高可靠性,适合日常使用。 | Release |
| Alpha | 早期测试版,功能未完善,可能存在缺陷。 | Alpha |
| AutoBuild | 滚动更新版,持续集成更新,适合开发测试。 | AutoBuild |
安装说明和常见问题,请到 文档页 查看
TG 频道: @clash_verge_rev
Promotion
狗狗加速 —— 技术流机场 Doggygo VPN
- 高性能海外机场,免费试用,优惠套餐,解锁流媒体,全球首家支持 Hysteria 协议。
- 使用 Clash Verge 专属邀请链接注册送 3 天,每天 1G 流量免费试用:点此注册
- Clash Verge 专属 8 折优惠码: verge20 (仅有 500 份)
- 优惠套餐每月仅需 15.8 元,160G 流量,年付 8 折
- 海外团队,无跑路风险,高达 50% 返佣
- 集群负载均衡设计,高速专线(兼容老客户端),极低延迟,无视晚高峰,4K 秒开
- 全球首家 Hysteria 协议机场,现已上线更快的
Hysteria2协议(Clash Verge 客户端最佳搭配) - 解锁流媒体及 ChatGPT
- 官网:https://狗狗加速.com
本项目的构建与发布环境由 YXVM 独立服务器全力支持,
感谢提供 独享资源、高性能、高速网络 的强大后端环境。如果你觉得下载够快、使用够爽,那是因为我们用了好服务器!
🧩 YXVM 独立服务器优势:
- 🌎 优质网络,回程优化,下载快到飞起
- 🔧 物理机独享资源,非VPS可比,性能拉满
- 🧠 适合跑代理、搭建 WEB 站 CDN 站 、搞 CI/CD 或任何高负载应用
- 💡 支持即开即用,多机房选择,CN2 / IEPL 可选
- 📦 本项目使用配置已在售,欢迎同款入手!
- 🎯 想要同款构建体验?立即下单 YXVM 独立服务器!
Features
- 基于性能强劲的 Rust 和 Tauri 2 框架
- 内置Clash.Meta(mihomo)内核,并支持切换
Alpha版本内核。 - 简洁美观的用户界面,支持自定义主题颜色、代理组/托盘图标以及
CSS Injection。 - 配置文件管理和增强(Merge 和 Script),配置文件语法提示。
- 系统代理和守卫、
TUN(虚拟网卡)模式。 - 可视化节点和规则编辑
- WebDav 配置备份和同步
FAQ
Refer to Doc FAQ Page
Donation
Development
See CONTRIBUTING.md for more details.
To run the development server, execute the following commands after all prerequisites for Tauri are installed:
pnpm i
pnpm run prebuild
pnpm dev
Contributions
Issue and PR welcome!
Acknowledgement
Clash Verge rev was based on or inspired by these projects and so on:
- zzzgydi/clash-verge: A Clash GUI based on tauri. Supports Windows, macOS and Linux.
- tauri-apps/tauri: Build smaller, faster, and more secure desktop applications with a web frontend.
- Dreamacro/clash: A rule-based tunnel in Go.
- MetaCubeX/mihomo: A rule-based tunnel in Go.
- Fndroid/clash_for_windows_pkg: A Windows/macOS GUI based on Clash.
- vitejs/vite: Next generation frontend tooling. It's fast!
License
GPL-3.0 License. See License here for details.
Languages
TypeScript
55%
Rust
37.9%
JavaScript
4%
NSIS
2.5%
Shell
0.3%
Other
0.3%

