mirror of
https://github.com/pion/ice.git
synced 2026-04-22 16:17:11 +08:00
v4.2.2
## Summary
This change makes transport/network-type handling consistent across
candidate gathering and remote candidate admission.
It fixes cases where the ICE agent could use STUN/TURN URLs with
mismatched transport or accept remote candidates on disabled network
types.
## What changed
### 1) Remote candidate filtering by configured network types
- Added a guard in `addRemoteCandidate` to ignore candidates whose
`NetworkType` is not enabled in `AgentConfig.NetworkTypes`.
- Added logging for ignored candidates.
### 2) URL transport interpretation and filtering
- Added helpers:
- `effectiveURLProtoType` (applies default transport when URI transport
is omitted)
- `urlSupportsSrflxGathering`
- `relayNetworkTypesForURL`
- `configuredNetworkTypes`
- Applied this logic to srflx gathering (`gatherCandidatesSrflx`,
`gatherCandidatesSrflxUDPMux`) so only valid UDP URLs are used.
### 3) Relay gathering honors network types and filtered local binds
- Refactored relay gathering to select per-URL/per-network-type behavior
instead of hardcoded network assumptions.
- Kept support for interface/IP filtered local binding addresses in
relay/srflx paths.
- Replaced manual host:port formatting in srflx paths with
`net.JoinHostPort(..., strconv.Itoa(...))` for safer address
construction.
### 4) IPv6 TURN status (important)
- IPv6 TURN code paths were updated and covered by tests, but full IPv6
TURN support is not complete yet.
- For now, IPv6 TURN relay gathering is intentionally disabled in
runtime path.
- Related IPv6 relay test scenario is present but currently skipped
(`t.Skip("IPv6 TURN is not supported yet")`).
### Reference issue
Fixes #367
Pion ICE
A Go implementation of ICE
Roadmap
The library is used as a part of our WebRTC implementation. Please refer to that roadmap to track our major milestones.
Community
Pion has an active community on the Discord.
Follow the Pion Bluesky or Pion Twitter for project updates and important WebRTC news.
We are always looking to support your projects. Please reach out if you have something to build! If you need commercial support or don't want to use public methods you can contact us at team@pion.ly
Contributing
Check out the contributing wiki to join the group of amazing people making this project possible
License
MIT License - see LICENSE for full text
Description
Languages
Go
100%