You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A generates a random string prefixed with "libp2p+webrtc+v1/". The prefix allows us to use the ufrag as an upgrade mechanism to role out a new version of the libp2p WebRTC protocol on a live network. While a hack, this might be very useful in the future. A sets the string as the username (ufrag or username fragment) and password on the SDP of the remote's answer.
Looking at where this is done in go-libp2p when it's trying to dial a remote WebRTC-Direct address:
It creates a []byte of length uFragLength where uFragLength is uFragIdOffset + uFragIdLength and uFragIdOffset is the length of the "libp2p+webrtc+v1/" prefix string, then writes the random uFrag into the []byte starting at the uFragIdOffset index.
It doesn't seem to add the prefix string to the start of the []byte though, so it's missing from the STUN packets received by the server. See all the 00 00 00... at the start of the attribute value:
Point 4 in the Browser to public Server connection protocol says:
Looking at where this is done in go-libp2p when it's trying to dial a remote WebRTC-Direct address:
go-libp2p/p2p/transport/webrtc/transport.go
Lines 413 to 430 in 2769070
It creates a
[]byte
of lengthuFragLength
whereuFragLength
isuFragIdOffset + uFragIdLength
anduFragIdOffset
is the length of the "libp2p+webrtc+v1/" prefix string, then writes the random uFrag into the[]byte
starting at theuFragIdOffset
index.It doesn't seem to add the prefix string to the start of the
[]byte
though, so it's missing from the STUN packets received by the server. See all the00 00 00...
at the start of the attribute value:The text was updated successfully, but these errors were encountered: