# hackl0us/geoip2-cn

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hackl0us-geoip2-cn).**

7,273 stars · 211 forks · Go · gpl-3.0

## Links

- GitHub: https://github.com/Hackl0us/GeoIP2-CN
- Homepage: https://hackl0us.com
- awesome-repositories: https://awesome-repositories.com/repository/hackl0us-geoip2-cn.md

## Topics

`clash` `geoip` `geoip2` `proxy` `quantumultx` `shadowrocket` `shadowsocks` `surge`

## Description

GeoIP2-CN provides curated datasets and binary database files designed to identify network addresses originating from mainland China. It provides a GeoIP2 China database and a routing list formatted as a MaxMind compatible database for use with network tools.

The project enables proxy traffic management by distinguishing between domestic and international IP addresses. This allows for regional network routing and the application of decision logic to separate traffic paths based on geographic location.

The system implements IP identification through MMDB-based lookups, binary-search range matching, and CIDR-list filtering. It also supports connecting proxy tools to these databases via external URL mapping.

## Tags

### Networking & Communication

- [Regional IP Identification](https://awesome-repositories.com/f/networking-communication/regional-ip-identification.md) — Identifies whether a network address belongs to mainland China using curated databases for accurate routing.
- [Geographic Traffic Routing](https://awesome-repositories.com/f/networking-communication/geographic-traffic-routing.md) — Directs internet traffic based on the geographic location of an IP address to optimize connection paths.
- [IP Range Routing](https://awesome-repositories.com/f/networking-communication/network-policy-enforcement/ip-range-routing.md) — Detects if an IP address belongs to mainland China using regional databases to route network traffic accurately. ([source](https://cdn.jsdelivr.net/gh/hackl0us/geoip2-cn@master/README.md))
- [Regional Routing Datasets](https://awesome-repositories.com/f/networking-communication/network-policy-enforcement/ip-range-routing/regional-routing-datasets.md) — Provides a curated dataset of network addresses used to identify and route traffic for mainland China.
- [Proxy Traffic Management](https://awesome-repositories.com/f/networking-communication/traffic-proxying/proxy-traffic-management.md) — Controls proxy request handling by distinguishing between domestic and international IP addresses.
- [CIDR Block Filtering](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/cidr-block-filtering.md) — Evaluates IP addresses against curated CIDR blocks to determine if they belong to specific geographic regions.

### Data & Databases

- [GeoIP Databases](https://awesome-repositories.com/f/data-databases/geoip-databases.md) — Ships a collection of IP address ranges for mainland China formatted for GeoIP2 compatible tools.

### DevOps & Infrastructure

- [Regional Routing](https://awesome-repositories.com/f/devops-infrastructure/regional-routing.md) — Maps identified IP locations to specific network paths to separate domestic and international traffic.

### System Administration & Monitoring

- [Geographic IP Lookups](https://awesome-repositories.com/f/system-administration-monitoring/geographic-ip-lookups.md) — Provides high-performance geographic IP lookups using the MaxMind Database Binary format.

### Software Engineering & Architecture

- [IP Range Lookups](https://awesome-repositories.com/f/software-engineering-architecture/binary-search-utilities/ip-range-lookups.md) — Implements high-speed IP address location within sorted network ranges using a binary search algorithm.
