Conversation
|
然后打算做这个 #8824 (comment) 基于这个 pr |
你是说要做这个快照吗?这个不建议做。 |
ProtocolExtraItem 里 直接存 ChildItems 对应的全量 FallbackChildItems,比如如果是组,也展开到组内自己的 FallbackChildItems,依次递归下去,读取时先读数据库,再读 FallbackChildItems 节点失效导致不通,用户自己 ctrl + a 右键再重建一个就好了。这也符合正常交互逻辑 |
|
或者说有什么更简便的方式,解决右键 “多选生成配置组”,但订阅更新后直接不能用的问题吗? |
如果是鸡场的订阅,策略组中多选了配置后产生,这个没有好办法,只能是变成自定义配置存储起来,但是一样服务端也会失效导致不能用。 自建的不讨论,基本没有问题。 |
|
这个确实会失效导致不能用 但是从正常 UX 角度看
这个很明显更合理,并且利大于弊。 相比于服务端会失效导致不能用,更新订阅后导致策略组不能用的用户体验显然更不好 并且只影响被删除节点的处理,其他的还是按部就班正常处理 同时打算和 pre check 以及 group pre view 联动,标明哪个子配置是被删除的,哪个子配置是过期的 |
|
或者我还有个想法,和那个一键测速一样 右键加一个 Builtin 添加策略组,目标是整个订阅分组。 正则筛选中预置 |
这种可能更合理,并且对机场用户更方便一点 也可以加入 Builtin 地区筛选,比如点击就添加 $"{subItem.Remarks}-日本",正则: |
b4c3862 to
aa59e9b
Compare
可以加这个,然后把右键多选生成策略组的删除了,入口统一。 |
|
那就右键添加后,不自动激活,isSub = false 然后把多选创建的删了 |
|
这个 pr 已经 ready 了 可能 Builder 和 数据类 的位置有点问题,没想出更好的位置 |
|
感谢,等测试下 |
There was a problem hiding this comment.
Pull request overview
This PR refactors the “pre-check” flow by replacing ActionPrecheckManager with a new CoreConfigContextBuilder + NodeValidator pipeline that builds the config context once, returns structured Errors vs Warnings, and supports skipping invalid nodes inside groups (to address unsupported servers stopping group/balancer behavior, per #8823).
Changes:
- Replace centralized precheck manager with
CoreConfigContextBuilder/NodeValidatorproducing(context, errors, warnings)in one pass. - Update reload/export paths to proceed on warnings but stop on errors, and reuse the built
CoreConfigContextto avoid duplicate DB reads. - Rename/expand i18n resource keys for the new validator messages and add new routing/group/subscription warning/error messages.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs | Uses CoreConfigContextBuilder.Build for export and continues on warnings only. |
| v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs | Builds context once during reload and passes it to core load to avoid rebuilding. |
| v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs | Removes cycle pre-check when adding group nodes. |
| v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | Renames/updates message keys and adds new validator messages (zh-Hant). |
| v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | Renames/updates message keys and adds new validator messages (zh-Hans). |
| v2rayN/ServiceLib/Resx/ResUI.ru.resx | Renames/updates message keys and adds new validator messages (ru). |
| v2rayN/ServiceLib/Resx/ResUI.resx | Renames/updates message keys and adds new validator messages (default). |
| v2rayN/ServiceLib/Resx/ResUI.hu.resx | Renames/updates message keys and adds new validator messages (hu). |
| v2rayN/ServiceLib/Resx/ResUI.fr.resx | Renames/updates message keys and adds new validator messages (fr). |
| v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | Renames/updates message keys and adds new validator messages (fa-Ir). |
| v2rayN/ServiceLib/Resx/ResUI.Designer.cs | Regenerated strongly-typed resource accessors for renamed/new message keys. |
| v2rayN/ServiceLib/Models/CoreConfigContext.cs | Adds RunCoreType to persist selected runtime core type in the context. |
| v2rayN/ServiceLib/Manager/GroupProfileManager.cs | Changes GetAllChildProfileItems to return a dictionary (IndexId → ProfileItem). |
| v2rayN/ServiceLib/Manager/CoreManager.cs | LoadCore now takes CoreConfigContext? instead of ProfileItem?; speedtest uses builder. |
| v2rayN/ServiceLib/Manager/ActionPrecheckManager.cs | Removed (replaced by builder/validator flow). |
| v2rayN/ServiceLib/Handler/CoreConfigHandler.cs | Uses builder/resolve APIs for speedtest config generation. |
| v2rayN/ServiceLib/Handler/Builder/NodeValidator.cs | New validator that produces structured errors/warnings. |
| v2rayN/ServiceLib/Handler/Builder/CoreConfigContextBuilder.cs | New context builder that registers proxies, handles groups, routing outbound resolution, and subscription chain nodes. |
| v2rayN/ServiceLib/GlobalUsings.cs | Adds global using for ServiceLib.Handler.Builder. |
Files not reviewed (1)
- v2rayN/ServiceLib/Resx/ResUI.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
#8848 (comment) |
|
这个转为 Build 阶段内部处理,允许一定程度上的错误 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
5fbb651 to
78a74a1
Compare
|
接下来合并 #8855 |
Fix #8823
重构 PreCheck,使其符合现在的配置生成结构
国际化还没做