Use vanguards path selection in CircMgr::launch_hs_unmanaged.
The path selection will be handled by VanguardHsPathBuilder
(a new type similar to, or based on, the existing ExitPathBuilder
).
See #1279 (closed)
CircMgr::launch_hs_unmanaged
will need to take an extra argument
specifying whether to use full or lite vanguards when building the circuits.
CircMgr::launch_hs_unmanaged
will only create STUB circuits.
If full vanguards are enabled, the circuits will be extended
by one hop as needed (outside of launch_hs_unmanaged
), whenever
a STUB+ circuit is required (based on the HsCircKind
).
Alternatively, CircMgr::launch_hs_unmanaged
could
take an argument that specifies whether the circuit to launch
is STUB or STUB+. We will likely also need a corresponding
TargetCircUsage::HsCircBaseWithVanguards (full|lite)
for it.
Then, based on the TargetCircUsage
, TargetCircUsage::build_path
can dispatch to VanguardHsPathBuilder::pick_path
(as opposed to
the ExitPathBuilder::pick_path
currently used for
`TargetCircUsage::HsCircBase).
Since launch_hs_circuits_as_needed
preemptively populates the HsCircPool
with circuits, it will need
to be modified too (to launch both STUB and STUB+ circuits).
Prerequisites: #1275 (closed), #1277 (closed), #1279 (closed)