mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-02 17:58:46 +00:00
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:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user