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
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/webrtcFor 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-circuitcomponent are relayed addresses, e.g. https://github.com/vyzo/libp2p-flare-test/blob/085b6bf0f2beedbe6017b86bbf60ca6e64b28ea0/cmd/flarec/client.go#L531