header-custom finalmask: Remove headerConnMode headerReadAddrAware interface (#6193)

https://github.com/XTLS/Xray-core/pull/5920#issuecomment-4253108964

https://github.com/XTLS/Xray-core/pull/6193#issuecomment-4531875088
This commit is contained in:
LjhAUMEM
2026-05-29 03:44:16 +08:00
committed by GitHub
parent 09002ab763
commit 1cd7d25fec
10 changed files with 156 additions and 152 deletions
+11 -5
View File
@@ -1734,11 +1734,17 @@ func (c *HeaderCustomUDP) Build() (proto.Message, error) {
})
}
return &custom.UDPConfig{
Client: client,
Server: server,
Mode: c.Mode,
}, nil
if c.Mode == "standalone" {
return &custom.UDPStandaloneConfig{
Client: client,
Server: server,
}, nil
} else {
return &custom.UDPConfig{
Client: client,
Server: server,
}, nil
}
}
type Dns struct {
+1 -2
View File
@@ -195,8 +195,7 @@ func TestHeaderCustomUDPBuild(t *testing.T) {
"mode": "standalone"
}`,
Parser: parser,
Output: &finalmaskcustom.UDPConfig{
Mode: "standalone",
Output: &finalmaskcustom.UDPStandaloneConfig{
Client: []*finalmaskcustom.UDPItem{
{
RandMax: 255,