Skip to content

Add RFC 6062 TURN TCP relay support to TurnServer and ICE client #1531

@CraziestPower

Description

@CraziestPower

Summary

The lightweight in-process TURN server (#1512, merged as #1513) only supports UDP relay. This issue tracks adding RFC 6062 (TURN Extensions for TCP Allocations) support to both the server and the client-side ICE stack.

This enables scenarios where UDP is blocked by firewalls and all media must be relayed over TCP.

Scope

Server-side (TurnServer)

  • Allocate with RequestedTransport=TCP (0x06) creates a TCP relay listener instead of a UDP socket
  • Connect (0x000a): server opens TCP connection to peer, returns ConnectionId
  • ConnectionBind (0x000b): pairs a client data connection with a peer connection, starts bidirectional raw byte relay
  • ConnectionAttemptIndication (0x001c): sent to client when a peer connects to the TCP relay listener
  • Unsupported transport returns error 442

Client-side (ICE)

  • IceServer.IceRelayProtocol property to request TCP relay
  • RTCIceServer.X_ICERelayProtocol configuration option
  • IceChecklistEntry TCP relay state machine (Connect → ConnectionBind → raw data)
  • RtpIceChannel TCP relay send/receive paths
  • IceTcpReceiver.RawMode for post-ConnectionBind passthrough

STUN layer

  • Add missing enum values: ConnectSuccessResponse, ConnectErrorResponse, ConnectionBindSuccessResponse, ConnectionBindErrorResponse, ConnectionAttemptIndication
  • Fix GetSTUNMessageTypeForId crash on unknown message type IDs

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions