arti-client: add exit selection with GeoIP country codes
This threads the country codes work through the rest of the codebase:
-
tor-dirmgrwill now enable GeoIP with the embedded database when thegeoipfuture is enabled- This can be extended later using the
DirMgrConfigto allow specifying a custom database; this is not done here, though
- This can be extended later using the
-
tor-circmgr'sSupportedCircUsageandTargetCircUsagefields gain newcountry_codemembers to allow filtering circuits by country- These are
()in builds where thegeoipfeature is not enabled -- doing it this way means we don't have to copy and paste huge swathes of code, since we can't use#[cfg]in patterns
- These are
-
ExitPathBuildergains (hacked-in) support for choosing a relay with the correct country code- Due to the lack of conjuction, we just copy and paste a small bit, pending further refactoring
-
StreamPrefsnow lets you specify a country code, letting embedders make use of the feature