Skip to content

arti-client: add exit selection with GeoIP country codes

eta requested to merge eta/arti:exit-selection-mainlineable into main

This threads the country codes work through the rest of the codebase:

  • tor-dirmgr will now enable GeoIP with the embedded database when the geoip future is enabled
    • This can be extended later using the DirMgrConfig to allow specifying a custom database; this is not done here, though
  • tor-circmgr's SupportedCircUsage and TargetCircUsage fields gain new country_code members to allow filtering circuits by country
    • These are () in builds where the geoip feature 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
  • ExitPathBuilder gains (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
  • StreamPrefs now lets you specify a country code, letting embedders make use of the feature

Merge request reports

Loading