blockList.addSubnet(net, prefix[, type])
net
<string> | <net.SocketAddress> 网络 IPv4 或 IPv6 地址。prefix
<number> CIDR 前缀位数。 对于 IPv4,这必须是0
和32
之间的值。 对于 IPv6,它必须在0
和128
之间。type
<string>'ipv4'
或'ipv6'
。 默认值:'ipv4'
。
添加规则以阻止指定为子网掩码的 IP 地址范围。
net
<string> | <net.SocketAddress> The network IPv4 or IPv6 address.prefix
<number> The number of CIDR prefix bits. For IPv4, this must be a value between0
and32
. For IPv6, this must be between0
and128
.type
<string> Either'ipv4'
or'ipv6'
. Default:'ipv4'
.
Adds a rule to block a range of IP addresses specified as a subnet mask.