mirror of
https://github.com/pion/webrtc.git
synced 2025-10-28 09:41:35 +08:00
Update module github.com/pion/ice/v2 to v2.3.24
Generated by renovateBot
This commit is contained in:
committed by
Sean DuBois
parent
e7cf3ba869
commit
7cad104f43
2
go.mod
2
go.mod
@@ -5,7 +5,7 @@ go 1.17
|
|||||||
require (
|
require (
|
||||||
github.com/pion/datachannel v1.5.5
|
github.com/pion/datachannel v1.5.5
|
||||||
github.com/pion/dtls/v2 v2.2.7
|
github.com/pion/dtls/v2 v2.2.7
|
||||||
github.com/pion/ice/v2 v2.3.15
|
github.com/pion/ice/v2 v2.3.24
|
||||||
github.com/pion/interceptor v0.1.25
|
github.com/pion/interceptor v0.1.25
|
||||||
github.com/pion/logging v0.2.2
|
github.com/pion/logging v0.2.2
|
||||||
github.com/pion/randutil v0.1.0
|
github.com/pion/randutil v0.1.0
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -42,8 +42,8 @@ github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew
|
|||||||
github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0=
|
github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0=
|
||||||
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
|
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
|
||||||
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
|
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
|
||||||
github.com/pion/ice/v2 v2.3.15 h1:oCGVqnd6OWmJr4I6eQwSWn8VJDF45wIXFTjV3tyyris=
|
github.com/pion/ice/v2 v2.3.24 h1:RYgzhH/u5lH0XO+ABatVKCtRd+4U1GEaCXSMjNr13tI=
|
||||||
github.com/pion/ice/v2 v2.3.15/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw=
|
github.com/pion/ice/v2 v2.3.24/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw=
|
||||||
github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc=
|
github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc=
|
||||||
github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y=
|
github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y=
|
||||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ func (g *ICEGatherer) createAgent() error {
|
|||||||
UDPMux: g.api.settingEngine.iceUDPMux,
|
UDPMux: g.api.settingEngine.iceUDPMux,
|
||||||
ProxyDialer: g.api.settingEngine.iceProxyDialer,
|
ProxyDialer: g.api.settingEngine.iceProxyDialer,
|
||||||
DisableActiveTCP: g.api.settingEngine.iceDisableActiveTCP,
|
DisableActiveTCP: g.api.settingEngine.iceDisableActiveTCP,
|
||||||
|
BindingRequestHandler: g.api.settingEngine.iceBindingRequestHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
|
requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
dtlsElliptic "github.com/pion/dtls/v2/pkg/crypto/elliptic"
|
dtlsElliptic "github.com/pion/dtls/v2/pkg/crypto/elliptic"
|
||||||
"github.com/pion/ice/v2"
|
"github.com/pion/ice/v2"
|
||||||
"github.com/pion/logging"
|
"github.com/pion/logging"
|
||||||
|
"github.com/pion/stun"
|
||||||
"github.com/pion/transport/v2"
|
"github.com/pion/transport/v2"
|
||||||
"github.com/pion/transport/v2/packetio"
|
"github.com/pion/transport/v2/packetio"
|
||||||
"github.com/pion/transport/v2/vnet"
|
"github.com/pion/transport/v2/vnet"
|
||||||
@@ -89,6 +90,7 @@ type SettingEngine struct {
|
|||||||
iceUDPMux ice.UDPMux
|
iceUDPMux ice.UDPMux
|
||||||
iceProxyDialer proxy.Dialer
|
iceProxyDialer proxy.Dialer
|
||||||
iceDisableActiveTCP bool
|
iceDisableActiveTCP bool
|
||||||
|
iceBindingRequestHandler func(m *stun.Message, local, remote ice.Candidate, pair *ice.CandidatePair) bool
|
||||||
disableMediaEngineCopy bool
|
disableMediaEngineCopy bool
|
||||||
srtpProtectionProfiles []dtls.SRTPProtectionProfile
|
srtpProtectionProfiles []dtls.SRTPProtectionProfile
|
||||||
receiveMTU uint
|
receiveMTU uint
|
||||||
@@ -442,3 +444,12 @@ func (e *SettingEngine) SetSCTPMaxReceiveBufferSize(maxReceiveBufferSize uint32)
|
|||||||
func (e *SettingEngine) EnableSCTPZeroChecksum(isEnabled bool) {
|
func (e *SettingEngine) EnableSCTPZeroChecksum(isEnabled bool) {
|
||||||
e.sctp.enableZeroChecksum = isEnabled
|
e.sctp.enableZeroChecksum = isEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetICEBindingRequestHandler sets a callback that is fired on a STUN BindingRequest
|
||||||
|
// This allows users to do things like
|
||||||
|
// - Log incoming Binding Requests for debugging
|
||||||
|
// - Implement draft-thatcher-ice-renomination
|
||||||
|
// - Implement custom CandidatePair switching logic
|
||||||
|
func (e *SettingEngine) SetICEBindingRequestHandler(bindingRequestHandler func(m *stun.Message, local, remote ice.Candidate, pair *ice.CandidatePair) bool) {
|
||||||
|
e.iceBindingRequestHandler = bindingRequestHandler
|
||||||
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pion/dtls/v2/pkg/crypto/elliptic"
|
"github.com/pion/dtls/v2/pkg/crypto/elliptic"
|
||||||
|
"github.com/pion/ice/v2"
|
||||||
|
"github.com/pion/stun"
|
||||||
"github.com/pion/transport/v2/test"
|
"github.com/pion/transport/v2/test"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
@@ -269,3 +271,32 @@ func TestSetSCTPMaxReceiverBufferSize(t *testing.T) {
|
|||||||
s.SetSCTPMaxReceiveBufferSize(expSize)
|
s.SetSCTPMaxReceiveBufferSize(expSize)
|
||||||
assert.Equal(t, expSize, s.sctp.maxReceiveBufferSize)
|
assert.Equal(t, expSize, s.sctp.maxReceiveBufferSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestSetICEBindingRequestHandler(t *testing.T) {
|
||||||
|
seenICEControlled, seenICEControlledCancel := context.WithCancel(context.Background())
|
||||||
|
seenICEControlling, seenICEControllingCancel := context.WithCancel(context.Background())
|
||||||
|
|
||||||
|
s := SettingEngine{}
|
||||||
|
s.SetICEBindingRequestHandler(func(m *stun.Message, _, _ ice.Candidate, _ *ice.CandidatePair) bool {
|
||||||
|
for _, a := range m.Attributes {
|
||||||
|
switch a.Type {
|
||||||
|
case stun.AttrICEControlled:
|
||||||
|
seenICEControlledCancel()
|
||||||
|
case stun.AttrICEControlling:
|
||||||
|
seenICEControllingCancel()
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
|
pcOffer, pcAnswer, err := NewAPI(WithSettingEngine(s)).newPair(Configuration{})
|
||||||
|
assert.NoError(t, err)
|
||||||
|
|
||||||
|
assert.NoError(t, signalPair(pcOffer, pcAnswer))
|
||||||
|
|
||||||
|
<-seenICEControlled.Done()
|
||||||
|
<-seenICEControlling.Done()
|
||||||
|
closePairNow(t, pcOffer, pcAnswer)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user