geph-official / geph4-exit

Exit server for Geph
16 stars 15 forks source link

RangeInclusiveMap more suitable? #1

Open jeffparsons opened 3 years ago

jeffparsons commented 3 years ago

Hi there,

In this code: https://github.com/geph-official/geph4-exit/blob/a91fda6bd7df8331d39f8eb0cb88176a9197da80/src/asn.rs#L11-L38

It looks like the ASN database you're importing works with inclusive ranges. Might it therefore be more natural to use RangeInclusiveMap to store/query this, and not need the next_ip function?