blockList.addCIDR(cidr)


  • cidr <string> CIDR 表示法的 IPv4 或 IPv6 子网(例如 '10.0.0.0/8' 或 '2001:db8::/32')。

使用 CIDR 表示法添加子网规则。地址族会根据地址自动检测(如果地址包含 ':' 则为 IPv6,否则为 IPv4)。这相当于使用解析后的网络地址、前缀长度和地址族调用 blockList.addSubnet()。

🌐 Adds a subnet rule using CIDR notation. The address family is automatically detected from the address (IPv6 if the address contains ':', IPv4 otherwise). This is equivalent to calling blockList.addSubnet() with the parsed network address, prefix length, and family.