Skip to content

tor-circmgr: Add HsPathBuilder for building onion service paths

gabi-250 requested to merge gabi-250/arti:exitpath-onion-svc into main

This MR extracts some of ExitPathBuilder's functions to a new AnonymousPathBuilder trait. The default implementation of AnonymousPathBuilder::pick_path() contains what was previously ExitPathBuilder::pick_path().

I've also added a new HsPathBuilder type that implements AnonymousPathBuilder and replaces ExitPathBuilder::for_onion_service (which enables us to remove AnyRelayForOnionService altogether).

HsPathBuilder and ExitPathBuilder share the same pick_path() implementation if the vanguards feature is disabled.

This MR contains a lot of code movement. You can double-check I haven't modified the moved blocks using git diff --color-moved.

Merge request reports