interceptSecured method
Tests whether a given Conn, now authenticated, is allowed.
This is called by the upgrader, after it has performed the security handshake, and before it negotiates the muxer, or by the directly by the transport, at the exact same checkpoint.
Implementation
@override
bool interceptSecured(bool isInitiator, PeerId peerId, Conn conn) {
if (isPeerBlocked(peerId)) {
_logger.fine('Blocked secured connection: $peerId');
return false;
}
if (isConnBlocked(conn.id)) {
_logger.fine('Blocked secured connection: ${conn.id}');
return false;
}
return true;
}