mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-04-25 10:32:14 +00:00
fix: prepend connection addr to circuit relay address (#1355)
Otherwise the reported remote addr is not valid
This commit is contained in:
parent
886759b7fb
commit
509e56a603
@ -132,10 +132,10 @@ export class Circuit implements Transport, Initializable {
|
||||
}
|
||||
|
||||
if (virtualConnection != null) {
|
||||
// @ts-expect-error dst peer will not be undefined
|
||||
const remoteAddr = new Multiaddr(request.dstPeer.addrs[0])
|
||||
// @ts-expect-error dst peer will not be undefined
|
||||
const localAddr = new Multiaddr(request.srcPeer.addrs[0])
|
||||
const remoteAddr = connection.remoteAddr
|
||||
.encapsulate('/p2p-circuit')
|
||||
.encapsulate(new Multiaddr(request.dstPeer?.addrs[0]))
|
||||
const localAddr = new Multiaddr(request.srcPeer?.addrs[0])
|
||||
const maConn = streamToMaConnection({
|
||||
stream: virtualConnection,
|
||||
remoteAddr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user