Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 4581f84

Browse files
danbevaddaleaxgengjiawenjasnellLPardue
committed
quic: initial protocol implementation
Co-authored-by: Anna Henningsen <anna@addaleax.net> Co-authored-by: Author: Daniel Bevenius <daniel.bevenius@gmail.com> Co-authored-by: gengjiawen <technicalcute@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com> Co-authored-by: oyyd <oyydoibh@gmail.com
1 parent ba1c9a3 commit 4581f84

186 files changed

Lines changed: 67642 additions & 101 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,32 @@ The externally maintained libraries used by Node.js are:
13161316
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13171317
"""
13181318

1319+
- ngtcp2, located at deps/ngtcp2, is licensed as follows:
1320+
"""
1321+
The MIT License
1322+
1323+
Copyright (c) 2016 ngtcp2 contributors
1324+
1325+
Permission is hereby granted, free of charge, to any person obtaining
1326+
a copy of this software and associated documentation files (the
1327+
"Software"), to deal in the Software without restriction, including
1328+
without limitation the rights to use, copy, modify, merge, publish,
1329+
distribute, sublicense, and/or sell copies of the Software, and to
1330+
permit persons to whom the Software is furnished to do so, subject to
1331+
the following conditions:
1332+
1333+
The above copyright notice and this permission notice shall be
1334+
included in all copies or substantial portions of the Software.
1335+
1336+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1337+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1338+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1339+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
1340+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
1341+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1342+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1343+
"""
1344+
13191345
- node-inspect, located at deps/node-inspect, is licensed as follows:
13201346
"""
13211347
Copyright Node.js contributors. All rights reserved.

configure.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
choices=valid_os,
109109
help='operating system to build for ({0})'.format(', '.join(valid_os)))
110110

111+
parser.add_option('--experimental-quic',
112+
action='store_true',
113+
dest='experimental_quic',
114+
help='enable experimental quic support')
115+
111116
parser.add_option('--gdb',
112117
action='store_true',
113118
dest='gdb',
@@ -250,6 +255,27 @@
250255
dest='shared_nghttp2_libpath',
251256
help='a directory to search for the shared nghttp2 DLLs')
252257

258+
shared_optgroup.add_option('--shared-ngtcp2',
259+
action='store_true',
260+
dest='shared_ngtcp2',
261+
help='link to a shared ngtcp2 DLL instead of static linking')
262+
263+
shared_optgroup.add_option('--shared-ngtcp2-includes',
264+
action='store',
265+
dest='shared_ngtcp2_includes',
266+
help='directory containing ngtcp2 header files')
267+
268+
shared_optgroup.add_option('--shared-ngtcp2-libname',
269+
action='store',
270+
dest='shared_ngtcp2_libname',
271+
default='ngtcp2',
272+
help='alternative lib name to link to [default: %default]')
273+
274+
shared_optgroup.add_option('--shared-ngtcp2-libpath',
275+
action='store',
276+
dest='shared_ngctp2_libpath',
277+
help='a directory to search for the shared ngtcp2 DLLs')
278+
253279
shared_optgroup.add_option('--shared-openssl',
254280
action='store_true',
255281
dest='shared_openssl',
@@ -1093,6 +1119,11 @@ def configure_node(o):
10931119
else:
10941120
o['variables']['debug_nghttp2'] = 'false'
10951121

1122+
if options.experimental_quic:
1123+
o['variables']['experimental_quic'] = 1
1124+
else:
1125+
o['variables']['experimental_quic'] = 'false'
1126+
10961127
o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
10971128
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
10981129
if o['variables']['want_separate_host_toolset'] == 0:
@@ -1213,6 +1244,8 @@ def without_ssl_error(option):
12131244
without_ssl_error('--openssl-no-asm')
12141245
if options.openssl_fips:
12151246
without_ssl_error('--openssl-fips')
1247+
if options.experimental_quic:
1248+
without_ssl_error('--experimental-quic')
12161249
return
12171250

12181251
if options.use_openssl_ca_store:

deps/nghttp3/COPYING

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License
2+
3+
Copyright (c) 2019 nghttp3 contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

deps/nghttp3/lib/includes/config.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
/* Edited to match src/node.h. */
3+
#include <stdint.h>
4+
5+
#ifdef _WIN32
6+
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
7+
typedef intptr_t ssize_t;
8+
# define _SSIZE_T_
9+
# define _SSIZE_T_DEFINED
10+
#endif
11+
#else // !_WIN32
12+
# include <sys/types.h> // size_t, ssize_t
13+
#endif // _WIN32
14+
15+
#ifdef _MSC_VER
16+
# include <intrin.h>
17+
# define __builtin_popcount __popcnt
18+
#endif
19+
20+
/* Define to 1 to enable debug output. */
21+
/* #undef DEBUGBUILD */
22+
23+
/* Define to 1 if you have the <arpa/inet.h> header file. */
24+
/* #undef HAVE_ARPA_INET_H */
25+
26+
/* Define to 1 if you have the <stddef.h> header file. */
27+
#define HAVE_STDDEF_H 1
28+
29+
/* Define to 1 if you have the <stdint.h> header file. */
30+
#define HAVE_STDINT_H 1
31+
32+
/* Define to 1 if you have the <stdlib.h> header file. */
33+
#define HAVE_STDLIB_H 1
34+
35+
/* Define to 1 if you have the <string.h> header file. */
36+
#define HAVE_STRING_H 1
37+
38+
/* Define to 1 if you have the <unistd.h> header file. */
39+
/* #undef HAVE_UNISTD_H */

0 commit comments

Comments
 (0)