A high-performance Go library for fast IP address to CIDR block lookups using a path-compressed trie.
Cidranger is a Go library designed for fast IP address to CIDR block lookups. It solves the problem of efficiently determining whether an IP address belongs to any predefined network ranges, such as those from cloud providers like AWS, using an optimized trie data structure. This is crucial for applications in network security, routing, and IP geolocation.
Go developers building network-aware applications, such as cloud service tools, firewalls, load balancers, or any system requiring rapid IP range checks.
Developers choose Cidranger for its exceptional performance, with lookup times in nanoseconds, and its efficient memory usage due to path compression. It offers a clean, idiomatic Go API and supports both IPv4 and IPv6, making it a robust alternative to slower brute-force approaches.
Fast IP to CIDR lookup in Golang
Benchmarks show IPv4 lookups in 353 ns and IPv6 in 143 ns with AWS ranges, drastically outperforming brute-force methods.
Uses path compression to minimize trie depth and size, reducing memory footprint as visualized in the README examples.
Handles both IPv4 and IPv6 CIDR blocks within the same data structure, enabling seamless integration for modern networks.
Allows extending entries via the RangerEntry interface to store metadata like geolocation or service tags, enhancing flexibility.
Focuses solely on containment lookups; lacks built-in functions for CIDR operations like merging, splitting, or overlap calculations.
README provides core examples but lacks tutorials on advanced topics such as concurrency handling, persistence, or error management in edge cases.
Not integrated with broader Go networking ecosystems, potentially requiring additional effort for features like serialization or integration with other tools.
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
Pure Go implementation of the WebRTC API
Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.
Cloudflare Tunnel client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.