GeezerVison is showing github.com — quic: move quic behind compile time flag · nodejs/node@08726cd
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: configure.py +11Lines changed: 11 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 967 | 967 | default=None, | 968 | 968 | help='build without SQLite (disables SQLite and Web Storage API)') | 969 | 969 |
| | 970 | +parser.add_argument('--experimental-quic', | | 971 | + action='store_true', | | 972 | + dest='experimental_quic', | | 973 | + default=None, | | 974 | + help='build with experimental QUIC support') | | 975 | + | 970 | 976 | parser.add_argument('--ninja', | 971 | 977 | action='store_true', | 972 | 978 | dest='use_ninja', | @@ -2009,6 +2015,10 @@ def without_sqlite_error(option): | 2009 | 2015 |
| 2010 | 2016 | configure_library('sqlite', o, pkgname='sqlite3') | 2011 | 2017 |
| | 2018 | +def configure_quic(o): | | 2019 | + o['variables']['node_use_quic'] = b(options.experimental_quic and | | 2020 | + not options.without_ssl) | | 2021 | + | 2012 | 2022 | def configure_static(o): | 2013 | 2023 | if options.fully_static or options.partly_static: | 2014 | 2024 | if flavor == 'mac': | @@ -2460,6 +2470,7 @@ def make_bin_override(): | 2460 | 2470 | configure_library('zstd', output, pkgname='libzstd') | 2461 | 2471 | configure_v8(output, configurations) | 2462 | 2472 | configure_openssl(output) | | 2473 | +configure_quic(output) | 2463 | 2474 | configure_intl(output) | 2464 | 2475 | configure_static(output) | 2465 | 2476 | configure_inspector(output) | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -288,7 +288,8 @@ const features = { | 288 | 288 | get quic() { | 289 | 289 | // TODO(@jasnell): When the implementation is updated to support Boring, | 290 | 290 | // then this should be refactored to depend not only on the OpenSSL version. | 291 | | - return !openSSLIsBoringSSL && | | 291 | + return process.config.variables.node_use_quic && | | 292 | + !openSSLIsBoringSSL && | 292 | 293 | getOptionValue('--experimental-quic') && | 293 | 294 | process.config.variables.openssl_version >= 810549279; // >= 3.5.1 | 294 | 295 | }, | |
Collapse file Copy file name to clipboardExpand all lines: node.gyp +33-16Lines changed: 33 additions & 16 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 32 | 32 | 'node_use_bundled_v8%': 'true', | 33 | 33 | 'node_use_node_snapshot%': 'false', | 34 | 34 | 'node_use_openssl%': 'true', | | 35 | + 'node_use_quic%': 'false', | 35 | 36 | 'node_use_sqlite%': 'true', | 36 | 37 | 'node_use_v8_platform%': 'true', | 37 | 38 | 'node_v8_options%': '', | | 192 | 193 | 'src/udp_wrap.cc', | 193 | 194 | 'src/util.cc', | 194 | 195 | 'src/uv.cc', | 195 | | - 'src/quic/bindingdata.cc', | 196 | | - 'src/quic/cid.cc', | 197 | | - 'src/quic/data.cc', | 198 | | - 'src/quic/logstream.cc', | 199 | | - 'src/quic/packet.cc', | 200 | | - 'src/quic/preferredaddress.cc', | 201 | | - 'src/quic/sessionticket.cc', | 202 | | - 'src/quic/tokens.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', | 211 | 196 | # headers to make for a more pleasant IDE experience | 212 | 197 | 'src/aliased_buffer.h', | 213 | 198 | 'src/aliased_buffer-inl.h', | | 345 | 330 | 'src/udp_wrap.h', | 346 | 331 | 'src/util.h', | 347 | 332 | 'src/util-inl.h', | | 333 | + ], | | 334 | + 'node_quic_sources': [ | | 335 | + 'src/quic/bindingdata.cc', | | 336 | + 'src/quic/cid.cc', | | 337 | + 'src/quic/data.cc', | | 338 | + 'src/quic/logstream.cc', | | 339 | + 'src/quic/packet.cc', | | 340 | + 'src/quic/preferredaddress.cc', | | 341 | + 'src/quic/sessionticket.cc', | | 342 | + 'src/quic/tokens.cc', | | 343 | + 'src/quic/application.cc', | | 344 | + 'src/quic/endpoint.cc', | | 345 | + 'src/quic/http3.cc', | | 346 | + 'src/quic/session.cc', | | 347 | + 'src/quic/streams.cc', | | 348 | + 'src/quic/tlscontext.cc', | | 349 | + 'src/quic/transportparams.cc', | | 350 | + 'src/quic/quic.cc', | 348 | 351 | 'src/quic/arena.h', | 349 | 352 | 'src/quic/bindingdata.h', | 350 | 353 | 'src/quic/cid.h', | | 428 | 431 | 'test/cctest/test_crypto_clienthello.cc', | 429 | 432 | 'test/cctest/test_node_crypto.cc', | 430 | 433 | 'test/cctest/test_node_crypto_env.cc', | | 434 | + ], | | 435 | + 'node_cctest_quic_sources': [ | 431 | 436 | 'test/cctest/test_quic_arena.cc', | 432 | 437 | 'test/cctest/test_quic_cid.cc', | 433 | 438 | 'test/cctest/test_quic_error.cc', | | 1008 | 1013 | '<@(node_sqlite_sources)', | 1009 | 1014 | ], | 1010 | 1015 | }], | | 1016 | + [ 'node_use_quic=="true"', { | | 1017 | + 'sources': [ | | 1018 | + '<@(node_quic_sources)', | | 1019 | + ], | | 1020 | + }], | 1011 | 1021 | [ 'OS in "linux freebsd mac solaris openharmony" and ' | 1012 | 1022 | 'target_arch=="x64" and ' | 1013 | 1023 | 'node_target_type=="executable"', { | | 1312 | 1322 | }, { | 1313 | 1323 | 'sources!': [ '<@(node_cctest_openssl_sources)' ], | 1314 | 1324 | }], | | 1325 | + [ 'node_use_quic=="true"', { | | 1326 | + 'defines': [ | | 1327 | + 'HAVE_QUIC=1', | | 1328 | + ], | | 1329 | + }, { | | 1330 | + 'sources!': [ '<@(node_cctest_quic_sources)' ], | | 1331 | + }], | 1315 | 1332 | ['v8_enable_inspector==1', { | 1316 | 1333 | 'defines': [ | 1317 | 1334 | 'HAVE_INSPECTOR=1', | |
Collapse file Copy file name to clipboardExpand all lines: node.gypi +17-2Lines changed: 17 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 390 | 390 | 'defines': [ 'OPENSSL_API_COMPAT=0x10100000L', ], | 391 | 391 | 'dependencies': [ | 392 | 392 | './deps/openssl/openssl.gyp:openssl', | 393 | | - './deps/ngtcp2/ngtcp2.gyp:ngtcp2', | 394 | | - './deps/ngtcp2/ngtcp2.gyp:nghttp3', | 395 | 393 |
| 396 | 394 | # For tests | 397 | 395 | './deps/openssl/openssl.gyp:openssl-cli', | | 446 | 444 | }, { | 447 | 445 | 'defines': [ 'HAVE_SQLITE=0' ] | 448 | 446 | }], | | 447 | + [ 'node_use_quic=="true"', { | | 448 | + 'defines': [ 'HAVE_QUIC=1' ], | | 449 | + 'conditions': [ | | 450 | + [ 'node_shared_openssl=="false"', { | | 451 | + 'dependencies': [ | | 452 | + './deps/ngtcp2/ngtcp2.gyp:ngtcp2', | | 453 | + './deps/ngtcp2/ngtcp2.gyp:nghttp3', | | 454 | + | | 455 | + # For tests | | 456 | + './deps/ngtcp2/ngtcp2.gyp:ngtcp2_test_server', | | 457 | + './deps/ngtcp2/ngtcp2.gyp:ngtcp2_test_client', | | 458 | + ], | | 459 | + }], | | 460 | + ], | | 461 | + }, { | | 462 | + 'defines': [ 'HAVE_QUIC=0' ] | | 463 | + }], | 449 | 464 | ], | 450 | 465 | } |
Collapse file Copy file name to clipboardExpand all lines: src/quic/application.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include <async_wrap-inl.h> | @@ -615,4 +615,4 @@ std::unique_ptr<Session::Application> Session::SelectApplication( | 615 | 615 | } // namespace node | 616 | 616 |
| 617 | 617 | #endif // OPENSSL_NO_QUIC | 618 | | -#endif // HAVE_OPENSSL | | 618 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
Collapse file Copy file name to clipboardExpand all lines: src/quic/bindingdata.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include <base_object-inl.h> | @@ -215,4 +215,4 @@ JS_METHOD_IMPL(IllegalConstructor) { | 215 | 215 | } // namespace node | 216 | 216 |
| 217 | 217 | #endif // OPENSSL_NO_QUIC | 218 | | -#endif // HAVE_OPENSSL | | 218 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
Collapse file Copy file name to clipboardExpand all lines: src/quic/cid.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include <crypto/crypto_util.h> | @@ -155,4 +155,4 @@ const CID::Factory& CID::Factory::random() { | 155 | 155 |
| 156 | 156 | } // namespace node::quic | 157 | 157 | #endif // OPENSSL_NO_QUIC | 158 | | -#endif // HAVE_OPENSS | | 158 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
Collapse file Copy file name to clipboardExpand all lines: src/quic/data.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include "data.h" | @@ -417,4 +417,4 @@ const QuicError QuicError::INTERNAL_ERROR = ForNgtcp2Error(NGTCP2_ERR_INTERNAL); | 417 | 417 | } // namespace node | 418 | 418 |
| 419 | 419 | #endif // OPENSSL_NO_QUIC | 420 | | -#endif // HAVE_OPENSSL | | 420 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
Collapse file Copy file name to clipboardExpand all lines: src/quic/endpoint.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include <aliased_struct-inl.h> | @@ -1756,4 +1756,4 @@ JS_METHOD_IMPL(Endpoint::Ref) { | 1756 | 1756 | } // namespace quic | 1757 | 1757 | } // namespace node | 1758 | 1758 | #endif // OPENSSL_NO_QUIC | 1759 | | -#endif // HAVE_OPENSSL | | 1759 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
Collapse file Copy file name to clipboardExpand all lines: src/quic/http3.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -#if HAVE_OPENSSL | | 1 | +#if HAVE_OPENSSL && HAVE_QUIC | 2 | 2 | #include "guard.h" | 3 | 3 | #ifndef OPENSSL_NO_QUIC | 4 | 4 | #include "http3.h" | @@ -1071,4 +1071,4 @@ std::unique_ptr<Session::Application> Http3Application::Create( | 1071 | 1071 | } // namespace quic | 1072 | 1072 | } // namespace node | 1073 | 1073 | #endif // OPENSSL_NO_QUIC | 1074 | | -#endif // HAVE_OPENSSL | | 1074 | +#endif // HAVE_OPENSSL && HAVE_QUIC |
|