Maintain at least one IPv4 outbound connection through the Tor network #36915

issue vasild opened this issue on November 19, 2026
  1. vasild commented at 12:39 PM on November 19, 2026: contributor

    Currently, for sybil resistance, we try to maintain at least one outbound connection to a node from each of the reachable networks.

    If both IPv4 and Tor happen to be reachable, then we can do better at a relatively low cost (considering code volume and complexity) - in addition to the direct IPv4 we try to maintain now, try to have one to IPv4 through the Tor network.

    This would have different properties compared to the direct IPv4 connection - the node's ISP can hijack all direct IPv4 connections and redirect them to their own nodes. The ISP, however, cannot do that for IPv4-via-Tor connections. For that a malicious Tor exit node (or their ISP) is needed, which is usually somewhere else on the internet compared to the node's ISP.

    IPv4-via-Tor connections would be complementary to direct-IPv4 connections, not mutually exclusive.

    For IPv6, either:

    • do the same, e.g. maintain at least one connection to IPv4 peer and one to IPv6 peer through the Tor network; or
    • treat IPv4 and IPv6 the same for this - maintain at least one connection to IPv4 or IPv6 peer through the Tor network.
  2. vasild added the label Feature on Nov 19, 2026
  3. victrvondoom commented at 5:37 PM on November 19, 2026: none

    I can take a bounded implementation and test contribution; please assign me if this direction is useful. An efficient approach is to treat Tor-proxied IPv4 as a separate outbound-selection goal while preserving the existing direct IPv4/IPv6 diversity, then test selection and reconnect behavior across Tor availability and proxy failure. The less-obvious factor is that Tor reachability is not interchangeable with direct IPv4 reachability: fallback must not silently violate the proxy boundary, and the new goal should not cause connection churn or reduce existing network diversity.

Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-19 19:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me