Skip to content

webrtc: specify multiaddresses on a browser-to-browser webrtc connection #579

Description

@sukunrt

The spec currently doesn't say anything on what the multiaddress on an established /webrtc (browser to browser) connection should be.

Two options off the top of my head are:
1.
Initiator Side is /webrtc, with candidate pair from ICETransport if available.
Receiver Side, the address that was dialed: <realy-addr>/p2p-circuit/webrtc

For both sides,
We get the address candidate from the ICETransport(https://github.com/pion/ice/blob/master/candidatepair.go#L23) used to establish the connection and use those with a suffix /webrtc. I'm not sure if this is available in browsers.

Between the two, I think 1 is better. In this situation we have parity with other cases where the Receiver Side address is dialable in case of a disconnection. A problem here is there is probably a lot of code that assumes addresses with /p2p-circuit component are relayed addresses, e.g. https://github.com/vyzo/libp2p-flare-test/blob/085b6bf0f2beedbe6017b86bbf60ca6e64b28ea0/cmd/flarec/client.go#L531

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