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
|
@ -287,7 +287,17 @@ func (c *WebRTCPeer) preparePeerConnection(
|
|||
|
||||
s.SetNet(vnet)
|
||||
|
||||
if covertDTLSConfig.Mimic {
|
||||
if covertDTLSConfig.Fingerprint != "" {
|
||||
mimic := &mimicry.MimickedClientHello{}
|
||||
err = mimic.LoadFingerprint(covertDTLSConfig.Fingerprint)
|
||||
if err != nil {
|
||||
log.Printf("NewPeerConnection ERROR: %s", err)
|
||||
return err
|
||||
}
|
||||
profiles := utils.DefaultSRTPProtectionProfiles()
|
||||
s.SetSRTPProtectionProfiles(profiles...)
|
||||
s.SetDTLSClientHelloMessageHook(mimic.Hook)
|
||||
} else if covertDTLSConfig.Mimic {
|
||||
mimic := &mimicry.MimickedClientHello{}
|
||||
if covertDTLSConfig.Randomize {
|
||||
err = mimic.LoadRandomFingerprint()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue