Commit Graph
47 Commits
Author SHA1 Message Date
renovate[bot]andSean DuBois 8d69e9ecd8 Update module github.com/pion/stun to v2
Generated by renovateBot
2023-09-08 14:25:52 -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
db5d7ea72b Implement Active ICE TCP Candidates
Co-authored-by: Steffen Vogel <post@steffenvogel.de>
Co-authored-by: Artur Shellunts <shellunts.artur@gmail.com>
2023-06-15 21:44:21 -04:00
Sean DuBois abc1ca33b5 Revert active TCP candidate support
This reverts commit 00bbd2954c
and 1d502ca6ec
2023-05-24 00:05:44 -04:00
Steffen Vogel 00bbd2954c Minor style fixes for active TCP candidate support 2023-05-16 20:07:39 +02:00
Artur ShelluntsandGitHub 1d502ca6ec Implement active TCP candidate type (RFC6544)
By default TCP candidate type priority is UDP one minus 27 (except
relay), so that UDP+srlfx priority > TCP+host priority. That priority
offset can be configured using AgentConfig.
IPv6 TCP candidates are also supported.
2023-05-15 22:41:52 +02:00
San9H0andSteffen Vogel f07b6d16ad Add RemoteCandidateCache for better performance
Check sourceAddress from first packet validation of STUNTraffic.
If validation is true, store it in the cache.
Use cache for performance.
2023-04-18 19:20:52 +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
Miroslav ŠedivýandSteffen Vogel d99a6fcb7c Return ErrClosedPipe for writeTo
Return ErrClosedPipe for writeTo
2023-01-12 22:09:12 +01:00
GenteureandSteffen Vogel 3fe1ae7c2b Fix IPv6 formatting in Candidate.String()
A Candidate with IPv6 address was formatted similar to fe80::1:51820
net.JoinHostPort will add [ ] around the address if it's IPv6,
so it would look like [fe80::1]:51820 instead.
2023-01-12 18:40:14 +01:00
Steffen Vogel f87e3be545 Do not show a warning for closed connections
Do not show a warning for closed connections
2022-11-16 09:52:12 +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
Steffen Vogel 85bda0bf6c Refactor and simplify handleInboundCandidateMsg()
There is only a single location in the code calling
handleInboundCandidateMsg(). Hence it makes sense to turn it into
a receiver function.
2022-11-13 21:56:24 +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
cnderrauberandcnderrauber 8c1adf18f1 Change writeTo failed log level to info
In #252 decide to ignore the writeTo failed error with a log,
application can choose callback and query state for the connection
state. But if application keep sending packet during try icerestart
to recover from ICEFailed, the warn log is annoying since the error
is not critical and no need to process. So change it to info.
2022-10-19 10:32:32 +08:00
PionandSean DuBois 16e03db8f8 Update CI configs to v0.7.2
Update lint scripts and CI configs.
2022-04-26 23:27:21 -04:00
Sean DuBois bdb23b0bf4 Improve parsing candidates with missing Foundation
Support missing foundation candidates with additional attributes

Resolves #390
2021-12-25 22:53:35 -05:00
Sean DuBois bc26832ad7 Support parsing candidates with missing Foundation
Not RFC 8445 compliant but are currently emitted by Google.

Resolves #390
2021-12-15 23:12:09 -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
Sean DuBois 6d30128765 Revert "Remove unknown constant"
We will re-do this in the future, but need to keep it for a major
release.

Resolves #385
2021-08-11 13:09:13 -04:00
Woodrow DouglassandSean DuBois 366757d59d Remove unknown constant
This constant tends to cause collisions with enumerations, and is
in general a source of bugs
2021-08-10 15:51:40 -04:00
Meelap ShahandSean DuBois 1b533aee68 Populate RelayProtocol for relay candidates
The webrtc-stats spec defines this field as:
> It is the protocol used by the endpoint to communicate with the TURN
> server. This is only present for local candidates. Valid values are
> "udp", "tcp", or "tls".
https://w3.org/TR/webrtc-stats/#dom-rtcicecandidatestats-relayprotocol
2021-07-20 16:05:57 -04:00
Sean DuBois 6e4403794a Implement GetSelectedCandidatePair
Related to pion/webrtc#1713
2021-04-10 16:52:52 -07:00
Sean DuBois e0312efe33 Fix candidateBase Marshal receiver type
Should be a pointer, not a value. Copying the atomics was causing a
race

Resolves #307
2020-11-28 21:47:14 -08:00