Add raw DTLS fingerprints

This commit is contained in:
theodorsm 2024-12-19 00:33:48 +01:00
parent fd9f08d986
commit 0976198523
6 changed files with 60 additions and 17 deletions

View file

@ -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()