1
0
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:
Darien Raymond
2017-01-12 12:54:34 +01:00
parent f9b3a1446a
commit d24fe9dbfb
41 changed files with 261 additions and 321 deletions

View File

@@ -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
}