mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-01 06:55:25 -05:00
separate network and transport protocol
This commit is contained in:
@@ -22,7 +22,7 @@ func Dial(src v2net.Address, dest v2net.Destination, options internet.DialerOpti
|
||||
if src == nil {
|
||||
src = v2net.AnyIP
|
||||
}
|
||||
networkSettings, err := options.Stream.GetEffectiveNetworkSettings()
|
||||
networkSettings, err := options.Stream.GetEffectiveTransportSettings()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -48,11 +48,11 @@ func Dial(src v2net.Address, dest v2net.Destination, options internet.DialerOpti
|
||||
}
|
||||
|
||||
func init() {
|
||||
common.Must(internet.RegisterNetworkDialer(v2net.Network_WebSocket, Dial))
|
||||
common.Must(internet.RegisterTransportDialer(internet.TransportProtocol_WebSocket, Dial))
|
||||
}
|
||||
|
||||
func wsDial(src v2net.Address, dest v2net.Destination, options internet.DialerOptions) (*wsconn, error) {
|
||||
networkSettings, err := options.Stream.GetEffectiveNetworkSettings()
|
||||
networkSettings, err := options.Stream.GetEffectiveTransportSettings()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user