Repository: pion/ice
Pull request #619 (2023-09-05 16:47:48)

Update module github.com/pion/stun to v2
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/pion/stun](https://togithub.com/pion/stun) | require | major | `v0.6.1` -> `v2.0.0` |

---

### Release Notes

<details>
<summary>pion/stun (github.com/pion/stun)</summary>

### [`v2.0.0`](https://togithub.com/pion/stun/releases/tag/v2.0.0)

[Compare Source](https://togithub.com/pion/stun/compare/v0.6.1...v2.0.0)

#### Changelog

-   [`4ff55da`](https://togithub.com/pion/stun/commit/4ff55da) Start pion/stun@v2
-   [`26873a1`](https://togithub.com/pion/stun/commit/26873a1) Update module github.com/pion/transport/v2 to v3
-   [`d1f1ac8`](https://togithub.com/pion/stun/commit/d1f1ac8) Update module github.com/pion/transport/v2 to v2.2.2
-   [`ba204e8`](https://togithub.com/pion/stun/commit/ba204e8) Update CI configs to v0.10.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/pion/ice).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/pion/ice/pull/619?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) Report
Patch has no changes to coverable lines.



:loudspeaker: Thoughts on this report? [Let us know!](https://about.codecov.io/pull-request-comment-report/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion).


Patch:
diff --git a/agent.go b/agent.go
index 6fb7ebb..8c43573 100644
--- a/agent.go
+++ b/agent.go
@@ -19,7 +19,7 @@ import (
 	stunx "github.com/pion/ice/v3/internal/stun"
 	"github.com/pion/logging"
 	"github.com/pion/mdns"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3"
 	"github.com/pion/transport/v3/packetio"
 	"github.com/pion/transport/v3/stdnet"
diff --git a/agent_config.go b/agent_config.go
index ad90918..6877313 100644
--- a/agent_config.go
+++ b/agent_config.go
@@ -8,7 +8,7 @@ import (
 	"time"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3"
 	"golang.org/x/net/proxy"
 )
diff --git a/candidate_base.go b/candidate_base.go
index 6319940..dad95d2 100644
--- a/candidate_base.go
+++ b/candidate_base.go
@@ -15,7 +15,7 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 type candidateBase struct {
diff --git a/candidatepair.go b/candidatepair.go
index bd7fa42..3041da1 100644
--- a/candidatepair.go
+++ b/candidatepair.go
@@ -6,7 +6,7 @@ package ice
 import (
 	"fmt"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 func newCandidatePair(local, remote Candidate, controlling bool) *CandidatePair {
diff --git a/gather.go b/gather.go
index cf7b65a..8d2ce62 100644
--- a/gather.go
+++ b/gather.go
@@ -17,7 +17,7 @@ import (
 	"github.com/pion/ice/v3/internal/fakenet"
 	stunx "github.com/pion/ice/v3/internal/stun"
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/turn/v3"
 )
 
diff --git a/go.mod b/go.mod
index 01c9727..333bf49 100644
--- a/go.mod
+++ b/go.mod
@@ -9,9 +9,9 @@ require (
 	github.com/pion/logging v0.2.2
 	github.com/pion/mdns v0.0.8
 	github.com/pion/randutil v0.1.0
-	github.com/pion/stun v0.6.1
+	github.com/pion/stun/v2 v2.0.0
 	github.com/pion/transport/v3 v3.0.1
-	github.com/pion/turn/v3 v3.0.0
+	github.com/pion/turn/v3 v3.0.1
 	github.com/stretchr/testify v1.8.4
 	golang.org/x/net v0.14.0
 	gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
diff --git a/go.sum b/go.sum
index 0e2061c..82fb0cb 100644
--- a/go.sum
+++ b/go.sum
@@ -16,15 +16,14 @@ github.com/pion/mdns v0.0.8 h1:HhicWIg7OX5PVilyBO6plhMetInbzkVJAhbdJiAeVaI=
 github.com/pion/mdns v0.0.8/go.mod h1:hYE72WX8WDveIhg7fmXgMKivD3Puklk0Ymzog0lSyaI=
 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/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4=
-github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8=
+github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0=
+github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ=
 github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c=
 github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g=
-github.com/pion/transport/v3 v3.0.0/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0=
 github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM=
 github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0=
-github.com/pion/turn/v3 v3.0.0 h1:zafXa25ZWmiUYRi4JlnAsUhCDoFfF7YMYWnosvK5vBk=
-github.com/pion/turn/v3 v3.0.0/go.mod h1:z4ih3T0zTERgNSEJRa2QHBNcbB3SOtTYsr5LH0pil6Q=
+github.com/pion/turn/v3 v3.0.1 h1:wLi7BTQr6/Q20R0vt/lHbjv6y4GChFtC33nkYbasoT8=
+github.com/pion/turn/v3 v3.0.1/go.mod h1:MrJDKgqryDyWy1/4NT9TWfXWGMC7UHT6pJIv1+gMeNE=
 github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
diff --git a/icecontrol.go b/icecontrol.go
index b086bd8..82ed098 100644
--- a/icecontrol.go
+++ b/icecontrol.go
@@ -6,7 +6,7 @@ package ice
 import (
 	"encoding/binary"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 // tiebreaker is common helper for ICE-{CONTROLLED,CONTROLLING}
diff --git a/internal/stun/stun.go b/internal/stun/stun.go
index 230cf85..2b05f50 100644
--- a/internal/stun/stun.go
+++ b/internal/stun/stun.go
@@ -10,7 +10,7 @@ import (
 	"net"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 var (
diff --git a/priority.go b/priority.go
index 16ac5cc..13689fb 100644
--- a/priority.go
+++ b/priority.go
@@ -6,7 +6,7 @@ package ice
 import (
 	"encoding/binary"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 // PriorityAttr represents PRIORITY attribute.
diff --git a/selection.go b/selection.go
index f854581..e6e1fac 100644
--- a/selection.go
+++ b/selection.go
@@ -8,7 +8,7 @@ import (
 	"time"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 type pairCandidateSelector interface {
diff --git a/tcp_mux.go b/tcp_mux.go
index df169be..9b75fa6 100644
--- a/tcp_mux.go
+++ b/tcp_mux.go
@@ -12,7 +12,7 @@ import (
 	"sync"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 // ErrGetTransportAddress can't convert net.Addr to underlying type (UDPAddr or TCPAddr).
diff --git a/transport.go b/transport.go
index 93dc719..d8b1a6e 100644
--- a/transport.go
+++ b/transport.go
@@ -9,7 +9,7 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 // Dial connects to the remote agent, acting as the controlling ice agent.
diff --git a/udp_mux.go b/udp_mux.go
index e9c906c..cf01537 100644
--- a/udp_mux.go
+++ b/udp_mux.go
@@ -12,7 +12,7 @@ import (
 	"sync"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3"
 	"github.com/pion/transport/v3/stdnet"
 )
diff --git a/udp_mux_universal.go b/udp_mux_universal.go
index 4387193..e7d9004 100644
--- a/udp_mux_universal.go
+++ b/udp_mux_universal.go
@@ -9,7 +9,7 @@ import (
 	"time"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3"
 )
 
diff --git a/url.go b/url.go
index b2b9f8b..50d354a 100644
--- a/url.go
+++ b/url.go
@@ -3,7 +3,7 @@
 
 package ice
 
-import "github.com/pion/stun"
+import "github.com/pion/stun/v2"
 
 type (
 	// URL represents a STUN (rfc7064) or TURN (rfc7065) URI
diff --git a/usecandidate.go b/usecandidate.go
index 6fc7ed5..b5c489a 100644
--- a/usecandidate.go
+++ b/usecandidate.go
@@ -3,7 +3,7 @@
 
 package ice
 
-import "github.com/pion/stun"
+import "github.com/pion/stun/v2"
 
 // UseCandidateAttr represents USE-CANDIDATE attribute.
 type UseCandidateAttr struct{}


Test patch:
diff --git a/agent_test.go b/agent_test.go
index 983c808..291df4d 100644
--- a/agent_test.go
+++ b/agent_test.go
@@ -17,7 +17,7 @@ import (
 
 	"github.com/pion/ice/v3/internal/fakenet"
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/transport/v3/vnet"
 	"github.com/stretchr/testify/assert"
diff --git a/candidate_relay_test.go b/candidate_relay_test.go
index a40c398..b022671 100644
--- a/candidate_relay_test.go
+++ b/candidate_relay_test.go
@@ -12,7 +12,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/turn/v3"
 	"github.com/stretchr/testify/assert"
diff --git a/candidate_server_reflexive_test.go b/candidate_server_reflexive_test.go
index d2ea53b..236ab03 100644
--- a/candidate_server_reflexive_test.go
+++ b/candidate_server_reflexive_test.go
@@ -12,7 +12,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/turn/v3"
 	"github.com/stretchr/testify/assert"
diff --git a/connectivity_vnet_test.go b/connectivity_vnet_test.go
index ccacc5b..b70acee 100644
--- a/connectivity_vnet_test.go
+++ b/connectivity_vnet_test.go
@@ -15,7 +15,7 @@ import (
 	"time"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/transport/v3/vnet"
 	"github.com/pion/turn/v3"
diff --git a/gather_test.go b/gather_test.go
index 32af2ea..07e31c9 100644
--- a/gather_test.go
+++ b/gather_test.go
@@ -23,7 +23,7 @@ import (
 	"github.com/pion/dtls/v2"
 	"github.com/pion/dtls/v2/pkg/crypto/selfsign"
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/turn/v3"
 	"github.com/stretchr/testify/assert"
diff --git a/gather_vnet_test.go b/gather_vnet_test.go
index e4040ee..5410bc2 100644
--- a/gather_vnet_test.go
+++ b/gather_vnet_test.go
@@ -14,7 +14,7 @@ import (
 	"testing"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/transport/v3/vnet"
 	"github.com/stretchr/testify/assert"
diff --git a/icecontrol_test.go b/icecontrol_test.go
index fbf46cc..80a22de 100644
--- a/icecontrol_test.go
+++ b/icecontrol_test.go
@@ -7,7 +7,7 @@ import (
 	"errors"
 	"testing"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 func TestControlled_GetFrom(t *testing.T) { //nolint:dupl
diff --git a/priority_test.go b/priority_test.go
index df31e0b..ea76272 100644
--- a/priority_test.go
+++ b/priority_test.go
@@ -7,7 +7,7 @@ import (
 	"errors"
 	"testing"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 func TestPriority_GetFrom(t *testing.T) { //nolint:dupl
diff --git a/tcp_mux_multi_test.go b/tcp_mux_multi_test.go
index f394273..291a29d 100644
--- a/tcp_mux_multi_test.go
+++ b/tcp_mux_multi_test.go
@@ -12,7 +12,7 @@ import (
 	"testing"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
diff --git a/tcp_mux_test.go b/tcp_mux_test.go
index 7a7cab0..def5a99 100644
--- a/tcp_mux_test.go
+++ b/tcp_mux_test.go
@@ -9,7 +9,7 @@ import (
 	"testing"
 
 	"github.com/pion/logging"
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
diff --git a/transport_test.go b/transport_test.go
index 16011d1..e11ba37 100644
--- a/transport_test.go
+++ b/transport_test.go
@@ -13,7 +13,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 )
 
diff --git a/transport_vnet_test.go b/transport_vnet_test.go
index 07fda4d..e9e0ffc 100644
--- a/transport_vnet_test.go
+++ b/transport_vnet_test.go
@@ -12,7 +12,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/pion/transport/v3/vnet"
 	"github.com/stretchr/testify/assert"
diff --git a/udp_mux_test.go b/udp_mux_test.go
index 07a78fc..01f52c5 100644
--- a/udp_mux_test.go
+++ b/udp_mux_test.go
@@ -15,7 +15,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/pion/transport/v3/test"
 	"github.com/stretchr/testify/require"
 )
diff --git a/udp_mux_universal_test.go b/udp_mux_universal_test.go
index 4536a0d..ec8de2e 100644
--- a/udp_mux_universal_test.go
+++ b/udp_mux_universal_test.go
@@ -12,7 +12,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 	"github.com/stretchr/testify/require"
 )
 
diff --git a/usecandidate_test.go b/usecandidate_test.go
index dfe0284..1dc48ee 100644
--- a/usecandidate_test.go
+++ b/usecandidate_test.go
@@ -6,7 +6,7 @@ package ice
 import (
 	"testing"
 
-	"github.com/pion/stun"
+	"github.com/pion/stun/v2"
 )
 
 func TestUseCandidateAttr_AddTo(t *testing.T) {