-
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
libp2p-websocket: replace /wss with /tls/ws #2449
Comments
Shouldn't this change be made on the multiaddr crate too? |
Should be done via multiformats/rust-multiaddr#48. |
Looks to me like even Since multiformats/rust-multiaddr#48 added tls support, will this be just upgrading libp2p-websocket to use it? |
Does this test case for rust-multiaddr make sense @tomaka? // rust-multiaddr/src/from_url.rs
#[test]
fn normal_usage_wss() {
let addr = from_url("wss://127.0.0.1:8000").unwrap();
assert_eq!(addr, "/ip4/127.0.0.1/tcp/8000/tls/ws".parse().unwrap());
assert_eq!(addr, "/ip4/127.0.0.1/tcp/8000/wss".parse().unwrap());
} Basically, when parsing a multiaddress, when a |
I don't think it's a good idea to make |
Hello everyone, are there any updates on TLS support for websockets? |
Support is there and there is an example in the docs! This ticket is only about the deprecated multiaddr component. |
Thank you! Would you be able to point me to the example? |
See https://docs.rs/libp2p-websocket/latest/libp2p_websocket/struct.WsConfig.html#examples. It is a bit hard to discover. We are in the process of making the APIs of our crates more consistent, see #2217. Help in doing that for |
Closing in favor of multiformats/rust-multiaddr#100. |
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 #2449 Closes #5509 Pull-Request: #5523.
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.
According to the multiaddr spec, the
/wss
specifier is deprecated and/tls/ws
should be preferred.libp2p-websocket
only supports/wss
.(I've taken the liberty to mark this as "easy", as it's just about interpreting the multiaddr)
The text was updated successfully, but these errors were encountered: