Skip to content

itsokto/cloud-geoip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-geoip

IP prefix lists for cloud/CDN providers, generated from IRR data using bgpq4.

Supported providers

  • Akamai
  • Alibaba Cloud
  • Cognosphere / HoYoverse

Downloads

Prebuilt files are published to the release branch and updated daily.

Format Path
Plain text plain/<name>.txt
sing-box SRS srs/<name>.srs
Xray-core dat cloud-geoip.dat

sing-box usage

{
  "rule_set": [
    {
      "tag": "akamai",
      "type": "remote",
      "format": "binary",
      "url": "https://raw.githubusercontent.com/itsokto/cloud-geoip/release/srs/akamai.srs" // or https://cdn.jsdelivr.net/gh/itsokto/cloud-geoip@release/srs/akamai.srs
    }
  ]
}

Xray-core usage

Place cloud-geoip.dat in the Xray asset directory (or set XRAY_LOCATION_ASSET), then reference it with the ext: prefix:

{
  "routing": {
    "rules": [
      {
        "type": "field",
        "outboundTag": "direct",
        "ip": ["ext:cloud-geoip.dat:akamai"]
      }
    ]
  }
}

All entries are in a single file. The tag after the colon is the target name (e.g. akamai, alibaba, cognosphere).

Local usage

# requires: bgpq4
go run . -output out

This generates out/plain/*.txt, out/srs/*.srs, and out/cloud-geoip.dat.

Flags

Flag Default Description
-output output Output directory
-S IRR sources (passed to bgpq4 -S)
-h IRR server (passed to bgpq4 -h)
-no-v4 false Skip IPv4
-no-v6 false Skip IPv6
-no-aggregate false Disable bgpq4 prefix aggregation (-A)

About

IP prefix lists for cloud/CDN providers, generated from IRR data using bgpq4.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages