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: add autoSelectFamily global getter and setter #45777

Merged

Conversation

ShogunPanda
Copy link
Contributor

@ShogunPanda ShogunPanda commented Dec 7, 2022

This PR continues #44731 by adding the following new APIs:

  • net.Socket.autoSelectFamilyAttemptedAddresses: It contains a list of all the addresses that were attempted when using the Happy Eyeballs algorithm.
  • net.setDefaultAutoSelectFamily and net.getDefaultAutoSelectFamily: Sets or gets the default for autoSelectFamily for net.connect. This can also be enabled by the command line option --enable-network-family-autoselection.

@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 Dec 7, 2022
@ShogunPanda ShogunPanda force-pushed the autoselectfamily-improvements branch 3 times, most recently from 58f423b to 9fdf538 Compare December 7, 2022 20:39
@addaleax
Copy link
Member

addaleax commented Dec 7, 2022

Should this be a command line flag? Those are inherited by Workers by default, for example.

@mcollina
Copy link
Member

mcollina commented Dec 7, 2022

I think adding a command line flag for this would be useful too.

@ShogunPanda
Copy link
Contributor Author

@mcollina @addaleax CLI option added!

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

@mcollina mcollina added notable-change PRs with changes that should be highlighted in changelogs. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 13, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 13, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

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

@nodejs-github-bot
Copy link
Collaborator

@juanarbol juanarbol added backport-open-v18.x Indicate that the PR has an open backport. and removed backport-blocked-v18.x PRs that should land on the v18.x-staging branch but are blocked by another PR's pending backport. labels May 31, 2023
juanarbol pushed a commit to juanarbol/node that referenced this pull request May 31, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@treysis
Copy link
Contributor

treysis commented Jun 7, 2023

This depends on #45057 to land cleanly in v18.x

Sooo, since #45057 and its 18.x backport #45994 (via 0d5e324) have made it into 18, can also this PR make it into 18.x?

juanarbol pushed a commit to juanarbol/node that referenced this pull request Jun 21, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 7, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 13, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 17, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Jul 26, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
mhdawson pushed a commit to mhdawson/io.js that referenced this pull request Aug 4, 2023
PR-URL: nodejs#45777
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
ruyadorno pushed a commit that referenced this pull request Aug 14, 2023
PR-URL: #45777
Backport-PR-URL: #49016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@ruyadorno ruyadorno added backported-to-v18.x PRs backported to the v18.x-staging branch. and removed backport-open-v18.x Indicate that the PR has an open backport. labels Aug 14, 2023
ruyadorno added a commit that referenced this pull request Aug 17, 2023
Notable changes:

net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777

PR-URL: TODO
@ruyadorno ruyadorno mentioned this pull request Aug 17, 2023
ruyadorno added a commit that referenced this pull request Aug 29, 2023
Notable changes:

net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 1, 2023
Notable changes:

net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777

PR-URL: TODO
ruyadorno added a commit that referenced this pull request Sep 6, 2023
Notable changes:

net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 8, 2023
Notable changes:

crypto:
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
doc:
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 10, 2023
Notable changes:

crypto:
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
doc:
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 10, 2023
Notable changes:

crypto:
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
doc:
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 11, 2023
Notable changes:

crypto:
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
doc:
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 11, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) #48078
crypto:
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
doc:
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 12, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) #48078
crypto:
  * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
doc:
  * add atlowChemi to collaborators (atlowChemi) #48757
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 13, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) #48078
crypto:
  * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
doc:
  * add atlowChemi to collaborators (atlowChemi) #48757
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 17, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) #48078
crypto:
  * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
doc:
  * add atlowChemi to collaborators (atlowChemi) #48757
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
ruyadorno added a commit that referenced this pull request Sep 18, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) #48078
crypto:
  * update root certificates to NSS 3.93 (Node.js GitHub Bot) #49341
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) #48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) #48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) #48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) #48078
doc:
  * add atlowChemi to collaborators (atlowChemi) #48757
  * add vmoroz to collaborators (Vladimir Morozov) #48527
  * add kvakil to collaborators (Keyhan Vakil) #48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) #43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) #48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) #48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) #45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) #47885

PR-URL: #49220
alexfernandez pushed a commit to alexfernandez/node that referenced this pull request Nov 1, 2023
Notable changes:

build:
  * sync libuv header change (Jiawen Geng) nodejs#48078
crypto:
  * update root certificates to NSS 3.93 (Node.js GitHub Bot) nodejs#49341
  * update root certificates to NSS 3.90 (Node.js GitHub Bot) nodejs#48416
deps:
  * add missing thread-common.c in uv.gyp (Santiago Gimeno) nodejs#48078
  * upgrade to libuv 1.46.0 (Santiago Gimeno) nodejs#48078
  * upgrade to libuv 1.45.0 (Santiago Gimeno) nodejs#48078
doc:
  * add atlowChemi to collaborators (atlowChemi) nodejs#48757
  * add vmoroz to collaborators (Vladimir Morozov) nodejs#48527
  * add kvakil to collaborators (Keyhan Vakil) nodejs#48449
esm:
  * (SEMVER-MINOR) add `--import` flag (Moshe Atlow) nodejs#43942
events:
  * (SEMVER-MINOR) allow safely adding listener to abortSignal (Chemi Atlow) nodejs#48596
fs, stream:
  * initial `Symbol.dispose` and `Symbol.asyncDispose` support (Moshe Atlow) nodejs#48518
net:
  * add autoSelectFamily global getter and setter (Paolo Insogna) nodejs#45777
url:
  * (SEMVER-MINOR) add value argument to has and delete methods (Sankalp Shubham) nodejs#47885

PR-URL: nodejs#49220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-to-v18.x PRs backported to the v18.x-staging branch. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. net Issues and PRs related to the net subsystem. notable-change PRs with changes that should be highlighted in changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants