23 Commits

Author SHA1 Message Date
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
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
Eric Daniels
39c0392295 Support IPv6 from mDNS 2024-03-27 12:47:20 -04:00
cnderrauber
cb8a47ac37 Refine TCPMux memory usage
Reduce read buf of first stun message.
Add timeout to read first message to clean interrupted
connection earlier.
Add alive duration for gather to access connection created
from stun bind, avoid connection leak from malicious client.
2024-02-22 11:37:13 +08:00
renovate[bot]
8d69e9ecd8 Update module github.com/pion/stun to v2
Generated by renovateBot
2023-09-08 14:25:52 -04:00
Steffen Vogel
53beccaed5 Harmonize capitalization of log messages 2023-07-04 05:15:54 +02:00
Steffen Vogel
c596a7cc2b Simplify handling if no TCP mux is configured 2023-04-19 14:40:56 +02:00
Steffen Vogel
f40dd65abb Fix comment capitalization
Comments should start with an uppercase letter.
2023-04-18 19:38:54 +02:00
Steffen Vogel
5ef81b65f4 Make package REUSE compliant 2023-04-18 13:46:38 +02:00
Steffen Vogel
c6c0a15708 Fix new golangci-lint errors 2023-04-12 09:27:03 +02:00
Steffen Vogel
d415139840 Refactor variable names from buffer to buf
Go encourages short names. And a quick
survey through the Pion code bases reveals,
that we have been using buf more often than buffer.
So this change will harmonize the different spellings.
2022-11-13 21:56:24 +01:00
cnderrauber
93980395c8 Fix muxed conn shared by candidate
When we have multiple host candidates and mux to a
single port, if these candidates share a same conn
(either tcp or udp), they might read other's msg
cause ice connection cost long time or failed.
2022-09-26 09:26:23 +08:00
Kevin Caffrey
5475fdb796 Attempt to fix deadlock in TCPMux
Previously `(*TCPMux).RemoveConnByUfrag` would close the connections
while holding its lock, but it is possible for closing to block
and/or take a while.

If closing one of the connections blocks (which was occurring rarely
due to blocking on a channel send), then the entire `TCPMux` would
deadlock and all further operations with the ICE agent would end
up getting blocked due to tying up the task loop.

This change should help matters, but it's unclear if
`(*TCPMux).RemoveConnByUfrag` somehow needs to be made cancelable by
`Agent`'s task context, as there are no guarantees that closing
a connection will happen quickly.
2022-09-17 09:40:57 -04:00
cnderrauber
90dc7280e2 Add nonblock write option to TCPMux
add nonblock write option for sfu broadcast don't want
slow connetion affect other clients.
2022-07-20 14:33:39 +08:00
Steffen Vogel
e32a520e4c Do not use newlines in logging statements
A newline is automatically added by the DefaultLeveledLogger.
The current code-base used a mix of log statements w/o endlines.
This is misleading for custom loggers.
2022-05-08 22:53:42 -04:00
Sean DuBois
fb4760c37b Make TCPMux IPv4/IPv6 aware
TCPMux before would create one internal connection per ufrag. This could
cause remote IPv6 traffic to be dispatched to a local IPv4 handler (or
the inverse). The ice.Agent would then discard the traffic since a
candidate pair must be the same IP version.

This commit now creates two connections per ufrag. When requesting a
connection for a ufrag the user must specify if they want IPv4 or IPv6.

Relates to pion/webrtc#2125
Relates to pion/webrtc#1356
2022-02-21 08:55:50 -05:00
hn8
161b670ac4 Fix duplicate TCP candidates
Duplicate TCP candidates share the same candidateConn,
which would be closed if started before checking.
2021-07-23 10:53:16 -04: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
Sam Lancia
30fd1787bc Fix logging nogo warnings
Fix two nogo warnings on incorrect log format and
error wrapping operator
2020-08-27 19:45:44 -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
1f596427e8 Remove check for ICEControlling for TCP ICE
Closes #249
2020-07-18 23:30:04 -07:00
Jerko Steiner
12f44e93f1 Add support for passive ICE TCP candidate
Closes #196
2020-07-15 07:51:55 +02:00