-
Notifications
You must be signed in to change notification settings - Fork 961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webrtc: wrong peer id when connecting to peer via relay #5453
Comments
I have a similar problem, with a setup like this: node1 (in browser) based on rust-libp2p as wasm with websocket_sys & webrtc_sys I want node1 to connect to relay (websocket) which then will share information with node3 so that I end up with direct webrtc connection between node1 & node3. From node1 I'm trying to connect to It this setup even feasible? And if not, what would be correct way, so that I end up with direct connection between node1 & node3 (given that both are behind NAT)? I'm using |
Hey @sqrtsanta. If youre using another transport like websocket, tcp, or quic, you do not need to include |
@dariusc93 Thanks for answer, unfortunately it still doesn't work. Does |
If youre doing it from the browser then unfortunately it would have to be websocket. In other words, your public relay would have to be listening on websocket (either For webrtc, I have already concluded that to use the relay it would require browser-to-browser (unless this was a bug in the design - hard to say for sure but based on js and go impl i assume its not a bug but could be wrong). |
Summary
When attempting to connect to a peer (from the browser) through a relay with webrtc-direct transport, it gives a
WrongPeerId
. This seems to happen because it is reporting/expecting the relay peer id instead the actual peer id whom we are connecting to via relay, likely coming from the outbound upgrade in webrtc-websys.Expected behavior
Connect to peer over relay
Actual behavior
Errors with wrong peer id when attempting to connect to remote peer via relay
Relevant log output
Possible Solution
If intended, might be worth to document this until browser-to-browser is implemented (which may be the best solution), otherwise, we might need to report the correct peer id when connecting over relay (would need to evaluate other libp2p impl in how they handle relay v2 with webrtc-direct)
Version
0.53
Would you like to work on fixing this bug ?
Maybe
The text was updated successfully, but these errors were encountered: