Support new fragment#5437
Conversation
|
感谢 PR。 |
There was a problem hiding this comment.
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
updateOutboundFragmentto operate per-outbound and write fragment/noise masks intostreamSettings.finalmask, skipping outbounds that already usesockopt.dialerProxy. - Update DTO models by removing legacy
fragment/noisesfields and expandingFinalMaskBean.MaskSettingsBeanto 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
fragmentOutboundis constructed here but never used (it’s not added tooutbounds, 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.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
考虑到分片与 streamSettings Tls 强相关,将由 populateTlsSettings 调用 updateOutboundFragment |
|
|
要继续处理吗? |
懒了,不动了先 链式没问题,早上没注意看,GenMoreOutbound 已经有分片跳过逻辑了 finalmask 目前还是只影响 hy2 with salamander 和 kcp,删除了这两个的 udp noise 行为 |
* master: (23 commits) Add conditional process routing and routing strings Update AndroidLibXrayLite Revert "Make tun MTU a list and port nullable" Add IPv6 enable preference and strings Add launcher shortcuts to start/stop service Replace android.util.Log with LogUtil Add process-based routing support Update hev-socks5-tunnel Update AndroidLibXrayLite Add Xray ProcessFinder and register it Bug fix Make tun MTU a list and port nullable Add dynamic local SOCKS port option Add local SOCKS username/password support Fix VPN icon persisting in status bar after stopping service (2dust#5476) Bump android-actions/setup-android from 4.0.0 to 4.0.1 (2dust#5456) up 2.0.18 Support interval range (2dust#5440) Support new fragment (2dust#5437) Support new hysteria2 stream settings (2dust#5435) ...
支持新分片配置
支持
策略组,跳过已配置前置的节点