mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-23 01:56:48 +08:00
XHTTP client: Move dest2
into MemoryStreamConfig
as well
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package internet
|
||||
|
||||
import "github.com/xtls/xray-core/common/net"
|
||||
|
||||
// MemoryStreamConfig is a parsed form of StreamConfig. This is used to reduce the number of Protobuf parsings.
|
||||
type MemoryStreamConfig struct {
|
||||
Destination *net.Destination
|
||||
ProtocolName string
|
||||
ProtocolSettings interface{}
|
||||
SecurityType string
|
||||
@@ -23,6 +26,13 @@ func ToMemoryStreamConfig(s *StreamConfig) (*MemoryStreamConfig, error) {
|
||||
}
|
||||
|
||||
if s != nil {
|
||||
if s.Address != nil {
|
||||
mss.Destination = &net.Destination{
|
||||
Address: s.Address.AsAddress(),
|
||||
Port: net.Port(s.Port),
|
||||
Network: net.Network_TCP,
|
||||
}
|
||||
}
|
||||
mss.SocketSettings = s.SocketSettings
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user