diff --git a/client/lib/rendezvous.go b/client/lib/rendezvous.go index 770cc9b..b961f28 100644 --- a/client/lib/rendezvous.go +++ b/client/lib/rendezvous.go @@ -250,9 +250,9 @@ type WebRTCDialer struct { webrtcConfig *webrtc.Configuration max int - eventLogger event.SnowflakeEventReceiver - proxy *url.URL - connectionID turbotunnel.ClientID + eventLogger event.SnowflakeEventReceiver + proxy *url.URL + clientID turbotunnel.ClientID } // Deprecated: Use NewWebRTCDialerWithNatPolicyAndEventsAndProxy instead @@ -322,9 +322,9 @@ func NewWebRTCDialerWithNatPolicyAndEventsAndProxyAndClientID( webrtcConfig: &config, max: max, - eventLogger: eventLogger, - proxy: proxy, - connectionID: clientID, + eventLogger: eventLogger, + proxy: proxy, + clientID: clientID, } } @@ -332,7 +332,7 @@ func NewWebRTCDialerWithNatPolicyAndEventsAndProxyAndClientID( func (w WebRTCDialer) Catch() (*WebRTCPeer, error) { // TODO: [#25591] Fetch ICE server information from Broker. // TODO: [#25596] Consider TURN servers here too. - return NewWebRTCPeerWithEventsAndProxy(w.webrtcConfig, w.BrokerChannel, w.eventLogger, w.proxy) + return NewWebRTCPeerWithNatPolicyAndEventsProxyAndClientID(w.webrtcConfig, w.BrokerChannel, w.natPolicy, w.eventLogger, w.proxy, w.clientID) } // GetMax returns the maximum number of snowflakes to collect. diff --git a/client/lib/webrtc.go b/client/lib/webrtc.go index a78c264..a2fbb40 100644 --- a/client/lib/webrtc.go +++ b/client/lib/webrtc.go @@ -47,7 +47,7 @@ type WebRTCPeer struct { proxy *url.URL activeTransportMode byte - connectionID turbotunnel.ClientID + clientID turbotunnel.ClientID } // Deprecated: Use NewWebRTCPeerWithNatPolicyAndEventsAndProxy Instead. @@ -99,7 +99,7 @@ func NewWebRTCPeerWithNatPolicyAndEventsAndProxy( // The creation of the peer handles the signaling to the Snowflake broker, including // the exchange of SDP information, the creation of a PeerConnection, and the establishment // of a DataChannel to the Snowflake proxy. -// connectionID is the hinted ID for the connection. +// clientID is the hinted ID for the connection. func NewWebRTCPeerWithNatPolicyAndEventsProxyAndClientID(config *webrtc.Configuration, broker *BrokerChannel, natPolicy *NATPolicy, eventsLogger event.SnowflakeEventReceiver, proxy *url.URL, clientID turbotunnel.ClientID, @@ -126,7 +126,7 @@ func NewWebRTCPeerWithNatPolicyAndEventsProxyAndClientID(config *webrtc.Configur connection.eventsLogger = eventsLogger connection.proxy = proxy - connection.connectionID = clientID + connection.clientID = clientID err := connection.connect(config, broker, natPolicy) if err != nil { @@ -325,7 +325,7 @@ func (c *WebRTCPeer) preparePeerConnection( maxRetransmissionVal := uint16(0) maxRetransmission = &maxRetransmissionVal } - protocol := fmt.Sprintf("%c %s", c.activeTransportMode, c.connectionID.String()) + protocol := fmt.Sprintf("%c %s", c.activeTransportMode, c.clientID.String()) dataChannelOptions := &webrtc.DataChannelInit{ Ordered: &ordered, Protocol: &protocol,