summaryrefslogtreecommitdiff
path: root/crates/tor-geoip/src
Commit message (Collapse)AuthorAgeFilesLines
* geoip: conditionalise a testIan Jackson2023-06-281-0/+1
| | | | | Without this, the build fails with cargo test --workspace --no-default-features --features=tokio,native-tls
* Merge branch 'stderr' into 'main'Alexander Færøy2023-06-211-0/+2
|\ | | | | | | | | lints: Promote clippy::print_stderr and clippy::print_stdout See merge request tpo/core/arti!1271
| * lints: Run maint/add_warning to actually apply new lints (again)Ian Jackson2023-06-211-0/+2
| | | | | | | | | | I prepared 161b9844d against an earlier version of main without the geoip crate. Run maint/add_warning again.
* | geoip: Add a few more tests.Nick Mathewson2023-06-201-1/+59
| |
* | geoip: Explain in more detail what a CountryCode is to us.Nick Mathewson2023-06-201-1/+14
| |
* | geoip: require that ccs actually are printable ascii.Nick Mathewson2023-06-201-3/+8
| | | | | | | | | | | | (There are plenty of strings that convert into 2 bytes of UTF8 without being two ascii characters, and there are plenty of sequences of two ascii characters that aren't printable.)
* | geoip: Make ?? a little more bullet-proofNick Mathewson2023-06-202-5/+50
|/ | | | We want to make sure that ?? is always None, never a CountryCode.
* tor-geoip: Add new crate with GeoIP database functionalityeta2023-06-202-0/+362
- This adds a new crate, `tor-geoip`, which can parse and perform lookups in the GeoIP database C-tor already uses (generated by a maintenance utility in the C-tor codebase). - We embed a copy of C-tor's databases with the crate and use `include_str!` to ship them with the binary, bloating its size somewhat. - This does, however, solve the problem of figuring out how to distribute these. - The plan is to gate this functionality behind a feature flag anyway, so the cost should be nil unless explicitly opted into. Part of tpo/core/onionmasq#47.