Clone this repo:
$ git clone https://gist.github.com/23ad8d6e3a1509335253ff074fcd3cb6.git helia-b2b-sharing
$ cd helia-b2b-sharing/
Generate npm-browser.js
npm package bundle:
$ npm i
$ npm run build
$ node case-b2b.mjs
...
...
{ url: '', lineNumber: 4, columnNumber: 10 } [peerId on browser1] 12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV
[serving cid on browser1] bafkreif5viehisdkgsxmfrmu5crzazgqhtg7xaifnjzyrcypsddkfnecaa
...
{ url: '', lineNumber: 4, columnNumber: 10 } [peerId on browser2] 12D3KooWCmcNxC3JyMEPTtUDob5Y18B7opU3Gcfzaj62J2ei4RuQ
[browser1 multiaddrs] [
'/ip4/127.0.0.1/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/192.168.10.5/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/127.0.0.1/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/192.168.10.5/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/127.0.0.1/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/192.168.10.5/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/127.0.0.1/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV',
'/ip4/192.168.10.5/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV'
]
...
{ url: '', lineNumber: 5, columnNumber: 14 } [dialProtocol from browser2 to browser1] /ip4/127.0.0.1/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc/p2p/12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV WebRTCStream WebRTCStream
{ url: '', lineNumber: 4, columnNumber: 12 } [findProviders peer.id] 12D3KooWChrHSYCoL4H8FYYPBPY9setKbK8wk4hAhN6oB2b217uV
{ url: '', lineNumber: 5, columnNumber: 12 } [findProviders peer.multiaddrs.length] 8
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/63705/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/63706/ws/p2p/12D3KooWMyU11MoSF8Bov94UZpTeEhyjeJk9YjdZfTPZd6tqwSVb/p2p-circuit/webrtc
{ url: '', lineNumber: 7, columnNumber: 12 } [findProviders peer.protocolss.length] 0
{ url: '', lineNumber: 13, columnNumber: 10 } [stat of cid from other browser] {cid: _CID, mode: undefined, mtime: undefined, fileSize: 18n, dagSize: 18n}
{ url: '', lineNumber: 19, columnNumber: 10 } [text of cid from other browser] Hello from browser
[closing...]
...
...
{ url: '', lineNumber: 5, columnNumber: 14 } [dialProtocol from browser2 to browser1] /ip4/127.0.0.1/tcp/58264/p2p/12D3KooWQ4mcV74JLYwTaCi2wYev7VJSgmumuL5bYe5CE7CfQUWm/p2p-circuit/webrtc/p2p/12D3KooWP83taKU7797FKSu1eHvGH2QF9yaoriz6mHXorWohHJjc WebRTCStream WebRTCStream
node:internal/process/esm_loader:46
internalBinding('errors').triggerUncaughtException(
^
page.evaluate: CodeError: Query aborted
at AbortSignal.<anonymous> (http://localhost:58266/npm-browser.js:80209:23)
at AbortSignal.onAbort (http://localhost:58266/npm-browser.js:29123:16)
at file:///Users/bellbind/exp/helia/helia-b2l-direct/case-b2b.mjs:78:13
Node.js v20.5.1
...
{ url: '', lineNumber: 5, columnNumber: 14 } [dialProtocol from browser2 to browser1] /ip4/127.0.0.1/tcp/60864/p2p/12D3KooWLzWHFaYcJqaJRZPA9jnG7U8vzh4DVPoMMhWcwT4EWZ3f/p2p-circuit/webrtc/p2p/12D3KooWJ89ZttD5WsQJBB6Jn2Dq4fhZUnhBqRTWDdiAGjCBPLwz WebRTCStream WebRTCStream
node:internal/process/esm_loader:46
internalBinding('errors').triggerUncaughtException(
^
page.evaluate: Error: Query was aborted before self-query ran
at AbortSignal.<anonymous> (http://localhost:60866/npm-browser.js:80311:22)
at AbortSignal.onAbort (http://localhost:60866/npm-browser.js:29123:16)
at file:///Users/bellbind/exp/helia/helia-b2l-direct/case-b2b.mjs:78:13
Node.js v20.5.1
...
{ url: '', lineNumber: 5, columnNumber: 14 } [dialProtocol from browser2 to browser1] /ip4/127.0.0.1/tcp/64416/p2p/12D3KooWFfV7F3p2pScoLfqbvnHdEDre6MiYNGsSkBCpJnHyQJ35/p2p-circuit/webrtc/p2p/12D3KooWNgvfGamtMAJb7sbJaPRtcsdgqKRFAtg8FiAKCsLFbBwx YamuxStream YamuxStream
{ url: '', lineNumber: 4, columnNumber: 12 } [findProviders peer.id] 12D3KooWHnN6wa4Dav2k5KEPnZqSvotjvPhYYCZN99YMS8otMoLw
{ url: '', lineNumber: 5, columnNumber: 12 } [findProviders peer.multiaddrs.length] 8
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/57038/ws/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/57037/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/57037/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/57038/ws/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/57038/ws/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit/webrtc
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/57037/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/192.168.10.5/tcp/57037/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit
{ url: '', lineNumber: 6, columnNumber: 46 } [findProviders peer.multiaddrs] /ip4/127.0.0.1/tcp/57038/ws/p2p/12D3KooWFGWBySRPkvMkZnWiRzymQNzSqgWQfNRVJEyhwwnHG36U/p2p-circuit
{ url: '', lineNumber: 7, columnNumber: 12 } [findProviders peer.protocolss.length] 0
{
url: 'http://localhost:64418/browser.js',
lineNumber: 66,
columnNumber: 37
} [/ipfs/bitswap/1.2.0 on 12D3KooWH3FMEApxmAvhfw1pZuQpB3GDggCw8CF2xXjBuony2Xr1] onDisconnect 12D3KooWNgvfGamtMAJb7sbJaPRtcsdgqKRFAtg8FiAKCsLFbBwx
^Cnode:internal/process/esm_loader:46
internalBinding('errors').triggerUncaughtException(
^
page.evaluate: Target closed
at file:///Users/bellbind/exp/helia/helia-b2l-direct/case-b2b.mjs:78:13 {
name: 'Error'
}
Node.js v20.5.1
- NOTE: Stop with Ctrl+C after
onDisconnect
printed