Switch up ordering DTLS elliptic curves to reduce likelihood of filtering (#1568)

tl;dr. Pion-based traffic is impacted because TOR Snowflake uses Pion
https://github.com/pion/dtls/pull/474
This commit is contained in:
David Zhao
2023-03-31 22:47:23 -07:00
committed by GitHub
parent 8be2b88ff6
commit 602f987ed7
+5
View File
@@ -8,6 +8,7 @@ import (
"time"
"github.com/bep/debounce"
"github.com/pion/dtls/v2/pkg/crypto/elliptic"
"github.com/pion/ice/v2"
"github.com/pion/interceptor"
"github.com/pion/interceptor/pkg/cc"
@@ -241,6 +242,10 @@ func newPeerConnection(params TransportParams, onBandwidthEstimator func(estimat
se := params.Config.SettingEngine
se.DisableMediaEngineCopy(true)
// Change elliptic curve to improve connectivity
// https://github.com/pion/dtls/pull/474
se.SetDTLSEllipticCurves(elliptic.X25519, elliptic.P384, elliptic.P256)
//
// Disable SRTP replay protection (https://datatracker.ietf.org/doc/html/rfc3711#page-15).
// Needed due to lack of RTX stream support in Pion.