Generate chnroutes by fetching RIR stats and managing to compressing routes by merging consecutive CIDRs, deployed on Cloudflare Workers. Ported from my Python script.
📢 The CIDR aggregator is now available as a standalone app: https://github.com/Gowee/cidr-aggregator 📢
Base URL: https://chnroutes-worker.bamboo.workers.dev
🔗
- Endpoint:
/generate
- Parameters:
countries
- Comma-separated list of countries represented by 2 letters Country Code.
- A leading
!
indicates excluding all following countries. For example,!CN
will cover all countries/regions except mainland China in registries specified below. A single!
indicates all countries. And so on...
registries
- Comma-separated list of registries: AFRINIC, APNIC, ARIN, LACNIC, RIPE. Or
All
for all the five. - Excluding is not supported.
- Comma-separated list of registries: AFRINIC, APNIC, ARIN, LACNIC, RIPE. Or
- Examples:
https://chnroutes-worker.bamboo.workers.dev/generate?countries=CN®istries=APNIC
🔗- Typical chnroutes, useful for spliting traffic when bypassing the GFW with VPN/Proxies
- Becasuse almost all of mainland China IPs are delegated to APNIC currently (Sep 2019), so it might be sufficient to only cover APNIC.
https://chnroutes-worker.bamboo.workers.dev/generate6?countries=US®istries=All
🔗- All U.S. IPv6s delegated to any registries.
- The
/generate6
endpoint is experimental and subject to change.
- Make sure Rust and Cargo is installed.
- Download the project with
git clone https://github.com/Gowee/chnroutes-cfworker
. - Install the CLI tool wrangler for deploying to CloudFlare workers.
- Configure and publish the worker following the official quickstart.
This repo takes rustwasm-worker-template, which is a project by Ashley Williams, as the base skeleton.
The name chnroutes comes from https://github.com/fivesheep/chnroutes.git.