@libp2p/webrtc 5.2.8 → 5.2.9-b2124c2db
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +6 -6
- package/dist/src/private-to-private/util.d.ts +2 -2
- package/dist/src/private-to-private/util.d.ts.map +1 -1
- package/dist/src/private-to-public/listener.d.ts +2 -1
- package/dist/src/private-to-public/listener.d.ts.map +1 -1
- package/dist/src/private-to-public/listener.js +43 -80
- package/dist/src/private-to-public/listener.js.map +1 -1
- package/package.json +9 -9
- package/src/private-to-private/util.ts +2 -2
- package/src/private-to-public/listener.ts +48 -93
- package/dist/typedoc-urls.json +0 -14
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Message } from './pb/message.js';
|
2
2
|
import type { WebRTCDialEvents } from './transport.js';
|
3
3
|
import type { RTCPeerConnection } from '../webrtc/index.js';
|
4
|
-
import type { LoggerOptions, Stream } from '@libp2p/interface';
|
5
|
-
import type {
|
4
|
+
import type { AbortOptions, LoggerOptions, Stream } from '@libp2p/interface';
|
5
|
+
import type { MessageStream } from 'it-protobuf-stream';
|
6
6
|
import type { ProgressOptions } from 'progress-events';
|
7
7
|
export interface ReadCandidatesOptions extends AbortOptions, LoggerOptions, ProgressOptions<WebRTCDialEvents> {
|
8
8
|
direction: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/private-to-private/util.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/private-to-private/util.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,qBAAsB,SAAQ,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,gBAAgB,CAAC;IAC3G,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,4BAA4B,OAAc,iBAAiB,UAAU,cAAc,OAAO,EAAE,MAAM,CAAC,WAAW,qBAAqB,KAAG,QAAQ,IAAI,CAyD9J,CAAA;AAED,wBAAgB,kBAAkB,CAAE,EAAE,EAAE,iBAAiB,GAAG,MAAM,CAEjE"}
|
@@ -21,8 +21,9 @@ export interface WebRTCListenerMetrics {
|
|
21
21
|
listenerEvents: CounterGroup;
|
22
22
|
}
|
23
23
|
export declare class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> implements Listener {
|
24
|
-
private
|
24
|
+
private listeningMultiaddr?;
|
25
25
|
private certificate?;
|
26
|
+
private stunServer?;
|
26
27
|
private readonly connections;
|
27
28
|
private readonly log;
|
28
29
|
private readonly init;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/private-to-public/listener.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../../../src/private-to-public/listener.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAY7E,OAAO,KAAK,EAAE,kBAAkB,E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,CAAuB;IAChD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAiB;gBAEvC,UAAU,EAAE,8BAA8B,EAAE,IAAI,EAAE,wBAAwB;IAoBjF,MAAM,CAAE,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC3C,OAAO,CAAC,iBAAiB;YAgDX,kBAAkB;IAmDhC,QAAQ,IAAK,SAAS,EAAE;IAYxB,mBAAmB,CAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI;IA4B7C,KAAK,IAAK,OAAO,CAAC,IAAI,CAAC;CA8B9B"}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { multiaddr,
|
5
|
-
import {
|
1
|
+
import { isIPv4 } from '@chainsafe/is-ip';
|
2
|
+
import { InvalidParametersError, TypedEventEmitter } from '@libp2p/interface';
|
3
|
+
import { getThinWaistAddresses } from '@libp2p/utils/get-thin-waist-addresses';
|
4
|
+
import { multiaddr, fromStringTuples } from '@multiformats/multiaddr';
|
5
|
+
import { WebRTCDirect } from '@multiformats/multiaddr-matcher';
|
6
6
|
import { Crypto } from '@peculiar/webcrypto';
|
7
7
|
import getPort from 'get-port';
|
8
8
|
import pWaitFor from 'p-wait-for';
|
@@ -12,13 +12,11 @@ import { generateTransportCertificate } from './utils/generate-certificates.js';
|
|
12
12
|
import { createDialerRTCPeerConnection } from './utils/get-rtcpeerconnection.js';
|
13
13
|
import { stunListener } from './utils/stun-listener.js';
|
14
14
|
const crypto = new Crypto();
|
15
|
-
const UDP_PROTOCOL = protocols('udp');
|
16
|
-
const IP4_PROTOCOL = protocols('ip4');
|
17
|
-
const IP6_PROTOCOL = protocols('ip6');
|
18
15
|
let UDP_MUX_LISTENERS = [];
|
19
16
|
export class WebRTCDirectListener extends TypedEventEmitter {
|
20
|
-
|
17
|
+
listeningMultiaddr;
|
21
18
|
certificate;
|
19
|
+
stunServer;
|
22
20
|
connections;
|
23
21
|
log;
|
24
22
|
init;
|
@@ -29,7 +27,6 @@ export class WebRTCDirectListener extends TypedEventEmitter {
|
|
29
27
|
super();
|
30
28
|
this.init = init;
|
31
29
|
this.components = components;
|
32
|
-
this.multiaddrs = [];
|
33
30
|
this.connections = new Map();
|
34
31
|
this.log = components.logger.forComponent('libp2p:webrtc-direct:listener');
|
35
32
|
this.certificate = init.certificates?.[0];
|
@@ -44,62 +41,46 @@ export class WebRTCDirectListener extends TypedEventEmitter {
|
|
44
41
|
}
|
45
42
|
}
|
46
43
|
async listen(ma) {
|
47
|
-
const
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
44
|
+
const { host, port, family } = ma.toOptions();
|
45
|
+
let udpMuxServer;
|
46
|
+
if (port !== 0) {
|
47
|
+
// libjuice binds to all interfaces (IPv4/IPv6) for a given port so if we
|
48
|
+
// want to listen on a specific port, and there's already a mux listener
|
49
|
+
// for that port for the other family started by this node, we should
|
50
|
+
// reuse it
|
51
|
+
udpMuxServer = UDP_MUX_LISTENERS.find(s => s.port === port);
|
52
|
+
// make sure the port is free for the given family
|
53
|
+
if (udpMuxServer != null && ((udpMuxServer.isIPv4 && family === 4) || (udpMuxServer.isIPv6 && family === 6))) {
|
54
|
+
throw new InvalidParametersError(`There is already a listener for ${host}:${port}`);
|
55
|
+
}
|
56
|
+
// check that we own the mux server
|
57
|
+
if (udpMuxServer != null && !udpMuxServer.peerId.equals(this.components.peerId)) {
|
58
|
+
throw new InvalidParametersError(`Another peer is already performing UDP mux on ${host}:${port}`);
|
59
|
+
}
|
62
60
|
}
|
63
|
-
//
|
64
|
-
|
65
|
-
// single mux listener. This is necessary because libjuice binds to all
|
66
|
-
// interfaces for a given port so we we need to key on just the port number
|
67
|
-
// not the host + the port number
|
68
|
-
let existingServer = UDP_MUX_LISTENERS.find(s => s.port === port);
|
69
|
-
// if the server has not been started yet, or the port is a wildcard port
|
70
|
-
// and there is already a wildcard port for this address family, start a new
|
71
|
-
// UDP mux server
|
72
|
-
const wildcardPorts = port === 0 && existingServer?.port === 0;
|
73
|
-
const sameAddressFamily = (existingServer?.isIPv4 === true && isIPv4(host)) || (existingServer?.isIPv6 === true && isIPv6(host));
|
74
|
-
let createdMuxServer = false;
|
75
|
-
if (existingServer == null || (wildcardPorts && sameAddressFamily)) {
|
61
|
+
// start the mux server if we don't have one already
|
62
|
+
if (udpMuxServer == null) {
|
76
63
|
this.log('starting UDP mux server on %s:%p', host, port);
|
77
|
-
|
78
|
-
UDP_MUX_LISTENERS.push(
|
79
|
-
createdMuxServer = true;
|
64
|
+
udpMuxServer = this.startUDPMuxServer(host, port, family);
|
65
|
+
UDP_MUX_LISTENERS.push(udpMuxServer);
|
80
66
|
}
|
81
|
-
if (
|
82
|
-
|
83
|
-
// testing environment
|
84
|
-
throw new InvalidPeerIdError(`Another peer is already performing UDP mux on ${host}:${existingServer.port}`);
|
67
|
+
if (family === 4) {
|
68
|
+
udpMuxServer.isIPv4 = true;
|
85
69
|
}
|
86
|
-
|
87
|
-
|
88
|
-
if (!createdMuxServer) {
|
89
|
-
this.log('reused existing UDP mux server on %s:%p', host, address.port);
|
70
|
+
else if (family === 6) {
|
71
|
+
udpMuxServer.isIPv6 = true;
|
90
72
|
}
|
91
|
-
|
92
|
-
|
93
|
-
});
|
73
|
+
this.stunServer = await udpMuxServer.server;
|
74
|
+
this.listeningMultiaddr = ma;
|
94
75
|
this.safeDispatchEvent('listening');
|
95
76
|
}
|
96
|
-
startUDPMuxServer(host, port) {
|
77
|
+
startUDPMuxServer(host, port, family) {
|
97
78
|
return {
|
98
79
|
peerId: this.components.peerId,
|
99
80
|
owner: this,
|
100
81
|
port,
|
101
|
-
isIPv4:
|
102
|
-
isIPv6:
|
82
|
+
isIPv4: family === 4,
|
83
|
+
isIPv6: family === 6,
|
103
84
|
server: Promise.resolve()
|
104
85
|
.then(async () => {
|
105
86
|
// ensure we have a certificate
|
@@ -180,7 +161,13 @@ export class WebRTCDirectListener extends TypedEventEmitter {
|
|
180
161
|
}
|
181
162
|
}
|
182
163
|
getAddrs() {
|
183
|
-
|
164
|
+
if (this.stunServer == null) {
|
165
|
+
return [];
|
166
|
+
}
|
167
|
+
const address = this.stunServer.address();
|
168
|
+
return getThinWaistAddresses(this.listeningMultiaddr, address.port).map(ma => {
|
169
|
+
return ma.encapsulate(`/webrtc-direct/certhash/${this.certificate?.certhash}`);
|
170
|
+
});
|
184
171
|
}
|
185
172
|
updateAnnounceAddrs(multiaddrs) {
|
186
173
|
for (let i = 0; i < multiaddrs.length; i++) {
|
@@ -227,28 +214,4 @@ export class WebRTCDirectListener extends TypedEventEmitter {
|
|
227
214
|
this.safeDispatchEvent('close');
|
228
215
|
}
|
229
216
|
}
|
230
|
-
function getNetworkAddresses(host, port, version) {
|
231
|
-
if (host === '0.0.0.0' || host === '::') {
|
232
|
-
// return all ip4 interfaces
|
233
|
-
return Object.entries(networkInterfaces())
|
234
|
-
.flatMap(([_, addresses]) => addresses)
|
235
|
-
.map(address => address?.address)
|
236
|
-
.filter(address => {
|
237
|
-
if (address == null) {
|
238
|
-
return false;
|
239
|
-
}
|
240
|
-
if (version === 4) {
|
241
|
-
return isIPv4(address);
|
242
|
-
}
|
243
|
-
if (version === 6) {
|
244
|
-
return isIPv6(address);
|
245
|
-
}
|
246
|
-
return false;
|
247
|
-
})
|
248
|
-
.map(address => `/ip${version}/${address}/udp/${port}`);
|
249
|
-
}
|
250
|
-
return [
|
251
|
-
`/ip${version}/${host}/udp/${port}`
|
252
|
-
];
|
253
|
-
}
|
254
217
|
//# sourceMappingURL=listener.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"listener.js","sourceRoot":"","sources":["../../../src/private-to-public/listener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"listener.js","sourceRoot":"","sources":["../../../src/private-to-public/listener.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,MAAM,EAAE,EAAE,CAAC;YACnD,UAAU,CAAC,KAAK,EAAE,CAAA;QACpB,CAAC;QAED,sCAAsC;QACtC,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAA;QAE/B,yEAAyE;QACzE,8DAA8D;QAC9D,MAAM,QAAQ,CAAC,GAAG,EAAE;YAClB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;CACF"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@libp2p/webrtc",
|
3
|
-
"version": "5.2.
|
3
|
+
"version": "5.2.9-b2124c2db",
|
4
4
|
"description": "A libp2p transport using WebRTC connections",
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/transport-webrtc#readme",
|
@@ -54,10 +54,10 @@
|
|
54
54
|
"@chainsafe/is-ip": "^2.0.2",
|
55
55
|
"@chainsafe/libp2p-noise": "^16.0.0",
|
56
56
|
"@ipshipyard/node-datachannel": "^0.26.4",
|
57
|
-
"@libp2p/interface": "
|
58
|
-
"@libp2p/interface-internal": "
|
59
|
-
"@libp2p/peer-id": "
|
60
|
-
"@libp2p/utils": "
|
57
|
+
"@libp2p/interface": "2.7.0-b2124c2db",
|
58
|
+
"@libp2p/interface-internal": "2.3.9-b2124c2db",
|
59
|
+
"@libp2p/peer-id": "5.1.0-b2124c2db",
|
60
|
+
"@libp2p/utils": "6.6.0-b2124c2db",
|
61
61
|
"@multiformats/multiaddr": "^12.4.0",
|
62
62
|
"@multiformats/multiaddr-matcher": "^1.6.0",
|
63
63
|
"@peculiar/webcrypto": "^1.5.0",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"detect-browser": "^5.3.0",
|
67
67
|
"get-port": "^7.1.0",
|
68
68
|
"it-length-prefixed": "^10.0.1",
|
69
|
-
"it-protobuf-stream": "^
|
69
|
+
"it-protobuf-stream": "^2.0.1",
|
70
70
|
"it-pushable": "^3.2.3",
|
71
71
|
"it-stream-types": "^2.0.2",
|
72
72
|
"multiformats": "^13.3.1",
|
@@ -83,9 +83,9 @@
|
|
83
83
|
"uint8arrays": "^5.1.0"
|
84
84
|
},
|
85
85
|
"devDependencies": {
|
86
|
-
"@libp2p/crypto": "
|
87
|
-
"@libp2p/interface-compliance-tests": "
|
88
|
-
"@libp2p/logger": "
|
86
|
+
"@libp2p/crypto": "5.0.15-b2124c2db",
|
87
|
+
"@libp2p/interface-compliance-tests": "6.4.2-b2124c2db",
|
88
|
+
"@libp2p/logger": "5.1.13-b2124c2db",
|
89
89
|
"@types/sinon": "^17.0.3",
|
90
90
|
"aegir": "^45.1.1",
|
91
91
|
"delay": "^6.0.0",
|
@@ -6,8 +6,8 @@ import { RTCIceCandidate } from '../webrtc/index.js'
|
|
6
6
|
import { Message } from './pb/message.js'
|
7
7
|
import type { WebRTCDialEvents } from './transport.js'
|
8
8
|
import type { RTCPeerConnection } from '../webrtc/index.js'
|
9
|
-
import type { LoggerOptions, Stream } from '@libp2p/interface'
|
10
|
-
import type {
|
9
|
+
import type { AbortOptions, LoggerOptions, Stream } from '@libp2p/interface'
|
10
|
+
import type { MessageStream } from 'it-protobuf-stream'
|
11
11
|
import type { DeferredPromise } from 'p-defer'
|
12
12
|
import type { ProgressOptions } from 'progress-events'
|
13
13
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { multiaddr,
|
5
|
-
import {
|
1
|
+
import { isIPv4 } from '@chainsafe/is-ip'
|
2
|
+
import { InvalidParametersError, TypedEventEmitter } from '@libp2p/interface'
|
3
|
+
import { getThinWaistAddresses } from '@libp2p/utils/get-thin-waist-addresses'
|
4
|
+
import { multiaddr, fromStringTuples } from '@multiformats/multiaddr'
|
5
|
+
import { WebRTCDirect } from '@multiformats/multiaddr-matcher'
|
6
6
|
import { Crypto } from '@peculiar/webcrypto'
|
7
7
|
import getPort from 'get-port'
|
8
8
|
import pWaitFor from 'p-wait-for'
|
@@ -40,10 +40,6 @@ export interface WebRTCListenerMetrics {
|
|
40
40
|
listenerEvents: CounterGroup
|
41
41
|
}
|
42
42
|
|
43
|
-
const UDP_PROTOCOL = protocols('udp')
|
44
|
-
const IP4_PROTOCOL = protocols('ip4')
|
45
|
-
const IP6_PROTOCOL = protocols('ip6')
|
46
|
-
|
47
43
|
interface UDPMuxServer {
|
48
44
|
server: Promise<StunServer>
|
49
45
|
isIPv4: boolean
|
@@ -56,8 +52,9 @@ interface UDPMuxServer {
|
|
56
52
|
let UDP_MUX_LISTENERS: UDPMuxServer[] = []
|
57
53
|
|
58
54
|
export class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> implements Listener {
|
59
|
-
private
|
55
|
+
private listeningMultiaddr?: Multiaddr
|
60
56
|
private certificate?: TransportCertificate
|
57
|
+
private stunServer?: StunServer
|
61
58
|
private readonly connections: Map<string, DirectRTCPeerConnection>
|
62
59
|
private readonly log: Logger
|
63
60
|
private readonly init: WebRTCDirectListenerInit
|
@@ -70,7 +67,6 @@ export class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> impl
|
|
70
67
|
|
71
68
|
this.init = init
|
72
69
|
this.components = components
|
73
|
-
this.multiaddrs = []
|
74
70
|
this.connections = new Map()
|
75
71
|
this.log = components.logger.forComponent('libp2p:webrtc-direct:listener')
|
76
72
|
this.certificate = init.certificates?.[0]
|
@@ -87,73 +83,53 @@ export class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> impl
|
|
87
83
|
}
|
88
84
|
|
89
85
|
async listen (ma: Multiaddr): Promise<void> {
|
90
|
-
const
|
91
|
-
const ipVersion = IP4.matches(ma) ? 4 : 6
|
92
|
-
const host = parts
|
93
|
-
.filter(([code]) => code === IP4_PROTOCOL.code)
|
94
|
-
.pop()?.[1] ?? parts
|
95
|
-
.filter(([code]) => code === IP6_PROTOCOL.code)
|
96
|
-
.pop()?.[1]
|
97
|
-
|
98
|
-
if (host == null) {
|
99
|
-
throw new Error('IP4/6 host must be specified in webrtc-direct multiaddr')
|
100
|
-
}
|
101
|
-
const port = parseInt(parts
|
102
|
-
.filter(([code, value]) => code === UDP_PROTOCOL.code)
|
103
|
-
.pop()?.[1] ?? '')
|
86
|
+
const { host, port, family } = ma.toOptions()
|
104
87
|
|
105
|
-
|
106
|
-
throw new Error('UDP port must be specified in webrtc-direct multiaddr')
|
107
|
-
}
|
88
|
+
let udpMuxServer: UDPMuxServer | undefined
|
108
89
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
// if the server has not been started yet, or the port is a wildcard port
|
117
|
-
// and there is already a wildcard port for this address family, start a new
|
118
|
-
// UDP mux server
|
119
|
-
const wildcardPorts = port === 0 && existingServer?.port === 0
|
120
|
-
const sameAddressFamily = (existingServer?.isIPv4 === true && isIPv4(host)) || (existingServer?.isIPv6 === true && isIPv6(host))
|
121
|
-
let createdMuxServer = false
|
122
|
-
|
123
|
-
if (existingServer == null || (wildcardPorts && sameAddressFamily)) {
|
124
|
-
this.log('starting UDP mux server on %s:%p', host, port)
|
125
|
-
existingServer = this.startUDPMuxServer(host, port)
|
126
|
-
UDP_MUX_LISTENERS.push(existingServer)
|
127
|
-
createdMuxServer = true
|
128
|
-
}
|
90
|
+
if (port !== 0) {
|
91
|
+
// libjuice binds to all interfaces (IPv4/IPv6) for a given port so if we
|
92
|
+
// want to listen on a specific port, and there's already a mux listener
|
93
|
+
// for that port for the other family started by this node, we should
|
94
|
+
// reuse it
|
95
|
+
udpMuxServer = UDP_MUX_LISTENERS.find(s => s.port === port)
|
129
96
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
97
|
+
// make sure the port is free for the given family
|
98
|
+
if (udpMuxServer != null && ((udpMuxServer.isIPv4 && family === 4) || (udpMuxServer.isIPv6 && family === 6))) {
|
99
|
+
throw new InvalidParametersError(`There is already a listener for ${host}:${port}`)
|
100
|
+
}
|
135
101
|
|
136
|
-
|
137
|
-
|
102
|
+
// check that we own the mux server
|
103
|
+
if (udpMuxServer != null && !udpMuxServer.peerId.equals(this.components.peerId)) {
|
104
|
+
throw new InvalidParametersError(`Another peer is already performing UDP mux on ${host}:${port}`)
|
105
|
+
}
|
106
|
+
}
|
138
107
|
|
139
|
-
if
|
140
|
-
|
108
|
+
// start the mux server if we don't have one already
|
109
|
+
if (udpMuxServer == null) {
|
110
|
+
this.log('starting UDP mux server on %s:%p', host, port)
|
111
|
+
udpMuxServer = this.startUDPMuxServer(host, port, family)
|
112
|
+
UDP_MUX_LISTENERS.push(udpMuxServer)
|
141
113
|
}
|
142
114
|
|
143
|
-
|
144
|
-
|
145
|
-
})
|
115
|
+
if (family === 4) {
|
116
|
+
udpMuxServer.isIPv4 = true
|
117
|
+
} else if (family === 6) {
|
118
|
+
udpMuxServer.isIPv6 = true
|
119
|
+
}
|
146
120
|
|
121
|
+
this.stunServer = await udpMuxServer.server
|
122
|
+
this.listeningMultiaddr = ma
|
147
123
|
this.safeDispatchEvent('listening')
|
148
124
|
}
|
149
125
|
|
150
|
-
private startUDPMuxServer (host: string, port: number): UDPMuxServer {
|
126
|
+
private startUDPMuxServer (host: string, port: number, family: 4 | 6): UDPMuxServer {
|
151
127
|
return {
|
152
128
|
peerId: this.components.peerId,
|
153
129
|
owner: this,
|
154
130
|
port,
|
155
|
-
isIPv4:
|
156
|
-
isIPv6:
|
131
|
+
isIPv4: family === 4,
|
132
|
+
isIPv6: family === 6,
|
157
133
|
server: Promise.resolve()
|
158
134
|
.then(async (): Promise<StunServer> => {
|
159
135
|
// ensure we have a certificate
|
@@ -247,7 +223,15 @@ export class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> impl
|
|
247
223
|
}
|
248
224
|
|
249
225
|
getAddrs (): Multiaddr[] {
|
250
|
-
|
226
|
+
if (this.stunServer == null) {
|
227
|
+
return []
|
228
|
+
}
|
229
|
+
|
230
|
+
const address = this.stunServer.address()
|
231
|
+
|
232
|
+
return getThinWaistAddresses(this.listeningMultiaddr, address.port).map(ma => {
|
233
|
+
return ma.encapsulate(`/webrtc-direct/certhash/${this.certificate?.certhash}`)
|
234
|
+
})
|
251
235
|
}
|
252
236
|
|
253
237
|
updateAnnounceAddrs (multiaddrs: Multiaddr[]): void {
|
@@ -309,32 +293,3 @@ export class WebRTCDirectListener extends TypedEventEmitter<ListenerEvents> impl
|
|
309
293
|
this.safeDispatchEvent('close')
|
310
294
|
}
|
311
295
|
}
|
312
|
-
|
313
|
-
function getNetworkAddresses (host: string, port: number, version: 4 | 6): string[] {
|
314
|
-
if (host === '0.0.0.0' || host === '::') {
|
315
|
-
// return all ip4 interfaces
|
316
|
-
return Object.entries(networkInterfaces())
|
317
|
-
.flatMap(([_, addresses]) => addresses)
|
318
|
-
.map(address => address?.address)
|
319
|
-
.filter(address => {
|
320
|
-
if (address == null) {
|
321
|
-
return false
|
322
|
-
}
|
323
|
-
|
324
|
-
if (version === 4) {
|
325
|
-
return isIPv4(address)
|
326
|
-
}
|
327
|
-
|
328
|
-
if (version === 6) {
|
329
|
-
return isIPv6(address)
|
330
|
-
}
|
331
|
-
|
332
|
-
return false
|
333
|
-
})
|
334
|
-
.map(address => `/ip${version}/${address}/udp/${port}`)
|
335
|
-
}
|
336
|
-
|
337
|
-
return [
|
338
|
-
`/ip${version}/${host}/udp/${port}`
|
339
|
-
]
|
340
|
-
}
|
package/dist/typedoc-urls.json
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"DataChannelOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.DataChannelOptions.html",
|
3
|
-
".:DataChannelOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.DataChannelOptions.html",
|
4
|
-
"TransportCertificate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.TransportCertificate.html",
|
5
|
-
".:TransportCertificate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.TransportCertificate.html",
|
6
|
-
"WebRTCDirectTransportComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.WebRTCDirectTransportComponents.html",
|
7
|
-
"WebRTCTransportComponents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.WebRTCTransportComponents.html",
|
8
|
-
"WebRTCTransportDirectInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.WebRTCTransportDirectInit.html",
|
9
|
-
"WebRTCTransportInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_webrtc.WebRTCTransportInit.html",
|
10
|
-
"webRTC": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTC.html",
|
11
|
-
".:webRTC": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTC.html",
|
12
|
-
"webRTCDirect": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTCDirect.html",
|
13
|
-
".:webRTCDirect": "https://libp2p.github.io/js-libp2p/functions/_libp2p_webrtc.webRTCDirect.html"
|
14
|
-
}
|