Darshan Sen
bc395d4c53
src: properly report exceptions from AddressToJS()
...
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/42054
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-03-26 15:39:59 +00:00
Tobias Nießen
5e0dd79a3c
src: add and fix some preprocessor comments
...
PR-URL: https://github.com/nodejs/node/pull/40701
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2021-11-10 15:24:22 +01:00
bl-ue
11e77e44f9
src: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/38845
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2021-06-01 12:04:16 +02:00
Shelley Vohr
2cc60fc647
src: remove more extra semis from member fns
...
PR-URL: https://github.com/nodejs/node/pull/38744
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-05-20 11:19:32 -07:00
James M Snell
e79471deb7
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 >
2021-04-02 06:16:42 -07:00
James M Snell
0b90d35294
net: add SocketAddress class
...
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 >
2021-04-02 06:16:40 -07:00
James M Snell
fb9257f659
net: make net.BlockList cloneable
...
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 >
2021-04-02 06:16:38 -07:00
James M Snell
c6e1edcc28
src: add Update(const sockaddr*) variant
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/34752
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-08-21 09:18:44 -07:00
James M Snell
1c14810edc
src: allow instances of net.BlockList to be created internally
...
Initial PR had it so that user code would create BlockList
instances. This sets it up so that instances can be created
internally by Node.js
PR-URL: https://github.com/nodejs/node/pull/34741
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-17 11:31:26 -07:00
James M Snell
1f9b20b637
net: introduce net.BlockList
...
`net.BlockList` provides an object intended to be used by net APIs to
specify rules for disallowing network activity with specific IP
addresses. This commit adds the basic mechanism but does not add the
specific uses.
PR-URL: https://github.com/nodejs/node/pull/34625
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-08-11 11:13:17 -07:00
James M Snell
6d1f0aed52
src: add SocketAddressLRU Utility
...
Adds a LRU cache for information associated with a SocketAddress.
PR-URL: https://github.com/nodejs/node/pull/34618
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-10 07:52:03 -07:00
Nick Kreeger
12a2997bed
src: fix extra includes of "env.h" and "env-inl.h"
...
Due to how the Environment class is used throughout the codebase, there
are a log of includes referencing eitehr env.h or env-inl.h.
This commit cleans up the remaining extra includes of 'env.h' or
'env-inl.h' and adds forward declarations of the Environment class.
PR-URL: https://github.com/nodejs/node/pull/32293
Refs: https://github.com/nodejs/node/issues/27531
Fixes: https://github.com/nodejs/node/issues/27531
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-04-03 01:17:38 +02:00
James M Snell
ba462c2e1e
src: introduce node_sockaddr
...
Introduce the SocketAddress utility class. The QUIC implementation
makes extensive use of this for handling of socket addresses. It
was separated out to make it generically reusable throughout core
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32070
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-03-05 12:07:34 -08:00