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.