jpillora / ipfilter

A package for IP Filtering in Go (golang)
MIT License
387 stars 47 forks source link

Use yl2chen/cidranger for prefix matching #4

Open jpillora opened 7 years ago

jpillora commented 7 years ago

Swap the slice-based (O(n)) prefix matching out for https://github.com/yl2chen/cidranger (Thanks @yl2chen!)

Edit: Also investigate https://github.com/Kentik/patricia

yl2chen commented 7 years ago

enjoy!

anacrolix commented 1 year ago

Is https://github.com/anacrolix/torrent/blob/master/iplist/iplist.go of any interest? Probably not as efficient but I use it heavily.