Repository navigation
Releases: Gitefy/NekoBoxForAndroid
Release list
EgoX-4.3.0
完成的主要改进:
支持将单独节点(非订阅 Basic 分组)加入策略组:
升级了节点快照与匹配模型(
RouterMatcher.kt
和
RouterReconciler.kt
),支持统一处理订阅与本地来源;
在
GroupManager.kt
中移除了策略组仅收录订阅来源的过滤限制;
在
RouterGroupRepository.kt
中放开校验,允许本地分组作为有效来源并实时预览匹配节点;
在策略组编辑界面(
RouterGroupSettingsActivity.kt
)的来源列表中同时列出订阅组与本地分组,并以 [订阅] / [分组] 标签区分。
独立节点分组支持命名与重命名:
在
GroupFragment.kt
中放开对默认未分组(ungrouped)条目的编辑限制,显示编辑按钮;
用户可以点击进入分组编辑页对默认或单独节点分组设置自定义名称并保存。
多语言与文案优化:
更新了中英文 strings.xml,“订阅来源”更新为“节点来源”,并补充了未选来源提示及类型前缀。
4.2.0 GOOD TO USE
EgoX 4.1.0
EgoX 4.0.0
2.0.0
1.4.6
Summary / 概述
This PR prepares NekoBox 1.4.6 by resolving several critical lifecycle, concurrency, network resource, and UI defects, with a particular focus on decoupling drag-and-drop reordering in Router Groups to prevent cross-subscription order corruption, while retaining full drag-and-drop functionality for users.
本次提交为 NekoBox 1.4.6 准备版本,修复了多个关键的服务生命周期、并发控制、Socket 资源泄漏及 UI 缺陷;重点优化了路由分组(Router Group)下的拖拽排序机制,使路由分组内拖拽排序独立持久化,彻底解决了过去拖拽会打乱各节点在原本所属订阅中排序的问题,同时完整保留了路由分组的拖拽排序体验。
Key Changes / 主要变更
1. 🔀 Router Group Drag-and-Drop Order Decoupling (路由分组拖拽排序解耦)
- Problem: Dragging nodes within a router group previously overwrote
proxy_entities.userOrder, corrupting the original sequence of profiles in their respective source subscription groups. - Solution:
- Added
updateUserOrderquery and@Transaction updateOrdersbatch update toRouterMember.Dao. - In
ConfigurationAdapter.move(), interceptedinRouterGroupModeto only reorder the in-memory item IDs without touchingProxyEntity.userOrder. - In
ConfigurationAdapter.commitMove(), persisted the reordered sequence intorouter_members.userOrderand notified sing-box service reload smoothly. - Seamlessly integrates with
RouterReconciler.kt, ensuring user-defined order in router groups is safely preserved across subscription refreshes.
- Added
2. 🛡️ Subscription Concurrency Lock Protection (订阅更新并发互斥锁保护)
- Problem: In
GroupUpdater.executeUpdate(), duplicate update attempts or user cancellation of warning dialogs threwCancellationExceptionviacancel(), causing caller scope failures and prematurely unlocking the running update mutex incatchblocks. - Solution: Replaced
cancel()withreturn@coroutineScope falseto prevent exception leakage and maintain strict mutex lifecycle.
3. 🌐 WebDAV Connection & Socket Leak Prevention (WebDAV OkHttp 连接防泄漏)
- Problem: In
WebDAVSettingsActivity,client.newCall().execute()calls for auth and directory creation were not closed, leaking OkHttp sockets and connection pool resources. - Solution: Wrapped both network calls in Kotlin's
.use { response -> ... }blocks to ensure deterministic socket closing.
4. 🔄 ViewPager2 Memory Leak & UI Lifecycle Fixes (Fragment 视图生命周期与内存泄漏修复)
- Problem: In
ConfigurationFragment.GroupFragment, listeners were registered inonViewCreated()but only removed inonDestroy(). In ViewPager2, swiping pages out callsonDestroyView()while keeping the fragment instance, accumulating duplicate listeners and leaking views. Furthermore,routerGroupwas not parcelled across screen rotations. - Solution:
- Added
onDestroyView()to unregisterProfileManagerandGroupManagerlisteners, detach touch helpers, and clean up adapters. - Properly parcelled and restored
routerGroupinonSaveInstanceStateandonViewStateRestored. - Optimized
reloadProfiles()in router group mode by replacing the N+1getById()loop with a single batchgetEntities(memberIds)query.
- Added
5. 🔒 libcore Core Access Mutex & Lifecycle Check (Go sing-box 核心线程安全加锁)
- Problem:
SelectOutboundandSelectOutboundForinlibcore/box.golackedb.access.Lock()andb.statechecks, risking data races or nil dereferences during core stop or reload. - Solution: Acquired
b.access.Lock()and verifiedb.state == 1before accessing selectors and outbounds, matchingCurrentOutboundFor.
6. ⚠️ Router Group Deletion Confirmation Dialog (路由分组删除防误触)
- Added
MaterialAlertDialogBuilderconfirmation dialog before executing router group deletion inRouterGroupSettingsActivity.
7. 🧹 Post-Import Invalidation Cleanup (备份恢复后悬空数据清理)
- In
BackupFragment.finishImport(), automatically invokedSagerDatabase.routerGroupDao.clearInvalidSelections()andGroupManager.cleanupDanglingRouterMembers()after restoring router groups to prevent dangling node IDs.
8. ⚡ Traffic Looper & Version Bump (流量轮询节流与版本升级)
- Optimized
TrafficLoopersampling intervals and background notifications. - Bumped version to
1.4.6(versionCode:49) innb4a.properties.
Compatibility & Database Schema / 兼容性与数据库
- Room Database Schema: Kept at Version 10 (
SagerDatabase.kt). No migration required. - RuleEntity:
RuleEntity.routerGroupIdremains@IgnoredOnParcelto preserve legacy Android Parcel binary compatibility. - Native ABI: Verified full compatibility with
libcore.aarandlibhev-socks5-tunnel.soacrossarm64-v8a,armeabi-v7a,x86, andx86_64.
Verification & Testing / 验证与测试结果
-
./gradlew.bat testOssDebugUnitTest --offlinepassed (all 35 tasks successful). -
./gradlew.bat compileOssDebugKotlin --offlinepassed (0 compilation errors). -
:app:verifyLibcoreand:app:verifyOssDebugLibcoreCallerspassed. - Packaged full set of 1.4.6 debug APKs under
app/build/outputs/apk/oss/debug/.
NekoBox-1.4.5
NekoBox for Android 1.4.4
NekoBox for Android 1.4.4
🚀 新特性与界面重构
- 出站代理组作为首页:
- 应用启动默认进入「出站代理组」主页,打造类似 Clash / sing-box 的分流策略卡片体验。
- 手动代理组卡片直接展示当前生效节点;点击卡片可直接弹出单选框秒级热切换节点(底层 sing-box 即时热重载,无需断开重连 VPN)。
- 首页底部完整保留悬浮启停大按钮(FAB)与实时网速/连接状态栏(StatsBar),兼顾一键启停与流量监控。
- 抽屉菜单调整为以【代理组】置顶,原【配置】页保留在抽屉菜单中作为备用高级管理入口。
- 增加了代理组为空时的引导创建卡片。
🔒 隐私与通知优化
- 通知栏常驻节点信息可隐藏:
- 在【设置】->【通知设置】中新增 「在通知中显示节点名称」 开关(默认开启)。
- 关闭后,前台运行通知标题统一显示为应用名称
NekoBox,不再泄露机场名称、节点名称及分组信息,保护公共场合与锁屏下的节点隐私。 - 控制中心 / 状态栏下拉的 Quick Settings 快捷磁贴 同步受该隐私开关保护。
- 运行时切换开关即刻刷新前台通知。
🛠️ 其他改动
- 版本更新至
1.4.4(VERSION_CODE: 47)。 - 应用名称及所有架构安装包命名统一恢复为
NekoBox。
NekoBox 1.4.3 Router Groups
🎉 新特性
- 路由策略组 (Router Groups)
- 支持跨订阅聚合:可选择多个订阅,并通过包含/排除正则表达式动态匹配节点。
- 两种工作模式:
- URL-Test 自动优选:支持自定义测试网址、测速间隔和容差,自动切换延迟最低节点。
- Selector 手动切换:支持在策略组中手动指定出站节点。
- 路由规则联动:在路由规则的出站设置中,可直接指定自定义策略组作为流量出口。
- 便捷入口
- 分组主页顶部新增「路由策略组」卡片,显示当前配置状态与数量。
- 侧边抽屉菜单新增「代理组 (策略组)」直达入口。
🔧 修复与优化
- 测速状态解耦:策略组成员不再受单次 Ping 失败/超时影响,确保 URL-Test 和手动选择均能正常轮询与选用节点。
- 特殊节点名称兼容:完善对 Emoji 旗帜与各类非标准节点格式的名称安全解析。
- 防崩溃优化:解决设置页面多选配置项引发的空 Key 闪退问题。
- 进入页面自动同步:打开策略组列表即自动在后台刷新对齐所有订阅节点。
- 品牌名称规范:统一恢复为标准
NekoBox名称。
推荐现代安卓机型下载安装 arm64-v8a 版本。