maxmind / libmaxminddb

C library for the MaxMind DB file format
https://maxmind.github.io/libmaxminddb/
Apache License 2.0
912 stars 239 forks source link

Ability to identify iCloud Private Relay not by string comparison #341

Closed nezdolik closed 8 months ago

nezdolik commented 8 months ago

Hi, according to Maxmind docs, an IP can be tagged as iCloud Private Relay (string value) in ISP database. Would it be possible to introduce a boolean field instead to identify such IPs? For a high traffic load and latency sensitive proxy, it will be wasteful to perform string comparisons on each request.

oschwald commented 8 months ago

This repo is specific to this library. I would suggest directing data questions to support@maxmind.com. That said, I would expect the cost of the string comparison to be quite small compared to the cost of the lookup. For both booleans and strings, you could avoid the cost of deserializing by caching the offsets tot he data records.