Skip to content

Implement RFC-6062 #118

@kleky

Description

@kleky

Summary

Implement RFC-6062, Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations

Motivation

To provide a TCP relay client for use with a service such as Coturn.

Describe alternatives you've considered

Unable to find any clients that support RFC-6062.

Additional context

Already discussed over Slack with a colleague of mine, Lewis Jessett and @Sean-Der :

https://gophers.slack.com/archives/CAK2124AG/p1579206089185600

We've been given the clearance to contribute on this, but will probably need some guidance from the pion community.

Looking at the RFC I've tried to summarize what is required as follows:

  1. Client to setup a Turn ALLOCATE request for TCP ( REQUESTED-TRANSPORT attribute == 6)
  2. Refresh of ALLOCATION identical to UDP
  3. Ability for client to send a Connect request over control connection (including an XOR-PEER-ADDRESS attribute containing the transport address of the peer to which a connection is desired). -Upon success response the CONNECTION-ID attribute is returned to client.
  4. Ability for client to initiate another TCP connection using a different local transport address, then a ConnectionBind request over the new connection that includes the CONNECTION-ID attribute. Upon success, this is the client data connection.

Does another new data connection get created when a peer tries to connect, as per RFC-6062 Section 4.4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions