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

Commit

Permalink
quic: initial quic implementation
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Henningsen <anna@addaleax.net>
Co-authored-by: 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: Ouyang Yadong <oyydoibh@gmail.com>
Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com>
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Denys Otrishko <shishugi@gmail.com>
  • Loading branch information
9 people committed Dec 13, 2019
1 parent 4a01e47 commit 04c4af9
Show file tree
Hide file tree
Showing 102 changed files with 23,458 additions and 428 deletions.
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,32 @@ 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.
"""

- node-inspect, located at deps/node-inspect, is licensed as follows:
"""
Copyright Node.js contributors. All rights reserved.
Expand Down
36 changes: 36 additions & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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 @@ -254,6 +259,27 @@
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_ngctp2_libpath',
help='a directory to search for the shared ngtcp2 DLLs')

shared_optgroup.add_option('--shared-openssl',
action='store_true',
dest='shared_openssl',
Expand Down Expand Up @@ -1112,6 +1138,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 @@ -1230,6 +1264,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
74 changes: 74 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,70 @@ A non-context-aware native addon was loaded in a process that disallows them.

A given value is out of the accepted range.

<a id="ERR_QUIC_ERROR"></a>
### ERR_QUIC_ERROR

TBD

<a id="ERR_QUICCLIENTSESSION_FAILED"></a>
### ERR_QUICCLIENTSESSION_FAILED

TBD

<a id="ERR_QUICCLIENTSESSION_FAILED_SETSOCKET"></a>
### ERR_QUICCLIENTSESSION_FAILED_SETSOCKET

TBD

<a id="ERR_QUICSESSION_DESTROYED"></a>
### ERR_QUICSESSION_DESTROYED

TBD

<a id="ERR_QUICSESSION_INVALID_DCID"></a>
### ERR_QUICSESSION_INVALID_DCID

TBD

<a id="ERR_QUICSESSION_UPDATEKEY"></a>
### ERR_QUICSESSION_UPDATEKEY

TBD

<a id="ERR_QUICSESSION_VERSION_NEGOTIATION"></a>
### ERR_QUICSESSION_VERSION_NEGOTIATION

TBD

<a id="ERR_QUICSOCKET_CLOSING"></a>
### ERR_QUICSOCKET_CLOSING

TBD

<a id="ERR_QUICSOCKET_DESTROYED"></a>
### ERR_QUICSOCKET_DESTROYED

TBD

<a id="ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH"></a>
### ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH
TBD

<a id="ERR_QUICSOCKET_LISTENING"></a>
### ERR_QUICSOCKET_LISTENING

TBD

<a id="ERR_QUICSOCKET_UNBOUND"></a>
### ERR_QUICSOCKET_UNBOUND

TBD

<a id="ERR_QUICSTREAM_OPEN_FAILED"></a>
### ERR_QUICSTREAM_OPEN_FAILED

TBD

<a id="ERR_REQUIRE_ESM"></a>
### ERR_REQUIRE_ESM

Expand Down Expand Up @@ -2115,6 +2179,16 @@ removed: v10.0.0
Used when a failure occurs sending an individual frame on the HTTP/2
session.

<a id="ERR_QUIC_TLS13_REQUIRED"></a>
### ERR_QUIC_TLS13_REQUIRED
<!-- YAML
added: v9.0.0
removed: v10.0.0
-->

Used when a failure occurs sending an individual frame on the HTTP/2
session.

<a id="ERR_HTTP2_HEADERS_OBJECT"></a>
### ERR_HTTP2_HEADERS_OBJECT
<!-- YAML
Expand Down
1 change: 1 addition & 0 deletions doc/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* [Process](process.html)
* [Punycode](punycode.html)
* [Query Strings](querystring.html)
* [QUIC](quic.html)
* [Readline](readline.html)
* [REPL](repl.html)
* [Report](report.html)
Expand Down
Loading

0 comments on commit 04c4af9

Please sign in to comment.