BlockList.prototype.addSubnet - Node documentation
method BlockList.prototype.addSubnet

Usage

import { BlockList } from "node:net";

Adds a rule to block a range of IP addresses specified as a subnet mask.

Parameters

The network IPv4 or IPv6 address.

prefix: number

The number of CIDR prefix bits. For IPv4, this must be a value between 0 and 32. For IPv6, this must be between 0 and 128.

Return Type

void

Parameters

net: string
prefix: number
optional
type: IPVersion

Return Type

void