37 Commits

Author SHA1 Message Date
Zoltan Papp 426799a231 Update to the latest upstream version (#4) 2025-08-27 18:19:42 +02: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
Jerko Steiner 3b9a989177 Remove global state for ICE TCP
This addresses a few points issue of #245:

 - Take a net.Listener instead of having global state
 - Expose a net.TCPMux based API

Also, the unused closeChannel was removed from tcp_mux.go

Closes #253.
2020-08-01 09:28:28 +02:00
Jerko Steiner 12f44e93f1 Add support for passive ICE TCP candidate
Closes #196
2020-07-15 07:51:55 +02:00
Sean DuBois 3b47033146 Remove non-trickle ICE
pion/webrtc@v3 will be trickle by default, so removing
support from here.  Users can easily simulate non-trickle
by setting a OnICECandidate callback.

This just reduces the amount of things we need to test/worry about.
2020-06-25 00:16:58 -07:00
Sean DuBois 5cab987ca4 Add an additional done to Agent.run
Callers of run need to be able to cancel their waiting individually.
This would cause hung threads during restart if we attempted to close
a candidate while processing a packet for it.

Before the run would be canceled by the global close, but we can't
depend on that anymore.

Resolves #190
2020-06-25 00:16:58 -07:00
Sean DuBois f195edb4c1 Implement SetRemoteCredentials and Restart
Add simple tests that check it works E2E

Resolves #190
2020-06-25 00:16:58 -07:00