CIRA / MoeDove

Live BGP Full Table Analysis

Real-time BGP Aggregation.

告别陈旧的 Whois 静态数据。CIRA 直接接入全球 BGP 骨干网路由表,实时还原真实的互联网拓扑结构。 无僵尸 IP,无归属滞后,精准分流。

Integration Examples

MikroTik RouterOS Script

下载路由表文件到本地存储,需配合脚本解析。

/tool fetch url="https://cira.moedove.com/china_all_v4.txt" mode=https dst-path=cn_routes.txt

# 提示: ROS 处理大文件较慢
# 建议在服务器处理成 .rsc 脚本后再导入
Linux (ipset) Bash

使用 restore 模式实现毫秒级高性能导入。

# 1. 创建 ipset
ipset create cn_v4 hash:net -exist

# 2. 导入
curl -s https://cira.moedove.com/china_domestic_backbone_v4.txt | \
  sed 's/^/add cn_v4 /' | \
  ipset restore -!
Nginx (WAF / GeoIP) Conf

将 CIDR 列表转换为 Nginx 格式并引入。

# 1. 转换格式 (追加 1;)
curl -s https://cira.moedove.com/china_all_v4.txt | sed 's/$/ 1;/' > cn_geo.conf

# 2. nginx.conf 配置
geo $is_china {
    default 0;
    include /path/to/cn_geo.conf;
}
Clash / Surge YAML

作为 rule-provider 引入,实现自动更新的规则分流。

rule-providers:
  china_ip:
    type: http
    behavior: ipcidr
    url: "https://cira.moedove.com/china_all_v4.txt"
    path: ./rules/china_ip.yaml
    interval: 86400

Why BGP Data Matters?

真实路由 vs 注册信息: 传统的 IP 库基于 Whois/APNIC 注册信息,这往往是"申请时的地址",而非"实际使用的地址"。BGP 数据则是运营商路由器之间真实广播的路径,代表了 IP 当前真实的物理位置和网络归属。

实时性: 当 IP 发生广播变动(如跨国广播、Anycast 调整)时,BGP 路由表会立即更新,而 Whois 信息可能滞后数月。使用 BGP 数据可确保您的流量策略永远只有 0day 延迟。