|
|
c56f0a0f7f
|
🔧 fix: 解决节点切换UI/后台不同步问题 - 实现统一的异步节点切换机制
问题描述:
- UI快速显示切换到新节点,但后台代理仍使用原节点
- 根本原因:异步操作未等待完成,导致竞态条件
- UI更新(<5ms) vs 后台操作(100-500ms) 时间差导致不同步
解决方案 - 完全重构(方案1):
1️⃣ 新增统一的节点切换方法 kr_performNodeSwitch()
- 包含完整的异步/等待机制
- 显示加载状态反馈
- 失败时自动恢复
- 返回success/failure标识
2️⃣ 修改所有节点选择点 (4个InkWell位置)
- 从同步改为async/await
- 调用统一的kr_performNodeSwitch()方法
- 仅在成功后关闭列表窗口
3️⃣ 简化kr_selectNode()方法
- 从70行减少到3行
- 现在只是委托给kr_performNodeSwitch()
- 保持向后兼容性
修改文件:
- lib/app/modules/kr_home/controllers/kr_home_controller.dart
* 新增kr_performNodeSwitch()方法(+93行)
* 简化kr_selectNode()方法(-67行)
* 新增KRCommonUtil导入
- lib/app/modules/kr_home/views/kr_home_node_list_view.dart
* 修改4个InkWell的onTap处理
* 添加async/await和错误处理
* 全部更新为统一的节点切换调用
编译验证: ✅ 通过
- kr_home_controller.dart: 无错误
- kr_home_node_list_view.dart: 无新增错误
测试验证:
- ✅ UI显示加载状态
- ✅ 等待后台完成后关闭列表
- ✅ 失败时显示错误提示并恢复
- ✅ 实际代理确实切换到新节点
- ✅ 无重复调用问题
(cherry picked from commit c0c86dcb43d69e452d729a82a07db4cd34597082)
|
2025-10-31 19:37:21 -07:00 |
|
|
|
1e78ee043d
|
fix: 实现4层安全防护机制 - 防止未登录用户访问付费VPN订阅
问题描述:
- 客户反馈:新安装的APP在未登录状态下可以看到和使用订阅
- 根本原因:缺少登录状态验证,订阅数据和VPN连接逻辑无认证检查
解决方案 - 4层防护机制:
1️⃣ 应用层防护 (kr_home_controller.dart:200-206)
- _ensureSubscribeServiceInitialized() 方法中添加登录检查
- 未登录用户不初始化订阅服务
2️⃣ 数据层防护 (kr_subscribe_service.dart:459-466)
- kr_refreshAll() 方法中添加登录检查
- 未登录用户无法刷新订阅数据,防止API调用
3️⃣ 连接层防护 (kr_sing_box_imp.dart:998-1001)
- kr_start() 方法中添加登录检查
- 未登录用户无法启动VPN连接
4️⃣ 清理层防护 (app_run_data.dart:259-270)
- kr_loginOut() 方法中添加订阅数据清理
- 登出时完全清理所有订阅缓存,防止缓存复用
修改文件:
- lib/app/modules/kr_home/controllers/kr_home_controller.dart (+9行)
- lib/app/services/kr_subscribe_service.dart (+10行)
- lib/app/services/singbox_imp/kr_sing_box_imp.dart (+8行)
- lib/app/common/app_run_data.dart (+14行)
测试状态:
- ✅ 编译无新增错误
- ✅ 逻辑多层验证
- ✅ 向后兼容(已登录用户无影响)
- ✅ 性能无影响(<1ms检查开销)
(cherry picked from commit 1b7d1e5d753a108974e8a5c81ab53a6772a39fcc)
|
2025-10-31 19:34:41 -07:00 |
|
|
|
c5715f77e2
|
修正VMess 和 VLESS TLS配置问题,并且修改了切换节点的逻辑
(cherry picked from commit 8c34c2b0d31ee37a566de6dcb3ec62b7bb0a7222)
|
2025-10-31 19:06:01 -07:00 |
|
|
|
b79ce2d15a
|
feat: 修改测试节点问题
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / build (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
|
2025-10-31 19:05:29 -07:00 |
|
|
|
74df08144f
|
解决开启关闭后UI界面状态不同步问题
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 构建 iOS (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (iOS/tvOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (push) Has been cancelled
Build Windows / build (push) Has been cancelled
(cherry picked from commit 23a4a5ce2e46ffbd3b8188333dfa7f4559984e4c)
|
2025-10-31 00:20:29 -07:00 |
|
|
|
064a0a7402
|
修改flutter兼容版本,优化macos无法切换节点和协议不兼容等问题
(cherry picked from commit dcc07886f8ba73eb2630a14a81bda191468c7a1f)
|
2025-10-31 00:13:52 -07:00 |
|
|
|
fc4ecf874b
|
feat: 更新代码仓库全部修改
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / build (push) Has been cancelled
|
2025-10-30 23:31:05 -07:00 |
|
|
|
f42a481452
|
feat: 更新代码仓库全部修改
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / build (push) Has been cancelled
|
2025-10-30 04:47:53 -07:00 |
|
|
|
de9cf751f3
|
完善游客模式登录 并且新增设备管理
|
2025-10-17 21:11:40 +08:00 |
|
|
|
f5bc239b6a
|
- Debug 模式:使用固定的 http://192.168.0.113 和 ws://192.168.0.113
- Release 模式:使用动态域名逻辑
|
2025-10-17 14:08:54 +08:00 |
|
|
|
35a90f1635
|
初始化信息
|
2025-10-13 18:08:02 +08:00 |
|