GeezerVison is showing github.com — quic: multiple fixups and updates · nodejs/node@3be70ff
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: configure.py -13Lines changed: 0 additions & 13 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 949 | 949 |
| 950 | 950 | # End dummy list. | 951 | 951 |
| 952 | | -parser.add_argument('--with-quic', | 953 | | - action='store_true', | 954 | | - dest='quic', | 955 | | - default=None, | 956 | | - help='build with QUIC support') | 957 | | - | 958 | 952 | parser.add_argument('--without-ssl', | 959 | 953 | action='store_true', | 960 | 954 | dest='without_ssl', | @@ -1941,7 +1935,6 @@ def configure_openssl(o): | 1941 | 1935 | variables['node_shared_ngtcp2'] = b(options.shared_ngtcp2) | 1942 | 1936 | variables['node_shared_nghttp3'] = b(options.shared_nghttp3) | 1943 | 1937 | variables['openssl_is_fips'] = b(options.openssl_is_fips) | 1944 | | - variables['node_quic'] = b(options.quic) | 1945 | 1938 | variables['node_fipsinstall'] = b(False) | 1946 | 1939 |
| 1947 | 1940 | if options.openssl_no_asm: | @@ -2003,12 +1996,6 @@ def without_ssl_error(option): | 2003 | 1996 | if options.openssl_is_fips and not options.shared_openssl: | 2004 | 1997 | variables['node_fipsinstall'] = b(True) | 2005 | 1998 |
| 2006 | | - variables['openssl_quic'] = b(options.quic) | 2007 | | - if options.quic: | 2008 | | - o['defines'] += ['NODE_OPENSSL_HAS_QUIC'] | 2009 | | - | 2010 | | - o['variables']['openssl_version'] = get_openssl_version() | 2011 | | - | 2012 | 1999 | configure_library('openssl', o) | 2013 | 2000 |
| 2014 | 2001 | def configure_sqlite(o): | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/cli.md +20Lines changed: 20 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1140,6 +1140,16 @@ If the ES module being `require()`'d contains top-level `await`, this flag | 1140 | 1140 | allows Node.js to evaluate the module, try to locate the | 1141 | 1141 | top-level awaits, and print their location to help users find them. | 1142 | 1142 |
| | 1143 | +### `--experimental-quic` | | 1144 | + | | 1145 | +<!-- YAML | | 1146 | +added: REPLACEME | | 1147 | +--> | | 1148 | + | | 1149 | +> Stability: 1.1 - Active development | | 1150 | +
| | 1151 | +Enable experimental support for the QUIC protocol. | | 1152 | + | 1143 | 1153 | ### `--experimental-sea-config` | 1144 | 1154 |
| 1145 | 1155 | <!-- YAML | @@ -1812,6 +1822,16 @@ added: v21.2.0 | 1812 | 1822 |
| 1813 | 1823 | Disable exposition of [Navigator API][] on the global scope. | 1814 | 1824 |
| | 1825 | +### `--no-experimental-quic` | | 1826 | + | | 1827 | +<!-- YAML | | 1828 | +added: REPLACEME | | 1829 | +--> | | 1830 | + | | 1831 | +> Stability: 1.1 - Active Development | | 1832 | +
| | 1833 | +Use this flag to disable QUIC. | | 1834 | + | 1815 | 1835 | ### `--no-experimental-repl-await` | 1816 | 1836 |
| 1817 | 1837 | <!-- YAML | |
Collapse file Copy file name to clipboardExpand all lines: doc/node-config-schema.json +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 159 | 159 | "experimental-print-required-tla": { | 160 | 160 | "type": "boolean" | 161 | 161 | }, | | 162 | + "experimental-quic": { | | 163 | + "type": "boolean" | | 164 | + }, | 162 | 165 | "experimental-repl-await": { | 163 | 166 | "type": "boolean" | 164 | 167 | }, | |
Collapse file Copy file name to clipboardExpand all lines: doc/node.1 +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -229,6 +229,9 @@ flag is no longer required as WASI is enabled by default. | 229 | 229 | .It Fl -experimental-quic | 230 | 230 | Enable the experimental QUIC support. | 231 | 231 | . | | 232 | +.It Fl -no-experimental-quic | | 233 | +Disable the experimental QUIC support. | | 234 | +. | 232 | 235 | .It Fl -experimental-inspector-network-resource | 233 | 236 | Enable experimental support for inspector network resources. | 234 | 237 | . | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -285,6 +285,13 @@ const features = { | 285 | 285 | get require_module() { | 286 | 286 | return getOptionValue('--require-module'); | 287 | 287 | }, | | 288 | + get quic() { | | 289 | + // TODO(@jasnell): When the implementation is updated to support Boring, | | 290 | + // then this should be refactored to depend not only on the OpenSSL version. | | 291 | + return !openSSLIsBoringSSL && | | 292 | + getOptionValue('--experimental-quic') && | | 293 | + process.config.variables.openssl_version >= 810549279; // >= 3.5.1 | | 294 | + }, | 288 | 295 | }; | 289 | 296 |
| 290 | 297 | ObjectDefineProperty(process, 'features', { | |
Collapse file Copy file name to clipboardExpand all lines: node.gyp +15-22Lines changed: 15 additions & 22 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 200 | 200 | 'src/quic/preferredaddress.cc', | 201 | 201 | 'src/quic/sessionticket.cc', | 202 | 202 | 'src/quic/tokens.cc', | 203 | | -# 'src/quic/transportparams.cc', | | 203 | + 'src/quic/application.cc', | | 204 | + 'src/quic/endpoint.cc', | | 205 | + 'src/quic/http3.cc', | | 206 | + 'src/quic/session.cc', | | 207 | + 'src/quic/streams.cc', | | 208 | + 'src/quic/tlscontext.cc', | | 209 | + 'src/quic/transportparams.cc', | | 210 | + 'src/quic/quic.cc', | 204 | 211 | # headers to make for a more pleasant IDE experience | 205 | 212 | 'src/aliased_buffer.h', | 206 | 213 | 'src/aliased_buffer-inl.h', | | 347 | 354 | 'src/quic/preferredaddress.h', | 348 | 355 | 'src/quic/sessionticket.h', | 349 | 356 | 'src/quic/tokens.h', | 350 | | -# 'src/quic/transportparams.h', | | 357 | + 'src/quic/transportparams.h', | | 358 | + 'src/quic/application.h', | | 359 | + 'src/quic/endpoint.h', | | 360 | + 'src/quic/http3.h', | | 361 | + 'src/quic/session.h', | | 362 | + 'src/quic/streams.h', | | 363 | + 'src/quic/tlscontext.h', | 351 | 364 | 'src/quic/guard.h', | 352 | 365 | ], | 353 | 366 | 'node_crypto_sources': [ | | 410 | 423 | 'src/node_crypto.cc', | 411 | 424 | 'src/node_crypto.h', | 412 | 425 | ], | 413 | | - 'node_quic_sources': [ | 414 | | - 'src/quic/application.cc', | 415 | | - 'src/quic/endpoint.cc', | 416 | | - 'src/quic/http3.cc', | 417 | | - 'src/quic/session.cc', | 418 | | - 'src/quic/streams.cc', | 419 | | - 'src/quic/tlscontext.cc', | 420 | | - 'src/quic/application.h', | 421 | | - 'src/quic/endpoint.h', | 422 | | - 'src/quic/http3.h', | 423 | | - 'src/quic/session.h', | 424 | | - 'src/quic/streams.h', | 425 | | - 'src/quic/tlscontext.h', | 426 | | - 'src/quic/quic.cc', | 427 | | - ], | 428 | 426 | 'node_cctest_openssl_sources': [ | 429 | 427 | 'test/cctest/test_crypto_clienthello.cc', | 430 | 428 | 'test/cctest/test_node_crypto.cc', | | 1003 | 1001 | 'deps/ncrypto/ncrypto.gyp:ncrypto', | 1004 | 1002 | ], | 1005 | 1003 | }], | 1006 | | - [ 'node_quic=="true"', { | 1007 | | - 'sources': [ | 1008 | | - '<@(node_quic_sources)', | 1009 | | - ], | 1010 | | - }], | 1011 | 1004 | [ 'node_use_sqlite=="true"', { | 1012 | 1005 | 'sources': [ | 1013 | 1006 | '<@(node_sqlite_sources)', | |
Collapse file Copy file name to clipboardExpand all lines: node.gypi -6Lines changed: 0 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 432 | 432 | }], | 433 | 433 | ] | 434 | 434 | }], | 435 | | - [ 'openssl_quic=="true" and node_shared_ngtcp2=="false"', { | 436 | | - 'dependencies': [ './deps/ngtcp2/ngtcp2.gyp:ngtcp2' ] | 437 | | - }], | 438 | | - [ 'openssl_quic=="true" and node_shared_nghttp3=="false"', { | 439 | | - 'dependencies': [ './deps/ngtcp2/ngtcp2.gyp:nghttp3' ] | 440 | | - }] | 441 | 435 | ] | 442 | 436 | }, { | 443 | 437 | 'defines': [ 'HAVE_OPENSSL=0' ] | |
Collapse file Copy file name to clipboardExpand all lines: src/node_binding.h +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 |
| 10 | 10 | #include "node.h" | 11 | 11 | #include "node_api.h" | | 12 | +#include "quic/guard.h" | 12 | 13 | #include "uv.h" | 13 | 14 |
| 14 | 15 | enum { | @@ -29,7 +30,7 @@ static_assert(static_cast<int>(NM_F_LINKED) == | 29 | 30 | #define NODE_BUILTIN_ICU_BINDINGS(V) | 30 | 31 | #endif | 31 | 32 |
| 32 | | -#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC | | 33 | +#if HAVE_OPENSSL && OPENSSL_NO_QUIC != 1 | 33 | 34 | #define NODE_BUILTIN_QUIC_BINDINGS(V) V(quic) | 34 | 35 | #else | 35 | 36 | #define NODE_BUILTIN_QUIC_BINDINGS(V) | |
Collapse file Copy file name to clipboardExpand all lines: src/node_builtins.cc +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | #include "node_external_reference.h" | 7 | 7 | #include "node_internals.h" | 8 | 8 | #include "node_threadsafe_cow-inl.h" | | 9 | +#include "quic/guard.h" | 9 | 10 | #include "simdutf.h" | 10 | 11 | #include "util-inl.h" | 11 | 12 | #include "v8-value.h" | @@ -134,10 +135,10 @@ BuiltinLoader::BuiltinCategories BuiltinLoader::GetBuiltinCategories() const { | 134 | 135 | "internal/http2/core", "internal/http2/compat", | 135 | 136 | "internal/streams/lazy_transform", | 136 | 137 | #endif // !HAVE_OPENSSL | 137 | | -#if !NODE_OPENSSL_HAS_QUIC | | 138 | +#ifndef OPENSSL_NO_QUIC | 138 | 139 | "internal/quic/quic", "internal/quic/symbols", "internal/quic/stats", | 139 | 140 | "internal/quic/state", | 140 | | -#endif // !NODE_OPENSSL_HAS_QUIC | | 141 | +#endif // !OPENSSL_NO_QUIC | 141 | 142 | "quic", // Experimental. | 142 | 143 | "sqlite", // Experimental. | 143 | 144 | "sys", // Deprecated. | |
Collapse file Copy file name to clipboardExpand all lines: src/node_external_reference.h +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 |
| 6 | 6 | #include <cinttypes> | 7 | 7 | #include <vector> | | 8 | +#include "quic/guard.h" | 8 | 9 | #include "v8-fast-api-calls.h" | 9 | 10 | #include "v8.h" | 10 | 11 |
| @@ -137,7 +138,7 @@ class ExternalReferenceRegistry { | 137 | 138 | #define EXTERNAL_REFERENCE_BINDING_LIST_CRYPTO(V) | 138 | 139 | #endif // HAVE_OPENSSL | 139 | 140 |
| 140 | | -#if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC | | 141 | +#if HAVE_OPENSSL && OPENSSL_NO_QUIC != 1 | 141 | 142 | #define EXTERNAL_REFERENCE_BINDING_LIST_QUIC(V) V(quic) | 142 | 143 | #else | 143 | 144 | #define EXTERNAL_REFERENCE_BINDING_LIST_QUIC(V) | |
|