Skip to content

Support new fragment#5437

Merged
2dust merged 2 commits into2dust:masterfrom
DHR60:fix2
Apr 2, 2026
Merged

Support new fragment#5437
2dust merged 2 commits into2dust:masterfrom
DHR60:fix2

Conversation

@DHR60
Copy link
Copy Markdown
Contributor

@DHR60 DHR60 commented Apr 1, 2026

支持新分片配置

支持策略组,跳过已配置前置的节点

@2dust 2dust requested a review from Copilot April 1, 2026 12:28
@2dust
Copy link
Copy Markdown
Owner

2dust commented Apr 1, 2026

感谢 PR。
让 ai review 下,就直接合并了。

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how “fragment” is applied in generated V2ray configs, shifting from an extra “fragment outbound + dialerProxy chain” approach to using streamSettings.finalmask masks, and ensures policy-group/multi-outbound configs also receive fragment processing while skipping outbounds that already have a front proxy configured.

Changes:

  • Apply fragment processing across all generated outbounds for normal and multiple/policy-group configs.
  • Refactor updateOutboundFragment to operate per-outbound and write fragment/noise masks into streamSettings.finalmask, skipping outbounds that already use sockopt.dialerProxy.
  • Update DTO models by removing legacy fragment/noises fields and expanding FinalMaskBean.MaskSettingsBean to support fragment/noise settings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt Applies fragment per-outbound during config generation; refactors fragment implementation to finalmask and adds skip logic for pre-proxied outbounds.
V2rayNG/app/src/main/java/com/v2ray/ang/dto/V2rayConfig.kt Removes legacy outbound fragment/noise DTO fields and extends finalmask DTO settings to represent fragment/noise mask settings.
Comments suppressed due to low confidence (1)

V2rayNG/app/src/main/java/com/v2ray/ang/handler/V2rayConfigManager.kt:987

  • fragmentOutbound is constructed here but never used (it’s not added to outbounds, and no fields are read). This is dead code and can also hide an intended behavior change; either remove the unused outbound creation or wire it into the config if it’s still required.
            val fragmentOutbound =
                OutboundBean(
                    protocol = AppConfig.PROTOCOL_FREEDOM,
                    tag = AppConfig.TAG_FRAGMENT,
                    mux = null

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DHR60

This comment was marked as outdated.

@DHR60

This comment was marked as outdated.

@DHR60
Copy link
Copy Markdown
Contributor Author

DHR60 commented Apr 1, 2026

考虑到分片与 streamSettings Tls 强相关,将由 populateTlsSettings 调用 updateOutboundFragment

@2dust 2dust merged commit 9dc1b1f into 2dust:master Apr 2, 2026
1 check passed
@DHR60
Copy link
Copy Markdown
Contributor Author

DHR60 commented Apr 2, 2026

好像有点问题来着,链式没跳过,部分 finalmask 意外跳过

@2dust
Copy link
Copy Markdown
Owner

2dust commented Apr 2, 2026

好像有点问题来着,链式没跳过,部分 finalmask 意外跳过

要继续处理吗?

@DHR60
Copy link
Copy Markdown
Contributor Author

DHR60 commented Apr 2, 2026

好像有点问题来着,链式没跳过,部分 finalmask 意外跳过

要继续处理吗?

懒了,不动了先

链式没问题,早上没注意看,GenMoreOutbound 已经有分片跳过逻辑了

finalmask 目前还是只影响 hy2 with salamander 和 kcp,删除了这两个的 udp noise 行为

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants