42 Commits

Author SHA1 Message Date
Sean DuBois f32c107a62 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-04-22 23:36:32 -04:00
Joe Turki cad1676659 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-17 08:21:15 -06:00
Joe Turki ab6e243686 Parse Candidate Extensions (RFC5245)
- Rewrote `UnmarshalCandidate` to better align with RFC5245.
- Added Candidate `Extensions` and `GetExtension`.
- Updated `Equal` and `Marshal` to accommodate these changes.
- New Type `CandidateExtension` to handle.
2025-01-15 21:38:13 -06:00
Sean DuBois 39c90d8419 Upgrade dtls, turn and sturn
New major version of dtls causes API breaks on three packages
2024-08-12 11:43:44 -04:00
Sean DuBois abf50f9c34 Don't allocate new error inside TaskLoop
Libraries use errors.Is to catch this error. Allocating a new one inside
internal breaks that
2024-07-25 10:22:51 -05:00
sebapeti 66051b6877 Improve performance of UDPMux map lookups
UDPMux is using a map to lookup addresses of each packets.
Unfortunately the key is based on a string and each time we
want to check the map, a conversion of the UDP address to string
is made (.String()) which is expensive.

This CR replace the string key by a binary key called ipPort. This
structure contains a netip.Addr field and ipPort could be used as
a map key
2024-03-25 12:48:50 -04:00
Steffen Vogel 8d14c1f2e7 Harmonize errors and error logging
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2023-07-18 07:48:09 +02:00
Steffen Vogel ca9de18fd6 Move URL type to pion/stun.URI 2023-05-10 16:33:20 +02:00
Steffen Vogel 8b166270df Fix capitalization of acronyms like UDP, TCP, STUN 2023-04-20 22:15:07 +02:00
Steffen Vogel c596a7cc2b Simplify handling if no TCP mux is configured 2023-04-19 14:40:56 +02:00
Steffen Vogel 5ef81b65f4 Make package REUSE compliant 2023-04-18 13:46:38 +02:00
Steffen Vogel 67f28cf23a Move util.go to more appropriately named files
Move util.go to more appropriately named files
2023-02-10 22:48:36 +01:00
Steffen Vogel fdfe34ab7b Harmonize capitalization of variable names
As most variable names are using camelCase.
2022-11-13 21:56:24 +01:00
Will Forcey 9ab8f71673 Cancel previous gathering routine on restart
Updated ICE agent restart method to cancel the
current gathering and then restart the candidate
gathering process.
2022-11-12 15:49:20 +01:00
cnderrauber 227b290b77 Solve comments and clean code
Solve comments and clean code
2022-10-10 20:22:30 +08:00
cnderrauber a70c38101c Fix lint for unused and duplicate code
Fix lint for unused and duplicate code
2022-10-10 20:22:30 +08:00
cnderrauber 04a6027e93 Use MultiUDPMux to implement listen any address
In #475, import low-level API (ReadMsgUDP) to determine
destination interface for packets received by UDPConn listen
at any(unspecified) address, to fix msg received by incorrect
candidate that shared same ufrags. But the api has compatibility
issues, also not reliable in some special network cases like
AWS/ECS.
So this pr revert that change, and make UDPMuxDefault not
accept Conn listen at unspecified address. Also provide a
NewMultiUDPMuxFromPort helper function to create a MultiUDPMux
to listen at all addresses.
For ice gather, it will use UDPMux's listen address to generate
canidates instead of create it from interfaces.
2022-10-10 20:22:30 +08:00
Kevin Caffrey 169ff6a7b4 Add multi-port wrappers for UDPMux and TCPMux
These wrappers allow a caller to provide UDPMux and TCPMux instances
to the ICE agent that represent multiple open ports. This can be
desirable in what would otherwise be single-port deployments, as it
increases the chance that one of the fixed ports will not be blocked
by a users firewall.
2022-09-12 15:30:42 -04:00
Kacper Bąk 6ff52a9264 Fix typo in error comment
passoword -> password
2022-05-11 12:57:26 -04:00
Mikhail Bragin 2d70ec8e3c Support UDP muxing for SRFLX candidates
The original UDPMux only works for the HOST candidates.
UniversalUDPMux adds support for SRFLX candidates
and will later support Relay candidates.
UniversalUDPMux embeds UDPMuxDefault and
handles STUN server packets to discover XORMappedAddr
forwarding the remaining packets for muxing to UDPMuxDefault.
2022-02-20 12:29:29 -08:00
Sean DuBois b897e71a59 Expose ErrDetermineNetworkType
Expose this error so pion/webrtc can handle gracefully.
rfc8839#section-5.1 specifies that a WebRTC Agent MUST
ignore any name/value pairs it doesn't understand.

Relates to pion/webrtc#1949
2021-12-15 15:51:34 -05:00
Sean DuBois e9caba4e03 Expose ErrUnknownCandidateTyp
Expose this error so pion/webrtc can handle gracefully.
rfc8839#section-5.1 specifies that a WebRTC Agent MUST
ignore any name/value pairs it doesn't understand.

Relates to pion/webrtc#1949
2021-12-15 12:18:08 -05:00
David Zhao c4d5d1c670 Bypass other host candidates with UDPMux
Separate candidate gathering when UDPMux is enabled.
Only a single UDP host candidate should be generated
that points to the mux.
2021-04-25 14:07:45 -07:00
David Zhao 86d69d6ce5 Single port handling via UDPMux
Allows for ICE to handle connections on a single UDP port
2021-04-12 20:42:10 -07:00
Pion d3e1775d73 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-26 08:54:24 -07:00