-
Notifications
You must be signed in to change notification settings - Fork 447
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
bug: missing support for /tls
multiaddr
#2024
Comments
Could you share the example where you tried to dial this address? as well as the dependencies of the listening node and the environment? You are correct in that but it's strange that you get this error since there's support for backwards compatibility that is tested in multiaddrs I have tried to dial the multiaddr you shared but I am getting a timeout error ( I assume the node isn't running at that public IP at the moment). But I am able to have two local nodes dial each other with the current format as such: import { createLibp2p } from 'libp2p'
import { webSockets } from '@libp2p/websockets'
import { mplex } from '@libp2p/mplex'
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { tcp } from '@libp2p/tcp'
import { identifyService } from 'libp2p/identify'
const node1 = await createLibp2p({
addresses: {
listen: ['/ip4/127.0.0.1/tcp/8000/tls/ws']
},
transports: [
tcp(),
webSockets()
],
streamMuxers: [yamux(), mplex()],
connectionEncryption: [noise()],
services: {
identify: identifyService()
}
})
const node2 = await createLibp2p({
addresses: {
listen: ['/ip4/127.0.0.1/tcp/8001/tls/ws']
},
transports: [
tcp(),
webSockets()
],
streamMuxers: [yamux(), mplex()],
connectionEncryption: [noise()],
services: {
identify: identifyService()
}
})
await node1.start()
await node2.start()
const connection = await node1.dial(node2.getMultiaddrs()[0])
console.log('node1 is connected to node2:', connection.status)
// Status is logged as open |
Could you also confirm the version of $ npm ls @multiformats/multiaddr |
ah, found the problem! it's actually coming from an older version of the problem is that |
opened a PR for this here: #2059 |
Closing as #2059 (comment) should solve the issue |
Severity: High
Description:
js-libp2p throws an error
Unsupported protocol tsl
when a multiaddr/ip4/192.168.68.58/tcp/433/tls/ws/p2p/16Uiu2HAkyZuLQy4sPRte7khemYHmkQewzjdTPRXZcxPH6NgjhR97
is dialedThe expectation is that a secure websocket multiaddr would have
/wss/
but apparentlywss
was replaced by/tls/ws
:Steps to reproduce the error:
Try to dial
/ip4/192.168.68.58/tcp/433/tls/ws/p2p/16Uiu2HAkyZuLQy4sPRte7khemYHmkQewzjdTPRXZcxPH6NgjhR97
through js-libp2pThe text was updated successfully, but these errors were encountered: