Zebra/zebra-network/src
Arya 7b0dedd3a2
fix(network): Rate-limit inbound connections per IP. (#7041)
* Adds RecentByIp

* Removes new [cfg(not(test))]s, supports configurable max_conn_per_ip in RecentByIp and account_inbound_connections

Updates tests

* Uses self.time_limit instead of constant

* Adds sleep after dropping connections

Uses partition_point & split_off

Moves tests to separate module

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Always prune before adding

* Tweak comments

* Move the time calculation outside the binary search closure

---------

Co-authored-by: teor <teor@riseup.net>
2023-07-14 02:26:46 +00:00
..
address_book fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
address_book_peers change(rpc): Add getpeerinfo RPC method (#5951) 2023-01-17 07:09:07 +00:00
config feat(net): Cache a list of useful peers on disk (#6739) 2023-06-06 08:28:14 +00:00
isolated fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
meta_addr fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
peer cleanup(rust): Fix new nightly clippy warnings (#7135) 2023-07-05 07:11:27 +00:00
peer_set fix(network): Rate-limit inbound connections per IP. (#7041) 2023-07-14 02:26:46 +00:00
protocol cleanup(rust): Fix new nightly clippy warnings (#7135) 2023-07-05 07:11:27 +00:00
address_book.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
address_book_peers.rs change(rpc): Add getpeerinfo RPC method (#5951) 2023-01-17 07:09:07 +00:00
address_book_updater.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
config.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
constants.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
isolated.rs fix(log): Stop logging peer IP addresses, to protect user privacy (#6662) 2023-05-14 15:06:07 +00:00
lib.rs feat(net): Cache a list of useful peers on disk (#6739) 2023-06-06 08:28:14 +00:00
meta_addr.rs fix(network): Avoid initiating outbound handshakes with IPs for which Zebra already has an active peer. (#7029) 2023-07-06 05:54:10 +00:00
peer.rs fix(net): Reject nodes using ZClassic ports, and warn if configured with those ports (#6567) 2023-04-28 00:17:37 +00:00
peer_cache_updater.rs fix(ci): Increase peer cache startup wait time and test time (#7169) 2023-07-07 03:35:41 +00:00
peer_set.rs 1. Create an API for a missing inventory registry, but don't register any missing inventory yet (#3255) 2022-02-06 23:05:52 +00:00
policies.rs Delete outdated `TODOs` refering to closed issues (#6732) 2023-05-23 03:33:14 +00:00
protocol.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00