Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: support blocklist for net.Server #56079

Merged

Conversation

theanarkh
Copy link
Contributor

Support blocklist options for net.Server, which can be used for disabling inbound access to specific IP addresses, IP ranges, or IP subnets.

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Nov 29, 2024
@theanarkh theanarkh force-pushed the support_blocklist_in_net_server branch from 0720545 to 4ecdf03 Compare November 29, 2024 16:36
lib/net.js Show resolved Hide resolved
@lpinca lpinca added the semver-minor PRs that contain new features and should be released in the next minor version. label Nov 29, 2024
@theanarkh theanarkh force-pushed the support_blocklist_in_net_server branch from 4ecdf03 to 83871b6 Compare November 29, 2024 17:10
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.00%. Comparing base (4cf6fab) to head (083967d).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
lib/net.js 81.25% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56079   +/-   ##
=======================================
  Coverage   88.00%   88.00%           
=======================================
  Files         656      656           
  Lines      188988   189015   +27     
  Branches    35992    35991    -1     
=======================================
+ Hits       166315   166341   +26     
- Misses      15838    15848   +10     
+ Partials     6835     6826    -9     
Files with missing lines Coverage Δ
lib/net.js 92.81% <81.25%> (-0.08%) ⬇️

... and 30 files with indirect coverage changes

doc/api/net.md Outdated Show resolved Hide resolved
@theanarkh theanarkh force-pushed the support_blocklist_in_net_server branch 3 times, most recently from a1321f0 to 1bb4c67 Compare November 30, 2024 02:17
@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 30, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 30, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@targos
Copy link
Member

targos commented Dec 1, 2024

If #56075 lands with blockList, this should too.

@theanarkh theanarkh force-pushed the support_blocklist_in_net_server branch from 1bb4c67 to 083967d Compare December 1, 2024 11:50
@theanarkh
Copy link
Contributor Author

Done !

@theanarkh theanarkh added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 1, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 1, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@theanarkh theanarkh added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Dec 2, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 2, 2024
@nodejs-github-bot nodejs-github-bot merged commit d5d1e80 into nodejs:main Dec 2, 2024
64 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in d5d1e80

targos pushed a commit that referenced this pull request Dec 3, 2024
PR-URL: #56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: TODO
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
targos pushed a commit that referenced this pull request Dec 3, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
aduh95 pushed a commit to aduh95/node that referenced this pull request Dec 4, 2024
PR-URL: nodejs#56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
targos added a commit that referenced this pull request Dec 5, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
targos added a commit that referenced this pull request Dec 6, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc:
  * add LJHarb to collaborators (Jordan Harband) #56132
net:
  * (SEMVER-MINOR) add BlockList.isBlockList(value) (James M Snell) #56078
  * (SEMVER-MINOR) support blockList in net.connect (theanarkh) #56075
  * (SEMVER-MINOR) support blockList in net.Server (theanarkh) #56079
  * (SEMVER-MINOR) add SocketAddress.parse (James M Snell) #56076
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
aduh95 added a commit to aduh95/node that referenced this pull request Dec 6, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) nodejs#54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) nodejs#55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) nodejs#55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) nodejs#56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) nodejs#55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) nodejs#54213

PR-URL: #31
aduh95 added a commit that referenced this pull request Dec 10, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc:
  * add LJHarb to collaborators (Jordan Harband) #56132
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist in net.connect (theanarkh) #56075
  * (SEMVER-MINOR) add SocketAddress.parse (James M Snell) #56076
  * (SEMVER-MINOR) add net.BlockList.isBlockList(value) (James M Snell) #56078
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
aduh95 added a commit that referenced this pull request Dec 10, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) #54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) #55604
doc:
  * add LJHarb to collaborators (Jordan Harband) #56132
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) #55890
net:
  * (SEMVER-MINOR) support blocklist in net.connect (theanarkh) #56075
  * (SEMVER-MINOR) add SocketAddress.parse (James M Snell) #56076
  * (SEMVER-MINOR) add net.BlockList.isBlockList(value) (James M Snell) #56078
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) #56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) #55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) #54213

PR-URL: #56119
aduh95 added a commit to aduh95/node that referenced this pull request Dec 11, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) nodejs#54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) nodejs#55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) nodejs#55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) nodejs#56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) nodejs#55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) nodejs#54213

PR-URL: #32
aduh95 added a commit to aduh95/node that referenced this pull request Dec 11, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) add partialDeepStrictEqual (Giovanni Bucci) nodejs#54630
cli:
  * (SEMVER-MINOR) implement --trace-env and --trace-env-[js|native]-stack (Joyee Cheung) nodejs#55604
doc,lib,src,test:
  * (SEMVER-MINOR) unflag sqlite module (Colin Ihrig) nodejs#55890
net:
  * (SEMVER-MINOR) support blocklist for net.Server (theanarkh) nodejs#56079
process:
  * (SEMVER-MINOR) deprecate `features.{ipv6,uv}` and `features.tls_*` (René) nodejs#55545
sqlite:
  * (SEMVER-MINOR) add `StatementSync.prototype.iterate` method (tpoisseau) nodejs#54213

PR-URL: #33
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
aduh95 pushed a commit that referenced this pull request Dec 13, 2024
PR-URL: #56079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants