Repository navigation
Conversation
在节点卡片 edit 按钮旁新增测速按钮,点击直接用 UrlTest().doTest() 测当前节点延迟,状态码与全量 URL Test 一致(1 成功/2 插件缺失/3 失败),完成后只刷新该行;双列与选择模式下跟随 edit 隐藏。
开始 URL Test 前先把当前分组所有节点的 status/ping/error 归零并写库、同步清空 adapter,避免测试中途取消时旧结果与新结果混在一起显示。
把设置页里的「分应用代理」提到侧边栏,位置在 路由 与 设置 之间;点击直接进入 AppManagerActivity 选择应用,菜单项放在 checkableBehavior=none 的独立 group 里,避免点击后改变导航选中态。
长按节点卡片弹出菜单(移动分组/多选/调整顺序/编辑/分享/删除)。进入多选后工具栏变为「移动到分组 + 全选 + 关闭」,点击卡片切换选中(绿描边),支持批量移动到其它分组并刷新各个已创建分组页面。长按拖拽排序改为菜单项触发,避免与长按菜单冲突。
配置页顶部分组标签长按弹出菜单:修改分组名(对话框输入,走 GroupManager.updateGroup 自动刷新标签)、删除分组(二次确认,删除后重建分组列表并回退到可用分组)。未分组系统分组不提供菜单。
- profile_multi_select_menu 引用的 @string/cancel 不存在,改为语义化的 exit_selection(退出多选) - 顺带修复原有 bug:mal_close 只在俄语里定义,非俄语环境点 yacd 面板的关闭按钮会崩,补上默认与中文值
双列布局下 edit 隐藏、改用三点菜单,原先单列的测速按钮也被隐藏。在三点菜单旁新增专用测速按钮:双列显示、单列隐藏,多选模式与选择模式下跟随隐藏,测试中与单列按钮同步禁用。
- libcore 新增 QueryGeoIPCountry(ip),用已打包的 geoip.db(MaxMind)离线查 ISO 国家代码,单例 reader 复用 - Kotlin 侧 CountryFlags:URL Test 时解析服务器地址->IP->国家码,按 profileId 与 host 双键缓存,避免重复解析 - 卡片底部协议标识右侧显示国旗 emoji(不显示文字),仅在测试过且查到归属时出现
1) sing-geoip 的 geoip.db 记录值是两位国家码字符串(同 Rules() 里的 networks.Network(&code)),按标准 MaxMind 结构解码必然失败;改为先按 string 解码,失败再按 country.iso_code 结构解码 2) 全量 URL Test 每测完一个节点即刷新该行(notifyProfileChanged),国旗不再等整轮结束 3) 增加 CountryFlags 日志(host -> ip -> code),便于在日志页定位
- 失败地址原来进永久黑名单,一次失败后续 URL Test 全部静默跳过(日志里一行都没有),改为 60 秒冷却重试 - 每个提前返回分支都补日志,便于在日志页定位卡在哪一步 - 卡片首次绑定即异步补查(inFlight 去重 + 同域名结果复用),不必等到下次 URL Test
- 查询结果按服务器地址持久化到 SharedPreferences(country_flags),重启后直接回填;profileId 映射每次启动按地址重建 - 卡片绑定优先用 resolve()(profileId -> host 兜底),持久化数据无需等待异步回调 - 失败地址改为 60 秒冷却重试,不再永久拉黑(原来一次失败后续测试全部静默跳过) - 移除 CountryFlags 全部日志输出,不污染运行日志 - 卡片首次绑定异步补查,inFlight 去重,同域名多节点复用结果
- 清理测试结果时同时清除该分组所有节点的图标缓存(内存 + SharedPreferences),图标与延迟一起消失 - 移除卡片绑定时的自动补查逻辑:图标只在 URL Test 后产生,清理后不会被自动查回来 - 持久化数据保留:重启后仍显示上次测速产生的图标(清理过的除外)
URL Test 开始前的清理只重置了 status/ping/error,没有清图标缓存,导致测试前残留上一轮的国旗。补上与「清理测试结果」相同的 forgetProfiles 调用。
原来每测完一个节点只做 notifyItemChanged,adapter 缓存的还是旧 ProxyEntity(status=0),所以延迟不刷新、只有国旗出现(国旗读独立缓存)。改为测完立即 ProfileManager.updateProfile,走 onUpdated 链路把新对象写回列表并重绘,延迟与国旗同时出现。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
功能
修复
mal_close只在俄语资源中定义,非俄语环境点击 yacd 面板关闭按钮会崩溃,补上默认与中文值说明
isLongPressDragEnabled=false)