Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2021-03-25 23:27:03 +0300
committerJames M Snell <jasnell@gmail.com>2021-04-02 16:16:42 +0300
commite79471deb7b5c91f061bf395bbef9816e26b4bf9 (patch)
tree4fd83036cf9e667f16324bb733955aee1aed34b1 /doc/api/net.md
parent0b90d352948393e5f92ceb2ef749c643b1002a68 (diff)
net: allow net.BlockList to use net.SocketAddress objects
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37917 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api/net.md')
-rw-r--r--doc/api/net.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/api/net.md b/doc/api/net.md
index c7f3ba56165..9a4b48317ea 100644
--- a/doc/api/net.md
+++ b/doc/api/net.md
@@ -69,7 +69,7 @@ IP subnets.
added: v15.0.0
-->
-* `address` {string} An IPv4 or IPv6 address.
+* `address` {string|net.SocketAddress} An IPv4 or IPv6 address.
* `type` {string} Either `'ipv4'` or `'ipv6'`. **Default:** `'ipv4'`.
Adds a rule to block the given IP address.
@@ -79,8 +79,9 @@ Adds a rule to block the given IP address.
added: v15.0.0
-->
-* `start` {string} The starting IPv4 or IPv6 address in the range.
-* `end` {string} The ending IPv4 or IPv6 address in the range.
+* `start` {string|net.SocketAddress} The starting IPv4 or IPv6 address in the
+ range.
+* `end` {string|net.SocketAddress} The ending IPv4 or IPv6 address in the range.
* `type` {string} Either `'ipv4'` or `'ipv6'`. **Default:** `'ipv4'`.
Adds a rule to block a range of IP addresses from `start` (inclusive) to
@@ -91,7 +92,7 @@ Adds a rule to block a range of IP addresses from `start` (inclusive) to
added: v15.0.0
-->
-* `net` {string} The network IPv4 or IPv6 address.
+* `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 between `0` and `32`. For IPv6, this must be between
`0` and `128`.
@@ -104,7 +105,7 @@ Adds a rule to block a range of IP addresses specified as a subnet mask.
added: v15.0.0
-->
-* `address` {string} The IP address to check
+* `address` {string|net.SocketAddress} The IP address to check
* `type` {string} Either `'ipv4'` or `'ipv6'`. **Default:** `'ipv4'`.
* Returns: {boolean}