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

quic: initial experimental quic implementation #30943

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 52 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,58 @@ The externally maintained libraries used by Node.js are:
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- ngtcp2, located at deps/ngtcp2, is licensed as follows:
"""
The MIT License

Copyright (c) 2016 ngtcp2 contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- nghttp3, located at deps/nghttp3, is licensed as follows:
"""
The MIT License

Copyright (c) 2019 nghttp3 contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

- node-inspect, located at deps/node-inspect, is licensed as follows:
"""
Copyright Node.js contributors. All rights reserved.
Expand Down
57 changes: 57 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
choices=valid_os,
help='operating system to build for ({0})'.format(', '.join(valid_os)))

parser.add_option('--experimental-quic',
action='store_true',
dest='experimental_quic',
help='enable experimental quic support')

parser.add_option('--gdb',
action='store_true',
dest='gdb',
Expand Down Expand Up @@ -259,6 +264,48 @@
dest='shared_nghttp2_libpath',
help='a directory to search for the shared nghttp2 DLLs')

shared_optgroup.add_option('--shared-ngtcp2',
action='store_true',
dest='shared_ngtcp2',
help='link to a shared ngtcp2 DLL instead of static linking')

shared_optgroup.add_option('--shared-ngtcp2-includes',
action='store',
dest='shared_ngtcp2_includes',
help='directory containing ngtcp2 header files')

shared_optgroup.add_option('--shared-ngtcp2-libname',
action='store',
dest='shared_ngtcp2_libname',
default='ngtcp2',
help='alternative lib name to link to [default: %default]')

shared_optgroup.add_option('--shared-ngtcp2-libpath',
action='store',
dest='shared_ngtcp2_libpath',
help='a directory to search for the shared ngtcp2 DLLs')

shared_optgroup.add_option('--shared-nghttp3',
action='store_true',
dest='shared_nghttp3',
help='link to a shared nghttp3 DLL instead of static linking')

shared_optgroup.add_option('--shared-nghttp3-includes',
action='store',
dest='shared_nghttp3_includes',
help='directory containing nghttp3 header files')

shared_optgroup.add_option('--shared-nghttp3-libname',
action='store',
dest='shared_nghttp3_libname',
default='nghttp3',
help='alternative lib name to link to [default: %default]')

shared_optgroup.add_option('--shared-nghttp3-libpath',
action='store',
dest='shared_nghttp3_libpath',
help='a directory to search for the shared nghttp3 DLLs')

shared_optgroup.add_option('--shared-openssl',
action='store_true',
dest='shared_openssl',
Expand Down Expand Up @@ -1146,6 +1193,14 @@ def configure_node(o):
else:
o['variables']['debug_nghttp2'] = 'false'

if options.experimental_quic:
if options.shared_openssl:
raise Exception('QUIC requires modified version of OpenSSL and cannot be'
' enabled with --shared-openssl.')
o['variables']['experimental_quic'] = 1
else:
o['variables']['experimental_quic'] = 'false'

o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)

o['variables']['node_shared'] = b(options.shared)
Expand Down Expand Up @@ -1273,6 +1328,8 @@ def without_ssl_error(option):
without_ssl_error('--openssl-no-asm')
if options.openssl_fips:
without_ssl_error('--openssl-fips')
if options.experimental_quic:
without_ssl_error('--experimental-quic')
return

if options.use_openssl_ca_store:
Expand Down
22 changes: 22 additions & 0 deletions deps/nghttp3/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License

Copyright (c) 2019 nghttp3 contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39 changes: 39 additions & 0 deletions deps/nghttp3/lib/includes/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

/* Edited to match src/node.h. */
#include <stdint.h>

#ifdef _WIN32
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
typedef intptr_t ssize_t;
# define _SSIZE_T_
# define _SSIZE_T_DEFINED
#endif
#else // !_WIN32
# include <sys/types.h> // size_t, ssize_t
#endif // _WIN32

#ifdef _MSC_VER
# include <intrin.h>
# define __builtin_popcount __popcnt
#endif

/* Define to 1 to enable debug output. */
/* #undef DEBUGBUILD */

/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef HAVE_ARPA_INET_H */

/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
Loading