@@ -162,104 +162,6 @@ export function isConnection (other: any): other is Connection {
162
162
return other != null && Boolean ( other [ symbol ] )
163
163
}
164
164
165
- /**
166
- * @deprecated Please use the version from `@libp2p/interface-connection-gater` instead, this will be removed in a future release
167
- */
168
- export interface ConnectionGater {
169
- /**
170
- * denyDialMultiaddr tests whether we're permitted to Dial the
171
- * specified peer.
172
- *
173
- * This is called by the dialer.connectToPeer implementation before
174
- * dialling a peer.
175
- *
176
- * Return true to prevent dialing the passed peer.
177
- */
178
- denyDialPeer : ( peerId : PeerId ) => Promise < boolean >
179
-
180
- /**
181
- * denyDialMultiaddr tests whether we're permitted to dial the specified
182
- * multiaddr for the given peer.
183
- *
184
- * This is called by the dialer.connectToPeer implementation after it has
185
- * resolved the peer's addrs, and prior to dialling each.
186
- *
187
- * Return true to prevent dialing the passed peer on the passed multiaddr.
188
- */
189
- denyDialMultiaddr : ( peerId : PeerId , multiaddr : Multiaddr ) => Promise < boolean >
190
-
191
- /**
192
- * denyInboundConnection tests whether an incipient inbound connection is allowed.
193
- *
194
- * This is called by the upgrader, or by the transport directly (e.g. QUIC,
195
- * Bluetooth), straight after it has accepted a connection from its socket.
196
- *
197
- * Return true to deny the incoming passed connection.
198
- */
199
- denyInboundConnection : ( maConn : MultiaddrConnection ) => Promise < boolean >
200
-
201
- /**
202
- * denyOutboundConnection tests whether an incipient outbound connection is allowed.
203
- *
204
- * This is called by the upgrader, or by the transport directly (e.g. QUIC,
205
- * Bluetooth), straight after it has created a connection with its socket.
206
- *
207
- * Return true to deny the incoming passed connection.
208
- */
209
- denyOutboundConnection : ( peerId : PeerId , maConn : MultiaddrConnection ) => Promise < boolean >
210
-
211
- /**
212
- * denyInboundEncryptedConnection tests whether a given connection, now encrypted,
213
- * is allowed.
214
- *
215
- * This is called by the upgrader, after it has performed the security
216
- * handshake, and before it negotiates the muxer, or by the directly by the
217
- * transport, at the exact same checkpoint.
218
- *
219
- * Return true to deny the passed secured connection.
220
- */
221
- denyInboundEncryptedConnection : ( peerId : PeerId , maConn : MultiaddrConnection ) => Promise < boolean >
222
-
223
- /**
224
- * denyOutboundEncryptedConnection tests whether a given connection, now encrypted,
225
- * is allowed.
226
- *
227
- * This is called by the upgrader, after it has performed the security
228
- * handshake, and before it negotiates the muxer, or by the directly by the
229
- * transport, at the exact same checkpoint.
230
- *
231
- * Return true to deny the passed secured connection.
232
- */
233
- denyOutboundEncryptedConnection : ( peerId : PeerId , maConn : MultiaddrConnection ) => Promise < boolean >
234
-
235
- /**
236
- * denyInboundUpgradedConnection tests whether a fully capable connection is allowed.
237
- *
238
- * This is called after encryption has been negotiated and the connection has been
239
- * multiplexed, if a multiplexer is configured.
240
- *
241
- * Return true to deny the passed upgraded connection.
242
- */
243
- denyInboundUpgradedConnection : ( peerId : PeerId , maConn : MultiaddrConnection ) => Promise < boolean >
244
-
245
- /**
246
- * denyOutboundUpgradedConnection tests whether a fully capable connection is allowed.
247
- *
248
- * This is called after encryption has been negotiated and the connection has been
249
- * multiplexed, if a multiplexer is configured.
250
- *
251
- * Return true to deny the passed upgraded connection.
252
- */
253
- denyOutboundUpgradedConnection : ( peerId : PeerId , maConn : MultiaddrConnection ) => Promise < boolean >
254
-
255
- /**
256
- * Used by the address book to filter passed addresses.
257
- *
258
- * Return true to allow storing the passed multiaddr for the passed peer.
259
- */
260
- filterMultiaddrForPeer : ( peer : PeerId , multiaddr : Multiaddr ) => Promise < boolean >
261
- }
262
-
263
165
export interface ConnectionProtector {
264
166
265
167
/**
0 commit comments