@libp2p/webrtc 5.2.0 → 5.2.1-9b1a3791d
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/README.md +12 -4
- package/dist/index.min.js +18 -18
- package/dist/src/index.d.ts +12 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/private-to-private/listener.js +1 -1
- package/dist/src/private-to-private/listener.js.map +1 -1
- package/dist/src/private-to-public/listener.d.ts +0 -1
- package/dist/src/private-to-public/listener.d.ts.map +1 -1
- package/dist/src/private-to-public/listener.js +31 -13
- package/dist/src/private-to-public/listener.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +12 -4
- package/src/private-to-private/listener.ts +1 -1
- package/src/private-to-public/listener.ts +40 -16
- package/dist/typedoc-urls.json +0 -14
package/README.md
CHANGED
@@ -56,7 +56,6 @@ import { circuitRelayTransport, circuitRelayServer } from '@libp2p/circuit-relay
|
|
56
56
|
import { identify } from '@libp2p/identify'
|
57
57
|
import { webRTC } from '@libp2p/webrtc'
|
58
58
|
import { webSockets } from '@libp2p/websockets'
|
59
|
-
import * as filters from '@libp2p/websockets/filters'
|
60
59
|
import { WebRTC } from '@multiformats/multiaddr-matcher'
|
61
60
|
import delay from 'delay'
|
62
61
|
import { pipe } from 'it-pipe'
|
@@ -70,10 +69,13 @@ const relay = await createLibp2p({
|
|
70
69
|
listen: ['/ip4/127.0.0.1/tcp/0/ws']
|
71
70
|
},
|
72
71
|
transports: [
|
73
|
-
webSockets(
|
72
|
+
webSockets()
|
74
73
|
],
|
75
74
|
connectionEncrypters: [noise()],
|
76
75
|
streamMuxers: [yamux()],
|
76
|
+
connectionGater: {
|
77
|
+
denyDialMultiaddr: () => false
|
78
|
+
},
|
77
79
|
services: {
|
78
80
|
identify: identify(),
|
79
81
|
relay: circuitRelayServer()
|
@@ -91,12 +93,15 @@ const listener = await createLibp2p({
|
|
91
93
|
]
|
92
94
|
},
|
93
95
|
transports: [
|
94
|
-
webSockets(
|
96
|
+
webSockets(),
|
95
97
|
webRTC(),
|
96
98
|
circuitRelayTransport()
|
97
99
|
],
|
98
100
|
connectionEncrypters: [noise()],
|
99
101
|
streamMuxers: [yamux()],
|
102
|
+
connectionGater: {
|
103
|
+
denyDialMultiaddr: () => false
|
104
|
+
},
|
100
105
|
services: {
|
101
106
|
identify: identify(),
|
102
107
|
echo: echo()
|
@@ -128,12 +133,15 @@ while (true) {
|
|
128
133
|
// direct WebRTC connection
|
129
134
|
const dialer = await createLibp2p({
|
130
135
|
transports: [
|
131
|
-
webSockets(
|
136
|
+
webSockets(),
|
132
137
|
webRTC(),
|
133
138
|
circuitRelayTransport()
|
134
139
|
],
|
135
140
|
connectionEncrypters: [noise()],
|
136
141
|
streamMuxers: [yamux()],
|
142
|
+
connectionGater: {
|
143
|
+
denyDialMultiaddr: () => false
|
144
|
+
},
|
137
145
|
services: {
|
138
146
|
identify: identify(),
|
139
147
|
echo: echo()
|