For #29415, vasild added the possibility to have outbound connections made “naturally” by the node using addrman entries, by redirecting them via a SOCKS5 proxy to python p2ps or other full nodes, so that the node under test behaves as if it is connected to normal non-local peers from arbitrary networks, while we have full control over the peers.
I think this feature is really cool and want to suggest to integrate it more prominently into the test framework ("auto_outbound_mode") in the first commit because it allows to test the code in which the node decides to make connections - in contrast to the existing add_outbound_p2p_connection where the functional test intiates the connections.
The second commit uses it to add functional test coverage for the following features of outbound connection management:
- extra full outbound connections due to a stale tip (#11560)
- periodic block-relay-only connections (#19858)
- full outbound connection management with respect to networks (#27213)
This should work well with the test from #29415 (which would keep its own destinations_factory but can call _create_auto_outbound_listener to avoid much of code duplication).
Other possible uses for auto_outbound_mode I could think of are more detailed testing of anchors (feature_anchors.py), feeler connections, or any other p2p logic that uses the network of peers.