Add covert-dtls to proxy and client with flags

This commit is contained in:
theodorsm 2024-11-30 22:17:27 +01:00
parent ae5bd52821
commit 541e124194
8 changed files with 88 additions and 16 deletions

View file

@ -118,6 +118,8 @@ type ClientConfig struct {
BridgeFingerprint string
// CommunicationProxy is the proxy address for network communication
CommunicationProxy *url.URL
DTLSRandomize bool
DTLSMimic bool
}
// NewSnowflakeClient creates a new Snowflake transport client that can spawn multiple
@ -161,7 +163,7 @@ func NewSnowflakeClient(config ClientConfig) (*Transport, error) {
max = config.Max
}
eventsLogger := event.NewSnowflakeEventDispatcher()
transport := &Transport{dialer: NewWebRTCDialerWithEventsAndProxy(broker, iceServers, max, eventsLogger, config.CommunicationProxy), eventDispatcher: eventsLogger}
transport := &Transport{dialer: NewWebRTCDialerWithEventsAndProxy(broker, iceServers, max, eventsLogger, config.CommunicationProxy, config.DTLSRandomize, config.DTLSMimic), eventDispatcher: eventsLogger}
return transport, nil
}