mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Add CovertWebRTC API
This commit is contained in:
parent
8caebb484d
commit
5912e2892a
4 changed files with 69 additions and 8 deletions
|
@ -162,8 +162,14 @@ func NewSnowflakeClient(config ClientConfig) (*Transport, error) {
|
|||
if config.Max > max {
|
||||
max = config.Max
|
||||
}
|
||||
|
||||
eventsLogger := event.NewSnowflakeEventDispatcher()
|
||||
transport := &Transport{dialer: NewWebRTCDialerWithEventsAndProxy(broker, iceServers, max, eventsLogger, config.CommunicationProxy, config.DTLSRandomize, config.DTLSMimic), eventDispatcher: eventsLogger}
|
||||
var transport *Transport
|
||||
if config.DTLSRandomize || config.DTLSMimic {
|
||||
transport = &Transport{dialer: NewCovertWebRTCDialerWithEventsAndProxy(broker, iceServers, max, eventsLogger, config.CommunicationProxy, config.DTLSRandomize, config.DTLSMimic), eventDispatcher: eventsLogger}
|
||||
} else {
|
||||
transport = &Transport{dialer: NewWebRTCDialerWithEventsAndProxy(broker, iceServers, max, eventsLogger, config.CommunicationProxy), eventDispatcher: eventsLogger}
|
||||
}
|
||||
|
||||
return transport, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue