mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
connectionID → clientID.
This commit is contained in:
parent
a601c2b1fa
commit
568a0999d2
2 changed files with 11 additions and 11 deletions
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue