Skip to content
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

websocket wasm cannot dial /tls/ws addresses #5509

Closed
sukunrt opened this issue Jul 24, 2024 · 2 comments · Fixed by #5523
Closed

websocket wasm cannot dial /tls/ws addresses #5509

sukunrt opened this issue Jul 24, 2024 · 2 comments · Fixed by #5523

Comments

@sukunrt
Copy link
Member

sukunrt commented Jul 24, 2024

Summary

Dialing /dns/dht.nonsequitur.xyz/tcp/5123/tls/ws/p2p/12D3KooWPvLLPbUzs33TicVYPY78AEZSnd671irhqyi3UWLSBH8H fails.

Dialing /dns/dht.nonsequitur.xyz/tcp/5123/wss/p2p/12D3KooWPvLLPbUzs33TicVYPY78AEZSnd671irhqyi3UWLSBH8H works fine(Edited based on: #5509 (comment)).

Expected behavior

Both the dials should work.

Actual behavior

/tls/ws dials fail

Relevant log output

No response

Possible Solution

/tls/ws and /wss are equivalent with /wss deprecated in favor of the more explicit tls/ws. The dialing logic should consider this.

Version

No response

Would you like to work on fixing this bug ?

Maybe

@sukunrt
Copy link
Member Author

sukunrt commented Jul 24, 2024

There was an issue that was supposed to handle this #2449. But all the comments there only consider the multiaddr library aspects of the problem and not the dialing part of the problem.

Recently, this was brought up here eigerco/lumina#314

@aschmahmann
Copy link

Do you mean:

Dialing /dns/dht.nonsequitur.xyz/tcp/5123/wss/p2p/12D3KooWPvLLPbUzs33TicVYPY78AEZSnd671irhqyi3UWLSBH8H works fine.

rather than ..../tls/wss/p2p/.... works fine since /tls/wss should be invalid

@mergify mergify bot closed this as completed in 4725f46 Aug 8, 2024
@mergify mergify bot closed this as completed in #5523 Aug 8, 2024
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this issue Sep 14, 2024
To keep backward compatibility the following rules were implemented:

* On dialing, `/tls/ws` and `/wss` are equivalent.
* On listening:
* If user listens with `/tls/ws` then `/tls/ws` will be advertised.
* If user listens with `/wss` then `/wss` will be advertised.

Closes libp2p#2449
Closes libp2p#5509

Pull-Request: libp2p#5523.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants