27 Commits

Author SHA1 Message Date
Joe Turki
740e5166c5 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-03-27 12:08:37 +02:00
Joe Turki
feeeebf251 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 07:16:06 -06:00
Joe Turk
5edce958fd Include sdpMid and sdpMLineIndex for ICECandidates returned by OneICECandidate (#2990)
#### Description
Currently, Pion returns an empty `sdpMid` and a 0 `sdpMLineIndex`. This
PR ensures Pion returns the corresponding `sdpMid` and `sdpMLineIndex`
for ICE candidates for clients that expects it. Fixes trickle issues.

#### Changes

1. `ICECandidates`: New fields `SDPMid` and `SDPMLineIndex`.
2. `ICEGatherer`: `SetMediaStreamIdentification` and return the correct
`SDPMid` and `SDPMLineIndex`.
3. `extractICEDetails`: Return a struct instead of multiple values.
4. `extractICEDetails` refactored the media description selection to a
different function.
5. Added new tests.

#### Reference issue
Fixes https://github.com/pion/webrtc/issues/2690
Fixes https://github.com/pion/webrtc/issues/1833
2025-01-08 19:08:44 -06:00
Sean DuBois
3aab0355e0 Upgrade dtls, ice, stun and turn
New major version of all packages caused by DTLS upgrade
2024-08-12 13:45:35 -04:00
renovate[bot]
ea23dec2b9 Update module transport, srtp, ice and turn
ReplayDetector introduced a breaking change
2023-09-03 23:59:43 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Steffen Vogel
eafdc7742a Use new pion/transport Net interface
This change adapts pion/ice to use a new interface for most network
related operations. The interface was formerly a simple struct vnet.Net
which was originally intended to facilicate testing. By replacing it
with an interface we have greater flexibility and allow users to hook
into the networking stack by providing their own implementation of
the interface.
2023-02-09 09:39:33 +01:00
mr-shitij
789623a7f7 Update code to be more Go idiomatic
No functional changes
2022-10-31 23:51:17 -04:00
Yoon SeungYong
9509f736be Fix panics in ICEGatherer when it's already closed
ICEGatherer throws panics in GetLocalCandidates(), GetLocalParameters()
when it is already closed. Fix them.

Resolves pion#2261
2022-09-30 09:58:26 -07:00
Sean DuBois
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
Sean DuBois
89c51a156c Rename SettingEngine mDNS Config option
GenerateMulticastDNSCandidates -> SetICEMulticastDNSMode.
Before a user wasn't able to disable mDNS. By changing it we can
do more with this API.
2020-10-05 16:52:21 -07:00
Sean DuBois
bb3aa9717f Move to pion/ice@v2
Removed support for trickle ice

Resolves #1274
2020-06-28 00:01:47 -07:00
Sean DuBois
99c0f8d32c GenerateMulticastDNSCandidates in SettingEngine
Users can now generate MulticastDNS candidates by enabling this option
in the SettingEngine.
2019-12-08 14:15:27 -08:00
Sean DuBois
b5154b499e Only create ICEGather via API
Use values directly from SettingValues instead of just copying
when calling NewICEGatherer. This greatly reduces the LoC and makes
the public API a little cleaner.

Resolves #872
2019-11-21 11:18:05 -08:00
Sean DuBois
2356373aac Fix all routine leaks in tests
Fix tests that didn't properly close and add
test.CheckRoutines everywhere. No changes in pion/webrtc
but we did catch hanging thread in pion/ice
2019-10-24 00:09:43 -07:00
Yutaka Takeda
d4053a8b71 Updates per code reviews
Use ICECandidateType instead of string
Combine two methods to one SetNAT1To1IPs
Resolves #835
2019-09-26 02:15:34 -07:00
Yutaka Takeda
ed185037fa Added tests
Resolves #385
2019-09-26 02:15:34 -07:00
Yutaka Takeda
918412679f Support 1:1 NAT option
Resolves #835
2019-09-26 02:15:34 -07:00
Aaron France
cabbd8b52f Add InterfaceFilter to SettingEngine
This allows users to filter interfaces from ICE gathering

Resolves #843

Co-authored-by: Sean DuBois <sean@siobud.com>
2019-09-25 01:16:17 -07:00
Sebastian Waisbrot
e0aab79044 Support running ICE lite locally and on a remote
* Parse ice-lite property from remote SessionDescription
* Add option to SettingEngine that allows the local ICEAgent to run
  in lite mode
2019-09-12 11:42:16 -07:00
Atsushi Watanabe
16281c0b9e Add ICEGatherer test case
Add a new test for ill-order of OnLocalCandidate.
Before this fix, nil is sent before sending all candidates
8-10 times per 10 tries on my local environment.
2019-08-17 00:49:37 -07:00
Sean DuBois
2838b1a836 Move ICE code out of internal
Users are unable to use the callbacks inside `internal/ice`.
Even though we alias things like OnSelectedCandidatePairChange
are unusable since in the package they use `ice.Candidate` instead of
`ICECandidate`
2019-06-15 01:29:08 -07:00
Adam Kiss
7756848a4c Moved ice related files to internal/ice
Moved ice related files to internal/ice. Added ice.go and
ice_go.go files containing aliases to internal/ice. Added
internal/tools/gen/genaliasdocs.go helper script for generating the
documentation for these aliases. Dropped ice
prefix from file names in internal/ice package.
2019-06-03 10:57:27 -07:00
Adam Kiss
8289a3e7cc Prepare for internal/ice package
Removed SDP dependency from ice files. Exported string to ice enum
functions. Exported ICEServer.Validate.
2019-05-26 14:09:38 +02:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
Alex Browne
34e5a89f71 Add tests for WASM bindings
The tests are run in a Node.js environment, and this does not include
any browser tests. This requires the wrtc package from npm as well as a
shim which adds portions of the WebRTC API to the global scope.

Some tests introduced here can be combined when differences between the
Go API and the WASM bindings are addressed and as missing features are
added to the WASM bindings.

We can and should add more tests in the future to improve test coverage.
This should be considered the minimum number of tests reuqired to ensure
basic functionality is working.
2019-03-15 15:17:51 -07:00
Max Hawkins
0647ce9c26 Remove rtc prefix from filenames
Relates to #408
2019-02-17 16:22:56 -08:00