Repository: libp2p/go-libp2p
Pull request #3098 (2024-12-10 12:41:58)

Upgrade pion/webrtc to v4
### Description

- Pull request for #3072 
- Update usage of `pion/webrtc` in `transport/webrtc` to `v4`

p-shahi: TestManyConnections seems to be racy
I ran 100 iterations (go test ./p2p/transport/webrtc -run TestManyConnections -count=1) with the following values
	const numListeners = 2
	const dialersPerListener = 2
	const connsPerDialer = 1
without any failure.

After increasing numListeners and dialersPerListener to 3 but keeping connections per dialer to 1:
const numListeners = 3
const dialersPerListener = 3
const connsPerDialer = 1

I can repro the issue seen in CI
```
❯ for i in {1..100}; do
  echo "Running iteration $i..."
  go test ./p2p/transport/webrtc -run TestManyConnections -count=1
done
Running iteration 1...
--- FAIL: TestManyConnections (0.03s)
    transport_test.go:982: dial failed: failed to secure outbound connection: error reading handshake message: proto: cannot parse invalid wire-format data
    transport_test.go:1006: failed: failed to secure outbound connection: error reading handshake message: proto: cannot parse invalid wire-format data
    transport_test.go:968: listener failed to accept conneciton: listener closed
    transport_test.go:968: listener failed to accept conneciton: listener closed
FAIL
FAIL	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.371s
FAIL
Running iteration 2...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.585s
Running iteration 3...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.370s
Running iteration 4...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.583s
Running iteration 5...
--- FAIL: TestManyConnections (0.03s)
    transport_test.go:982: dial failed: failed to secure outbound connection: error reading handshake message: proto: cannot parse invalid wire-format data
    transport_test.go:1006: failed: failed to secure outbound connection: error reading handshake message: proto: cannot parse invalid wire-format data
    transport_test.go:968: listener failed to accept conneciton: listener closed
    transport_test.go:968: listener failed to accept conneciton: listener closed
FAIL
FAIL	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.369s
FAIL
Running iteration 6...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.372s
Running iteration 7...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.372s
Running iteration 8...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.382s
Running iteration 9...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.575s
Running iteration 10...
ok  	github.com/libp2p/go-libp2p/p2p/transport/webrtc	0.594s
```

cc @sukunrt @MarcoPolo 
badgooooor: I tried downsize the test parameters to something like this. It is still a bit flaky.

```
const numListeners = 3
const dialersPerListener = 3
const connsPerDialer = 6
```

Log:
```
Running tool: /usr/local/go/bin/go test -timeout 30s -run ^TestManyConnections$ github.com/libp2p/go-libp2p/p2p/transport/webrtc

=== RUN   TestManyConnections
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  0
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  1
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  2
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  3
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  4
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  5
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  6
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  7
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  8
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  9
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  10
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  11
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  12
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  13
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  14
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  15
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  16
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  17
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  18
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  19
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  20
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  21
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  22
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  23
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  24
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  25
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  26
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  27
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  28
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  29
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  30
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  31
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  32
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  33
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  34
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  35
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  36
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  37
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  38
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  39
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  40
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  41
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  42
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  43
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  44
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  45
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  46
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  47
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  48
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  49
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  50
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  51
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  52
    /go-libp2p/p2p/transport/webrtc/transport_test.go:1004: completed conn:  53
--- PASS: TestManyConnections (0.24s)
PASS
ok      github.com/libp2p/go-libp2p/p2p/transport/webrtc        (cached)

```

cc. @p-shahi @sukunrt 
sukunrt: Thanks @badgooooor. Looks like an issue in pion. 

blocked on: https://github.com/pion/webrtc/pull/2976

Patch:
diff --git a/go.mod b/go.mod
index 7da5a501..28abae8f 100644
--- a/go.mod
+++ b/go.mod
@@ -50,7 +50,7 @@ require (
 	github.com/pion/logging v0.2.2
 	github.com/pion/sctp v1.8.35
 	github.com/pion/stun v0.6.1
-	github.com/pion/webrtc/v3 v3.3.5
+	github.com/pion/webrtc/v4 v4.0.7
 	github.com/prometheus/client_golang v1.20.5
 	github.com/prometheus/client_model v0.6.1
 	github.com/quic-go/quic-go v0.48.2
@@ -105,16 +105,21 @@ require (
 	github.com/onsi/ginkgo/v2 v2.22.0 // indirect
 	github.com/opencontainers/runtime-spec v1.2.0 // indirect
 	github.com/pion/dtls/v2 v2.2.12 // indirect
+	github.com/pion/dtls/v3 v3.0.4 // indirect
+	github.com/pion/ice/v4 v4.0.3 // indirect
 	github.com/pion/interceptor v0.1.37 // indirect
 	github.com/pion/mdns v0.0.12 // indirect
+	github.com/pion/mdns/v2 v2.0.7 // indirect
 	github.com/pion/randutil v0.1.0 // indirect
 	github.com/pion/rtcp v1.2.15 // indirect
 	github.com/pion/rtp v1.8.10 // indirect
 	github.com/pion/sdp/v3 v3.0.9 // indirect
-	github.com/pion/srtp/v2 v2.0.20 // indirect
+	github.com/pion/srtp/v3 v3.0.4 // indirect
+	github.com/pion/stun/v3 v3.0.0 // indirect
 	github.com/pion/transport/v2 v2.2.10 // indirect
 	github.com/pion/transport/v3 v3.0.7 // indirect
 	github.com/pion/turn/v2 v2.1.6 // indirect
+	github.com/pion/turn/v4 v4.0.0 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/prometheus/common v0.61.0 // indirect
diff --git a/go.sum b/go.sum
index 7a822e84..2d8fb16c 100644
--- a/go.sum
+++ b/go.sum
@@ -277,32 +277,37 @@ github.com/pion/datachannel v1.5.10/go.mod h1:p/jJfC9arb29W7WrxyKbepTU20CFgyx5oL
 github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
 github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk=
 github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE=
+github.com/pion/dtls/v3 v3.0.4 h1:44CZekewMzfrn9pmGrj5BNnTMDCFwr+6sLH+cCuLM7U=
+github.com/pion/dtls/v3 v3.0.4/go.mod h1:R373CsjxWqNPf6MEkfdy3aSe9niZvL/JaKlGeFphtMg=
 github.com/pion/ice/v2 v2.3.37 h1:ObIdaNDu1rCo7hObhs34YSBcO7fjslJMZV0ux+uZWh0=
 github.com/pion/ice/v2 v2.3.37/go.mod h1:mBF7lnigdqgtB+YHkaY/Y6s6tsyRyo4u4rPGRuOjUBQ=
+github.com/pion/ice/v4 v4.0.3 h1:9s5rI1WKzF5DRqhJ+Id8bls/8PzM7mau0mj1WZb4IXE=
+github.com/pion/ice/v4 v4.0.3/go.mod h1:VfHy0beAZ5loDT7BmJ2LtMtC4dbawIkkkejHPRZNB3Y=
 github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI=
 github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y=
 github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
 github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
 github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8=
 github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk=
+github.com/pion/mdns/v2 v2.0.7 h1:c9kM8ewCgjslaAmicYMFQIde2H9/lrZpjBkN8VwoVtM=
+github.com/pion/mdns/v2 v2.0.7/go.mod h1:vAdSYNAT0Jy3Ru0zl2YiW3Rm/fJCwIeM0nToenfOJKA=
 github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
 github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
-github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4=
 github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo=
 github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0=
-github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
 github.com/pion/rtp v1.8.10 h1:puphjdbjPB+L+NFaVuZ5h6bt1g5q4kFIoI+r5q/g0CU=
 github.com/pion/rtp v1.8.10/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4=
 github.com/pion/sctp v1.8.35 h1:qwtKvNK1Wc5tHMIYgTDJhfZk7vATGVHhXbUDfHbYwzA=
 github.com/pion/sctp v1.8.35/go.mod h1:EcXP8zCYVTRy3W9xtOF7wJm1L1aXfKRQzaM33SjQlzg=
 github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY=
 github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M=
-github.com/pion/srtp/v2 v2.0.20 h1:HNNny4s+OUmG280ETrCdgFndp4ufx3/uy85EawYEhTk=
-github.com/pion/srtp/v2 v2.0.20/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA=
+github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M=
+github.com/pion/srtp/v3 v3.0.4/go.mod h1:1Jx3FwDoxpRaTh1oRV8A/6G1BnFL+QI82eK4ms8EEJQ=
 github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4=
 github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8=
+github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw=
+github.com/pion/stun/v3 v3.0.0/go.mod h1:HvCN8txt8mwi4FBvS3EmDghW6aQJ24T+y+1TKjB5jyU=
 github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g=
-github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
 github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
 github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q=
 github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E=
@@ -312,8 +317,10 @@ github.com/pion/transport/v3 v3.0.7/go.mod h1:YleKiTZ4vqNxVwh77Z0zytYi7rXHl7j6uP
 github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
 github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc=
 github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
-github.com/pion/webrtc/v3 v3.3.5 h1:ZsSzaMz/i9nblPdiAkZoP+E6Kmjw+jnyq3bEmU3EtRg=
-github.com/pion/webrtc/v3 v3.3.5/go.mod h1:liNa+E1iwyzyXqNUwvoMRNQ10x8h8FOeJKL8RkIbamE=
+github.com/pion/turn/v4 v4.0.0 h1:qxplo3Rxa9Yg1xXDxxH8xaqcyGUtbHYw4QSCvmFWvhM=
+github.com/pion/turn/v4 v4.0.0/go.mod h1:MuPDkm15nYSklKpN8vWJ9W2M0PlyQZqYt1McGuxG7mA=
+github.com/pion/webrtc/v4 v4.0.7 h1:aeq78uVnFZd2umXW0O9A2VFQYuS7+BZxWetQvSp2jPo=
+github.com/pion/webrtc/v4 v4.0.7/go.mod h1:oFVBBVSHU3vAEwSgnk3BuKCwAUwpDwQhko1EDwyZWbU=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
diff --git a/p2p/transport/webrtc/connection.go b/p2p/transport/webrtc/connection.go
index 2fba37a9..b614b2c4 100644
--- a/p2p/transport/webrtc/connection.go
+++ b/p2p/transport/webrtc/connection.go
@@ -17,7 +17,7 @@ import (
 	ma "github.com/multiformats/go-multiaddr"
 	"github.com/pion/datachannel"
 	"github.com/pion/sctp"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 )
 
 var _ tpt.CapableConn = &connection{}
diff --git a/p2p/transport/webrtc/fingerprint.go b/p2p/transport/webrtc/fingerprint.go
index fd715865..0b1fe488 100644
--- a/p2p/transport/webrtc/fingerprint.go
+++ b/p2p/transport/webrtc/fingerprint.go
@@ -8,7 +8,7 @@ import (
 	ma "github.com/multiformats/go-multiaddr"
 	"github.com/multiformats/go-multibase"
 	mh "github.com/multiformats/go-multihash"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 )
 
 // parseFingerprint is forked from pion to avoid bytes to string alloc,
diff --git a/p2p/transport/webrtc/listener.go b/p2p/transport/webrtc/listener.go
index c3e2f297..3534fd2c 100644
--- a/p2p/transport/webrtc/listener.go
+++ b/p2p/transport/webrtc/listener.go
@@ -20,7 +20,7 @@ import (
 	manet "github.com/multiformats/go-multiaddr/net"
 	"github.com/multiformats/go-multibase"
 	"github.com/multiformats/go-multihash"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 )
 
 type connMultiaddrs struct {
diff --git a/p2p/transport/webrtc/stream.go b/p2p/transport/webrtc/stream.go
index 56f869f5..bce2f3f2 100644
--- a/p2p/transport/webrtc/stream.go
+++ b/p2p/transport/webrtc/stream.go
@@ -11,7 +11,7 @@ import (
 	"github.com/libp2p/go-msgio/pbio"
 
 	"github.com/pion/datachannel"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 )
 
 const (
diff --git a/p2p/transport/webrtc/transport.go b/p2p/transport/webrtc/transport.go
index c4c16fd4..1ee65a75 100644
--- a/p2p/transport/webrtc/transport.go
+++ b/p2p/transport/webrtc/transport.go
@@ -35,7 +35,7 @@ import (
 	"github.com/multiformats/go-multihash"
 
 	"github.com/pion/datachannel"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 )
 
 var webrtcComponent *ma.Component


Test patch:
diff --git a/p2p/transport/webrtc/stream_test.go b/p2p/transport/webrtc/stream_test.go
index 0f57f44f..4153ff83 100644
--- a/p2p/transport/webrtc/stream_test.go
+++ b/p2p/transport/webrtc/stream_test.go
@@ -17,7 +17,7 @@ import (
 
 	"github.com/pion/datachannel"
 	"github.com/pion/sctp"
-	"github.com/pion/webrtc/v3"
+	"github.com/pion/webrtc/v4"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
diff --git a/test-plans/go.mod b/test-plans/go.mod
index a320074a..6bd58c0b 100644
--- a/test-plans/go.mod
+++ b/test-plans/go.mod
@@ -67,21 +67,26 @@ require (
 	github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
 	github.com/pion/datachannel v1.5.10 // indirect
 	github.com/pion/dtls/v2 v2.2.12 // indirect
+	github.com/pion/dtls/v3 v3.0.4 // indirect
 	github.com/pion/ice/v2 v2.3.37 // indirect
+	github.com/pion/ice/v4 v4.0.3 // indirect
 	github.com/pion/interceptor v0.1.37 // indirect
 	github.com/pion/logging v0.2.2 // indirect
 	github.com/pion/mdns v0.0.12 // indirect
+	github.com/pion/mdns/v2 v2.0.7 // indirect
 	github.com/pion/randutil v0.1.0 // indirect
 	github.com/pion/rtcp v1.2.15 // indirect
 	github.com/pion/rtp v1.8.10 // indirect
 	github.com/pion/sctp v1.8.35 // indirect
 	github.com/pion/sdp/v3 v3.0.9 // indirect
-	github.com/pion/srtp/v2 v2.0.20 // indirect
+	github.com/pion/srtp/v3 v3.0.4 // indirect
 	github.com/pion/stun v0.6.1 // indirect
+	github.com/pion/stun/v3 v3.0.0 // indirect
 	github.com/pion/transport/v2 v2.2.10 // indirect
 	github.com/pion/transport/v3 v3.0.7 // indirect
 	github.com/pion/turn/v2 v2.1.6 // indirect
-	github.com/pion/webrtc/v3 v3.3.5 // indirect
+	github.com/pion/turn/v4 v4.0.0 // indirect
+	github.com/pion/webrtc/v4 v4.0.7 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/prometheus/client_golang v1.20.5 // indirect
diff --git a/test-plans/go.sum b/test-plans/go.sum
index 7b627986..439614d5 100644
--- a/test-plans/go.sum
+++ b/test-plans/go.sum
@@ -223,32 +223,37 @@ github.com/pion/datachannel v1.5.10/go.mod h1:p/jJfC9arb29W7WrxyKbepTU20CFgyx5oL
 github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
 github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk=
 github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE=
+github.com/pion/dtls/v3 v3.0.4 h1:44CZekewMzfrn9pmGrj5BNnTMDCFwr+6sLH+cCuLM7U=
+github.com/pion/dtls/v3 v3.0.4/go.mod h1:R373CsjxWqNPf6MEkfdy3aSe9niZvL/JaKlGeFphtMg=
 github.com/pion/ice/v2 v2.3.37 h1:ObIdaNDu1rCo7hObhs34YSBcO7fjslJMZV0ux+uZWh0=
 github.com/pion/ice/v2 v2.3.37/go.mod h1:mBF7lnigdqgtB+YHkaY/Y6s6tsyRyo4u4rPGRuOjUBQ=
+github.com/pion/ice/v4 v4.0.3 h1:9s5rI1WKzF5DRqhJ+Id8bls/8PzM7mau0mj1WZb4IXE=
+github.com/pion/ice/v4 v4.0.3/go.mod h1:VfHy0beAZ5loDT7BmJ2LtMtC4dbawIkkkejHPRZNB3Y=
 github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI=
 github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y=
 github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
 github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
 github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8=
 github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk=
+github.com/pion/mdns/v2 v2.0.7 h1:c9kM8ewCgjslaAmicYMFQIde2H9/lrZpjBkN8VwoVtM=
+github.com/pion/mdns/v2 v2.0.7/go.mod h1:vAdSYNAT0Jy3Ru0zl2YiW3Rm/fJCwIeM0nToenfOJKA=
 github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
 github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
-github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4=
 github.com/pion/rtcp v1.2.15 h1:LZQi2JbdipLOj4eBjK4wlVoQWfrZbh3Q6eHtWtJBZBo=
 github.com/pion/rtcp v1.2.15/go.mod h1:jlGuAjHMEXwMUHK78RgX0UmEJFV4zUKOFHR7OP+D3D0=
-github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
 github.com/pion/rtp v1.8.10 h1:puphjdbjPB+L+NFaVuZ5h6bt1g5q4kFIoI+r5q/g0CU=
 github.com/pion/rtp v1.8.10/go.mod h1:8uMBJj32Pa1wwx8Fuv/AsFhn8jsgw+3rUC2PfoBZ8p4=
 github.com/pion/sctp v1.8.35 h1:qwtKvNK1Wc5tHMIYgTDJhfZk7vATGVHhXbUDfHbYwzA=
 github.com/pion/sctp v1.8.35/go.mod h1:EcXP8zCYVTRy3W9xtOF7wJm1L1aXfKRQzaM33SjQlzg=
 github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY=
 github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M=
-github.com/pion/srtp/v2 v2.0.20 h1:HNNny4s+OUmG280ETrCdgFndp4ufx3/uy85EawYEhTk=
-github.com/pion/srtp/v2 v2.0.20/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA=
+github.com/pion/srtp/v3 v3.0.4 h1:2Z6vDVxzrX3UHEgrUyIGM4rRouoC7v+NiF1IHtp9B5M=
+github.com/pion/srtp/v3 v3.0.4/go.mod h1:1Jx3FwDoxpRaTh1oRV8A/6G1BnFL+QI82eK4ms8EEJQ=
 github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4=
 github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8=
+github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw=
+github.com/pion/stun/v3 v3.0.0/go.mod h1:HvCN8txt8mwi4FBvS3EmDghW6aQJ24T+y+1TKjB5jyU=
 github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g=
-github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
 github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
 github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q=
 github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E=
@@ -258,8 +263,10 @@ github.com/pion/transport/v3 v3.0.7/go.mod h1:YleKiTZ4vqNxVwh77Z0zytYi7rXHl7j6uP
 github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
 github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc=
 github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
-github.com/pion/webrtc/v3 v3.3.5 h1:ZsSzaMz/i9nblPdiAkZoP+E6Kmjw+jnyq3bEmU3EtRg=
-github.com/pion/webrtc/v3 v3.3.5/go.mod h1:liNa+E1iwyzyXqNUwvoMRNQ10x8h8FOeJKL8RkIbamE=
+github.com/pion/turn/v4 v4.0.0 h1:qxplo3Rxa9Yg1xXDxxH8xaqcyGUtbHYw4QSCvmFWvhM=
+github.com/pion/turn/v4 v4.0.0/go.mod h1:MuPDkm15nYSklKpN8vWJ9W2M0PlyQZqYt1McGuxG7mA=
+github.com/pion/webrtc/v4 v4.0.7 h1:aeq78uVnFZd2umXW0O9A2VFQYuS7+BZxWetQvSp2jPo=
+github.com/pion/webrtc/v4 v4.0.7/go.mod h1:oFVBBVSHU3vAEwSgnk3BuKCwAUwpDwQhko1EDwyZWbU=
 github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=