RoutingTableSettings

data class RoutingTableSettings(val maxFailCount: Int = 20, val restrictRoutingIps: Boolean = true, val extendedRoutingTable: Boolean = true, val preferVerifiedNodeIds: Boolean = true, val enforceNodeId: Boolean = false)

The DHT routing knobs the table reads, mirroring the five relevant settings_pack entries with libtorrent's exact defaults (see src/settings_pack.cpp). Pulling them into a small value object keeps the routing table decoupled from KiteTorrent's general SettingsPack, which does not (yet) carry DHT fields.

Constructors

Link copied to clipboard
constructor(maxFailCount: Int = 20, restrictRoutingIps: Boolean = true, extendedRoutingTable: Boolean = true, preferVerifiedNodeIds: Boolean = true, enforceNodeId: Boolean = false)

Properties

Link copied to clipboard

dht_enforce_node_id (default false): require every admitted node to have a BEP 42 secure id matching its IP.

Link copied to clipboard

dht_extended_routing_table (default true): make the first four buckets larger (see RoutingTable.bucketLimit).

Link copied to clipboard

dht_max_fail_count (default 20): live nodes are dropped after this many consecutive request failures.

Link copied to clipboard

dht_prefer_verified_node_ids (default true): only allow a bucket to split (and so only really grow) when the new node is verified and the bucket is mostly verified.

Link copied to clipboard

dht_restrict_routing_ips (default true): allow at most one routing-table entry per IP, and reject entries from IPs in the same /24 (v4) or /64 (v6) as an existing entry. When false, multiple entries per IP are permitted.