mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Add raw DTLS fingerprints
This commit is contained in:
parent
fd9f08d986
commit
0976198523
6 changed files with 60 additions and 17 deletions
|
@ -430,7 +430,17 @@ func (sf *SnowflakeProxy) makeWebRTCAPI() *webrtc.API {
|
|||
|
||||
settingsEngine.SetDTLSInsecureSkipHelloVerify(true)
|
||||
|
||||
if sf.CovertDTLSConfig.Mimic {
|
||||
if sf.CovertDTLSConfig.Fingerprint != "" {
|
||||
mimic := &mimicry.MimickedClientHello{}
|
||||
err := mimic.LoadFingerprint(sf.CovertDTLSConfig.Fingerprint)
|
||||
if err != nil {
|
||||
log.Printf("NewPeerConnection ERROR: %s", err)
|
||||
return nil
|
||||
}
|
||||
profiles := utils.DefaultSRTPProtectionProfiles()
|
||||
settingsEngine.SetSRTPProtectionProfiles(profiles...)
|
||||
settingsEngine.SetDTLSClientHelloMessageHook(mimic.Hook)
|
||||
} else if sf.CovertDTLSConfig.Mimic {
|
||||
mimic := &mimicry.MimickedClientHello{}
|
||||
if sf.CovertDTLSConfig.Randomize {
|
||||
err := mimic.LoadRandomFingerprint()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue