sirzooro fdd86c407c Respect transport parameters and allowed net types (#901)
## 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
2026-03-23 19:03:53 +01:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2023-04-18 13:46:38 +02:00
2026-01-22 10:59:01 +02:00
2026-03-14 03:06:58 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-02-19 19:12:34 +02:00
2026-02-19 19:07:05 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2022-10-21 09:58:20 +09:00
2026-01-22 10:59:01 +02:00
2026-02-18 23:05:21 +02:00
2026-02-18 23:05:21 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00
2026-01-22 10:59:01 +02:00


Pion ICE

A Go implementation of ICE

Pion ICE join us on Discord Follow us on Bluesky
GitHub Workflow Status Go Reference Coverage Status Go Report Card License: MIT


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

S
Description
Languages
Go 100%