Skip to content

Commit

Permalink
Update module github.com/pion/ice/v2 to v2.2.6
Browse files Browse the repository at this point in the history
Generated by renovateBot
  • Loading branch information
Sean-Der committed Apr 22, 2022
1 parent 8d816c3 commit a698156
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 64 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/onsi/gomega v1.17.0 // indirect
github.com/pion/datachannel v1.5.2
github.com/pion/dtls/v2 v2.1.3
github.com/pion/ice/v2 v2.2.5
github.com/pion/ice/v2 v2.2.6
github.com/pion/interceptor v0.1.10
github.com/pion/logging v0.2.2
github.com/pion/randutil v0.1.0
Expand All @@ -19,5 +19,6 @@ require (
github.com/pion/transport v0.13.0
github.com/sclevine/agouti v3.0.0+incompatible
github.com/stretchr/testify v1.7.1
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/net v0.0.0-20220401154927-543a649e0bdd
)
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/pion/datachannel v1.5.2 h1:piB93s8LGmbECrpO84DnkIVWasRMk3IimbcXkTQLE6
github.com/pion/datachannel v1.5.2/go.mod h1:FTGQWaHrdCwIJ1rw6xBIfZVkslikjShim5yr05XFuCQ=
github.com/pion/dtls/v2 v2.1.3 h1:3UF7udADqous+M2R5Uo2q/YaP4EzUoWKdfX2oscCUio=
github.com/pion/dtls/v2 v2.1.3/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
github.com/pion/ice/v2 v2.2.5 h1:8ty1lYL6WATcuFI/4J7n0USCezVZf/7gH6E8Bkm1RlY=
github.com/pion/ice/v2 v2.2.5/go.mod h1:SWuHiOGP17lGromHTFadUe1EuPgFh/oCU6FCMZHooVE=
github.com/pion/ice/v2 v2.2.6 h1:R/vaLlI1J2gCx141L5PEwtuGAGcyS6e7E0hDeJFq5Ig=
github.com/pion/ice/v2 v2.2.6/go.mod h1:SWuHiOGP17lGromHTFadUe1EuPgFh/oCU6FCMZHooVE=
github.com/pion/interceptor v0.1.10 h1:DJ2GjMGm4XGIQgMJxuEpdaExdY/6RdngT7Uh4oVmquU=
github.com/pion/interceptor v0.1.10/go.mod h1:Lh3JSl/cbJ2wP8I3ccrjh1K/deRGRn3UlSPuOTiHb6U=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
Expand Down Expand Up @@ -92,8 +92,9 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
Expand Down
49 changes: 24 additions & 25 deletions icegatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,30 @@ func (g *ICEGatherer) createAgent() error {
}

config := &ice.AgentConfig{
Lite: g.api.settingEngine.candidates.ICELite,
Urls: g.validatedServers,
PortMin: g.api.settingEngine.ephemeralUDP.PortMin,
PortMax: g.api.settingEngine.ephemeralUDP.PortMax,
DisconnectedTimeout: g.api.settingEngine.timeout.ICEDisconnectedTimeout,
FailedTimeout: g.api.settingEngine.timeout.ICEFailedTimeout,
KeepaliveInterval: g.api.settingEngine.timeout.ICEKeepaliveInterval,
LoggerFactory: g.api.settingEngine.LoggerFactory,
CandidateTypes: candidateTypes,
HostAcceptanceMinWait: g.api.settingEngine.timeout.ICEHostAcceptanceMinWait,
SrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICESrflxAcceptanceMinWait,
PrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICEPrflxAcceptanceMinWait,
RelayAcceptanceMinWait: g.api.settingEngine.timeout.ICERelayAcceptanceMinWait,
InterfaceFilter: g.api.settingEngine.candidates.InterfaceFilter,
NAT1To1IPs: g.api.settingEngine.candidates.NAT1To1IPs,
NAT1To1IPCandidateType: nat1To1CandiTyp,
Net: g.api.settingEngine.vnet,
MulticastDNSMode: mDNSMode,
MulticastDNSHostName: g.api.settingEngine.candidates.MulticastDNSHostName,
LocalUfrag: g.api.settingEngine.candidates.UsernameFragment,
LocalPwd: g.api.settingEngine.candidates.Password,
TCPMux: g.api.settingEngine.iceTCPMux,
UDPMux: g.api.settingEngine.iceUDPMux,
ProxyDialer: g.api.settingEngine.iceProxyDialer,
AcceptAggressiveNomination: g.api.settingEngine.candidates.AcceptAggressiveNomination,
Lite: g.api.settingEngine.candidates.ICELite,
Urls: g.validatedServers,
PortMin: g.api.settingEngine.ephemeralUDP.PortMin,
PortMax: g.api.settingEngine.ephemeralUDP.PortMax,
DisconnectedTimeout: g.api.settingEngine.timeout.ICEDisconnectedTimeout,
FailedTimeout: g.api.settingEngine.timeout.ICEFailedTimeout,
KeepaliveInterval: g.api.settingEngine.timeout.ICEKeepaliveInterval,
LoggerFactory: g.api.settingEngine.LoggerFactory,
CandidateTypes: candidateTypes,
HostAcceptanceMinWait: g.api.settingEngine.timeout.ICEHostAcceptanceMinWait,
SrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICESrflxAcceptanceMinWait,
PrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICEPrflxAcceptanceMinWait,
RelayAcceptanceMinWait: g.api.settingEngine.timeout.ICERelayAcceptanceMinWait,
InterfaceFilter: g.api.settingEngine.candidates.InterfaceFilter,
NAT1To1IPs: g.api.settingEngine.candidates.NAT1To1IPs,
NAT1To1IPCandidateType: nat1To1CandiTyp,
Net: g.api.settingEngine.vnet,
MulticastDNSMode: mDNSMode,
MulticastDNSHostName: g.api.settingEngine.candidates.MulticastDNSHostName,
LocalUfrag: g.api.settingEngine.candidates.UsernameFragment,
LocalPwd: g.api.settingEngine.candidates.Password,
TCPMux: g.api.settingEngine.iceTCPMux,
UDPMux: g.api.settingEngine.iceUDPMux,
ProxyDialer: g.api.settingEngine.iceProxyDialer,
}

requestedNetworkTypes := g.api.settingEngine.candidates.ICENetworkTypes
Expand Down
26 changes: 9 additions & 17 deletions settingengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ type SettingEngine struct {
ICERelayAcceptanceMinWait *time.Duration
}
candidates struct {
ICELite bool
ICENetworkTypes []NetworkType
InterfaceFilter func(string) bool
NAT1To1IPs []string
NAT1To1IPCandidateType ICECandidateType
MulticastDNSMode ice.MulticastDNSMode
MulticastDNSHostName string
UsernameFragment string
Password string
AcceptAggressiveNomination bool
ICELite bool
ICENetworkTypes []NetworkType
InterfaceFilter func(string) bool
NAT1To1IPs []string
NAT1To1IPCandidateType ICECandidateType
MulticastDNSMode ice.MulticastDNSMode
MulticastDNSHostName string
UsernameFragment string
Password string
}
replayProtection struct {
DTLS *uint
Expand Down Expand Up @@ -230,13 +229,6 @@ func (e *SettingEngine) SetICECredentials(usernameFragment, password string) {
e.candidates.Password = password
}

// SetICEAcceptAggressiveNomination sets the Ice agent to accept aggressive nomination
//
// This is useful for compatible with chrome and other browser use aggressive nomination to update nominate candidate pairs
func (e *SettingEngine) SetICEAcceptAggressiveNomination(acceptAggressiveNomination bool) {
e.candidates.AcceptAggressiveNomination = acceptAggressiveNomination
}

// DisableCertificateFingerprintVerification disables fingerprint verification after DTLS Handshake has finished
func (e *SettingEngine) DisableCertificateFingerprintVerification(isDisabled bool) {
e.disableCertificateFingerprintVerification = isDisabled
Expand Down
18 changes: 0 additions & 18 deletions settingengine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,3 @@ func TestSetDTLSRetransmissionInterval(t *testing.T) {
t.Errorf("Failed to set DTLS retransmission interval")
}
}

func TestSetICEAcceptAggressiveNomination(t *testing.T) {
s := SettingEngine{}

if s.candidates.AcceptAggressiveNomination != false {
t.Fatalf("SettingEngine AcceptAggressiveNomination defaults aren't as expected.")
}

s.SetICEAcceptAggressiveNomination(true)
if s.candidates.AcceptAggressiveNomination != true {
t.Errorf("Failed to set ICE accept aggressive nomination")
}

s.SetICEAcceptAggressiveNomination(false)
if s.candidates.AcceptAggressiveNomination != false {
t.Errorf("Failed to set ICE accept aggressive nomination")
}
}

0 comments on commit a698156

Please sign in to comment.