flutter_sing_box 1.1.5
flutter_sing_box: ^1.1.5 copied to clipboard
A Flutter plugin for sing-box, supporting remote profile import, Clash API, and VPN service management for Android and iOS.
1.1.5 #
Features #
- 新增 Windows 平台支持(开发中,桌面端以系统服务方式托管 sing-box 进程,弥补桌面平台缺少 VPN Service 的能力):
- 新增服务管理接口:
installService/uninstallService/queryServiceStatus,基于 PowerShell runas 提权安装并轮询状态判定结果 - 实现 Windows 平台的 VPN 控制与代理状态监听(
proxyStateStream) - 新增
HelperCli,封装clash_sing_helper.exe的全部 CLI 子命令(status / stop / install / uninstall / start)
- 新增服务管理接口:
- Windows 端 Clash API 支持:
- 新增 Clash 配置模型与 HTTP 客户端
- 实现 Clash 模式读取与切换(
clashModeStream、setClashMode) - 实现代理组数据获取、出站节点切换与 URL 延迟测试
- 存储层新增 Clash API 端口与测试 URL 配置项
Improvements #
- 升级 Android 端
libbox(sing-box 内核):1.13.14→1.13.15 - 升级 Windows 端
sing-box.exe至1.13.15 - Clash API 端口支持动态适配变化
- 移除 Android 端未使用的位置权限
Fixes #
- 修复 Windows 端 Clash HTTP 客户端代理类型映射错误
- 修正 Windows 端 Clash 代理组解析与类型转换逻辑
Refactoring #
- 重构服务安装接口:参数收敛为
HelperConfig对象,硬编码路径提取为常量 - 将服务管理能力(uninstall / start / stop)上升到平台抽象层与门面
- 优化代理状态流控制器初始化与状态分发逻辑
FlutterSingBoxWindows委托HelperCli,移除已迁移的辅助方法
Dependencies #
- 升级
dio:→^5.10.0
1.1.3 #
1.1.2 #
1.1.0 #
⚠️ 重要变更(Breaking Changes) #
- 最低环境要求提升:Dart SDK
^3.9.0→^3.11.0,Flutter>=3.3.0→>=3.41.0 - 修正 Android 插件包名拼写:
com.clashsiing.flutter_sing_box→com.clashsing.flutter_sing_box(如有原生层引用或 consumer-rules 配置,请同步更新) - 引入 freezed 代码生成框架,新增
freezed与freezed_annotation依赖
Features #
- 新增 Rule Set(规则集)配置支持,并优化 sing-box 配置模板结构
- 支持自定义订阅请求的 User-Agent,并内置默认 User-Agent 生成工具
- 大幅扩展 sing-box 配置模型字段:Outbound 新增
username、quic等出站配置;DNS / Route 模型补充多项字段 - 新增独立 storage 存储模块,引入
KeyValueStorage抽象接口(支持 MMKV / Memory 等实现) - 新增
CsSettingsStorage,用于管理按应用代理设置 - 新增
ClientLog数据模型 - Profile 新增
outboundsCount出站数量统计字段,并支持获取所有 Profile ID - 新增
defaultTestUrl常量
Improvements #
- 缓存 sing-box 版本号,避免重复获取(性能优化)
- 为模型添加
explicitToJson配置,修复嵌套模型的 JSON 序列化问题 - 重构 VPN 服务启动逻辑,缓存事件流状态
- 升级 JSON 序列化依赖:
json_annotation→ 4.12.0、json_serializable→ 6.14.0 - 移除 VpnService 的
android:process=":remote"属性
Fixes #
- 修复 VPN 服务重启功能
- 修复 Clash 模式设置与连接管理问题
- 修复 Android 端关闭服务的逻辑
appendLogs方法增加logSink空值保护,避免空指针异常
Refactoring #
- 重构存储层:
ProfileManager重命名为ProfileStorage,以KeyValueStorage抽象接口替代 MMKV 直接调用 ClientGroupItem/ClientGroup迁移至 freezed 数据类- 将 Route 与 RuleSet 部分必填字段改为可选,提升配置灵活性
- 重构 Android 服务实现并更新依赖
- 清理废弃的 custom 模块及调试代码
1.0.12 #
1.0.11 #
- Update
sing-boxdependency to1.12.25for Android.
1.0.10 #
- Route Rule: Added IP CIDR and port filtering support
- New fields:
ip_cidr,source_ip_cidr,port,port_range,source_port,source_port_range - Enhanced traffic matching with IP and port-based routing
- Full JSON serialization support with backward compatibility
- New fields:
1.0.9 #
Features #
- Add DNS rule action configuration and new domain matching fields
- Add
RuleActionconstants for routing rules
Improvements #
- Optimize proxy configuration template and simplify DNS/route rules
- Adjust default log level from
tracetoinfo - Update User-Agent string for better compatibility
Refactoring #
- Remove remote rule set configuration (geoip-cn, geosite-cn)
- Simplify configuration structure and improve performance
- Make Route fields optional for flexibility
1.0.8 #
- Update
sing-boxdependency to1.12.24for Android.
1.0.7 #
- Update
sing-boxdependency to1.12.23for Android.
1.0.6 #
- Update
sing-boxdependency to1.12.22for Android.
1.0.5 #
- Update
sing-boxdependency to1.12.20for Android.
1.0.4 #
- Update
libboxdependency to1.12.19for Android. - Update documentation and project links in README.
- Bump version to 1.0.4.
1.0.3 #
- Add
getSingBoxVersion()API to retrieve the underlying sing-box core version. - Optimize memory usage and stability for long-running VPN services.
- Improve error handling during remote profile synchronization.
- Update dependencies to latest versions (dio, mmkv, package_info_plus, etc.).
- Minor bug fixes and performance improvements.
1.0.2 #
- Improve package description and API documentation coverage to increase pub score.
- Add comprehensive README with features, platform support, and basic usage.
- Add Chinese documentation (
README_CN.md). - Showcase projects using this plugin (clash_sing_app).
1.0.0 #
- Initial release of the
flutter_sing_boxplugin. - Support for sing-box as a VPN service.
- Ability to import remote profiles.
- Clash API support for managing proxies and groups.
- UI for managing profiles and viewing connection status.
- Support for various protocols like Hysteria, TUIC, etc.
- Core functionalities like network service, profile management, and custom logging.
- Many bug fixes and performance improvements.