GeezerVison is showing github.com — quic: initial QUIC implementation · lerouxb/node@5536044
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: LICENSE +52Lines changed: 52 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1316,6 +1316,58 @@ The externally maintained libraries used by Node.js are: | 1316 | 1316 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 1317 | 1317 | """ | 1318 | 1318 |
| | 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 | + | | 1345 | +- nghttp3, located at deps/nghttp3, is licensed as follows: | | 1346 | + """ | | 1347 | + The MIT License | | 1348 | + | | 1349 | + Copyright (c) 2019 nghttp3 contributors | | 1350 | + | | 1351 | + Permission is hereby granted, free of charge, to any person obtaining | | 1352 | + a copy of this software and associated documentation files (the | | 1353 | + "Software"), to deal in the Software without restriction, including | | 1354 | + without limitation the rights to use, copy, modify, merge, publish, | | 1355 | + distribute, sublicense, and/or sell copies of the Software, and to | | 1356 | + permit persons to whom the Software is furnished to do so, subject to | | 1357 | + the following conditions: | | 1358 | + | | 1359 | + The above copyright notice and this permission notice shall be | | 1360 | + included in all copies or substantial portions of the Software. | | 1361 | + | | 1362 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | | 1363 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | | 1364 | + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | | 1365 | + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | | 1366 | + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | | 1367 | + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | | 1368 | + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | | 1369 | + """ | | 1370 | + | 1319 | 1371 | - node-inspect, located at deps/node-inspect, is licensed as follows: | 1320 | 1372 | """ | 1321 | 1373 | Copyright Node.js contributors. All rights reserved. | |
Collapse file Copy file name to clipboardExpand all lines: configure.py +57Lines changed: 57 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 122 | 122 | dest='error_on_warn', | 123 | 123 | help='Turn compiler warnings into errors for node core sources.') | 124 | 124 |
| | 125 | +parser.add_option('--experimental-quic', | | 126 | + action='store_true', | | 127 | + dest='experimental_quic', | | 128 | + help='enable experimental quic support') | | 129 | + | 125 | 130 | parser.add_option('--gdb', | 126 | 131 | action='store_true', | 127 | 132 | dest='gdb', | | 269 | 274 | dest='shared_nghttp2_libpath', | 270 | 275 | help='a directory to search for the shared nghttp2 DLLs') | 271 | 276 |
| | 277 | +shared_optgroup.add_option('--shared-ngtcp2', | | 278 | + action='store_true', | | 279 | + dest='shared_ngtcp2', | | 280 | + help='link to a shared ngtcp2 DLL instead of static linking') | | 281 | + | | 282 | +shared_optgroup.add_option('--shared-ngtcp2-includes', | | 283 | + action='store', | | 284 | + dest='shared_ngtcp2_includes', | | 285 | + help='directory containing ngtcp2 header files') | | 286 | + | | 287 | +shared_optgroup.add_option('--shared-ngtcp2-libname', | | 288 | + action='store', | | 289 | + dest='shared_ngtcp2_libname', | | 290 | + default='ngtcp2', | | 291 | + help='alternative lib name to link to [default: %default]') | | 292 | + | | 293 | +shared_optgroup.add_option('--shared-ngtcp2-libpath', | | 294 | + action='store', | | 295 | + dest='shared_ngtcp2_libpath', | | 296 | + help='a directory to search for the shared ngtcp2 DLLs') | | 297 | + | | 298 | +shared_optgroup.add_option('--shared-nghttp3', | | 299 | + action='store_true', | | 300 | + dest='shared_nghttp3', | | 301 | + help='link to a shared nghttp3 DLL instead of static linking') | | 302 | + | | 303 | +shared_optgroup.add_option('--shared-nghttp3-includes', | | 304 | + action='store', | | 305 | + dest='shared_nghttp3_includes', | | 306 | + help='directory containing nghttp3 header files') | | 307 | + | | 308 | +shared_optgroup.add_option('--shared-nghttp3-libname', | | 309 | + action='store', | | 310 | + dest='shared_nghttp3_libname', | | 311 | + default='nghttp3', | | 312 | + help='alternative lib name to link to [default: %default]') | | 313 | + | | 314 | +shared_optgroup.add_option('--shared-nghttp3-libpath', | | 315 | + action='store', | | 316 | + dest='shared_nghttp3_libpath', | | 317 | + help='a directory to search for the shared nghttp3 DLLs') | | 318 | + | 272 | 319 | shared_optgroup.add_option('--shared-openssl', | 273 | 320 | action='store_true', | 274 | 321 | dest='shared_openssl', | @@ -1178,6 +1225,14 @@ def configure_node(o): | 1178 | 1225 | else: | 1179 | 1226 | o['variables']['debug_nghttp2'] = 'false' | 1180 | 1227 |
| | 1228 | + if options.experimental_quic: | | 1229 | + if options.shared_openssl: | | 1230 | + raise Exception('QUIC requires a modified version of OpenSSL and ' | | 1231 | + 'cannot be enabled when using --shared-openssl.') | | 1232 | + o['variables']['experimental_quic'] = 1 | | 1233 | + else: | | 1234 | + o['variables']['experimental_quic'] = 'false' | | 1235 | + | 1181 | 1236 | o['variables']['node_no_browser_globals'] = b(options.no_browser_globals) | 1182 | 1237 |
| 1183 | 1238 | o['variables']['node_shared'] = b(options.shared) | @@ -1309,6 +1364,8 @@ def without_ssl_error(option): | 1309 | 1364 | without_ssl_error('--openssl-fips') | 1310 | 1365 | if options.openssl_default_cipher_list: | 1311 | 1366 | without_ssl_error('--openssl-default-cipher-list') | | 1367 | + if options.experimental_quic: | | 1368 | + without_ssl_error('--experimental-quic') | 1312 | 1369 | return | 1313 | 1370 |
| 1314 | 1371 | if options.use_openssl_ca_store: | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl.gyp +7Lines changed: 7 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | 'OPENSSL_NO_HW', | 17 | 17 | ], | 18 | 18 | 'conditions': [ | | 19 | + [ | | 20 | + # Disable building QUIC support in openssl if experimental_quic | | 21 | + # is not enabled. | | 22 | + 'experimental_quic!=1', { | | 23 | + 'defines': ['OPENSSL_NO_QUIC=1'], | | 24 | + } | | 25 | + ], | 19 | 26 | [ 'openssl_no_asm==1', { | 20 | 27 | 'includes': ['./openssl_no_asm.gypi'], | 21 | 28 | }, 'target_arch=="arm64" and OS=="win"', { | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/errors.md +119Lines changed: 119 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1717,6 +1717,125 @@ Accessing `Object.prototype.__proto__` has been forbidden using | 1717 | 1717 | [`Object.setPrototypeOf`][] should be used to get and set the prototype of an | 1718 | 1718 | object. | 1719 | 1719 |
| | 1720 | +<a id="ERR_QUIC_CANNOT_SET_GROUPS"></a> | | 1721 | +### `ERR_QUIC_CANNOT_SET_GROUPS` | | 1722 | + | | 1723 | +> Stability: 1 - Experimental | | 1724 | +
| | 1725 | +TBD | | 1726 | + | | 1727 | +<a id="ERR_QUIC_ERROR"></a> | | 1728 | +### `ERR_QUIC_ERROR` | | 1729 | + | | 1730 | +> Stability: 1 - Experimental | | 1731 | +
| | 1732 | +TBD | | 1733 | + | | 1734 | +<a id="ERR_QUIC_TLS13_REQUIRED"></a> | | 1735 | +### `ERR_QUIC_TLS13_REQUIRED` | | 1736 | + | | 1737 | +> Stability: 1 - Experimental | | 1738 | +
| | 1739 | +TBD | | 1740 | + | | 1741 | +<a id="ERR_QUICCLIENTSESSION_FAILED"></a> | | 1742 | +### `ERR_QUICCLIENTSESSION_FAILED` | | 1743 | + | | 1744 | +> Stability: 1 - Experimental | | 1745 | +
| | 1746 | +TBD | | 1747 | + | | 1748 | +<a id="ERR_QUICCLIENTSESSION_FAILED_SETSOCKET"></a> | | 1749 | +### `ERR_QUICCLIENTSESSION_FAILED_SETSOCKET` | | 1750 | + | | 1751 | +> Stability: 1 - Experimental | | 1752 | +
| | 1753 | +TBD | | 1754 | + | | 1755 | +<a id="ERR_QUICSESSION_DESTROYED"></a> | | 1756 | +### `ERR_QUICSESSION_DESTROYED` | | 1757 | + | | 1758 | +> Stability: 1 - Experimental | | 1759 | +
| | 1760 | +TBD | | 1761 | + | | 1762 | +<a id="ERR_QUICSESSION_INVALID_DCID"></a> | | 1763 | +### `ERR_QUICSESSION_INVALID_DCID` | | 1764 | + | | 1765 | +> Stability: 1 - Experimental | | 1766 | +
| | 1767 | +TBD | | 1768 | + | | 1769 | +<a id="ERR_QUICSESSION_UPDATEKEY"></a> | | 1770 | +### `ERR_QUICSESSION_UPDATEKEY` | | 1771 | + | | 1772 | +> Stability: 1 - Experimental | | 1773 | +
| | 1774 | +TBD | | 1775 | + | | 1776 | +<a id="ERR_QUICSESSION_VERSION_NEGOTIATION"></a> | | 1777 | +### `ERR_QUICSESSION_VERSION_NEGOTIATION` | | 1778 | + | | 1779 | +> Stability: 1 - Experimental | | 1780 | +
| | 1781 | +TBD | | 1782 | + | | 1783 | +<a id="ERR_QUICSOCKET_DESTROYED"></a> | | 1784 | +### `ERR_QUICSOCKET_DESTROYED` | | 1785 | + | | 1786 | +> Stability: 1 - Experimental | | 1787 | +
| | 1788 | +TBD | | 1789 | + | | 1790 | +<a id="ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH"></a> | | 1791 | +### `ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH` | | 1792 | + | | 1793 | +> Stability: 1 - Experimental | | 1794 | +
| | 1795 | +TBD | | 1796 | + | | 1797 | +<a id="ERR_QUICSOCKET_LISTENING"></a> | | 1798 | +### `ERR_QUICSOCKET_LISTENING` | | 1799 | + | | 1800 | +> Stability: 1 - Experimental | | 1801 | +
| | 1802 | +TBD | | 1803 | + | | 1804 | +<a id="ERR_QUICSOCKET_UNBOUND"></a> | | 1805 | +### `ERR_QUICSOCKET_UNBOUND` | | 1806 | + | | 1807 | +> Stability: 1 - Experimental | | 1808 | +
| | 1809 | +TBD | | 1810 | + | | 1811 | +<a id="ERR_QUICSTREAM_DESTROYED"></a> | | 1812 | +### `ERR_QUICSTREAM_DESTROYED` | | 1813 | + | | 1814 | +> Stability: 1 - Experimental | | 1815 | +
| | 1816 | +TBD | | 1817 | + | | 1818 | +<a id="ERR_QUICSTREAM_INVALID_PUSH"></a> | | 1819 | +### `ERR_QUICSTREAM_INVALID_PUSH` | | 1820 | + | | 1821 | +> Stability: 1 - Experimental | | 1822 | +
| | 1823 | +TBD | | 1824 | + | | 1825 | +<a id="ERR_QUICSTREAM_OPEN_FAILED"></a> | | 1826 | +### `ERR_QUICSTREAM_OPEN_FAILED` | | 1827 | + | | 1828 | +> Stability: 1 - Experimental | | 1829 | +
| | 1830 | +TBD | | 1831 | + | | 1832 | +<a id="ERR_QUICSTREAM_UNSUPPORTED_PUSH"></a> | | 1833 | +### `ERR_QUICSTREAM_UNSUPPORTED_PUSH` | | 1834 | + | | 1835 | +> Stability: 1 - Experimental | | 1836 | +
| | 1837 | +TBD | | 1838 | + | 1720 | 1839 | <a id="ERR_REQUIRE_ESM"></a> | 1721 | 1840 | ### `ERR_REQUIRE_ESM` | 1722 | 1841 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/api/index.md +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 44 | 44 | * [Process](process.html) | 45 | 45 | * [Punycode](punycode.html) | 46 | 46 | * [Query Strings](querystring.html) | | 47 | +* [QUIC](quic.html) | 47 | 48 | * [Readline](readline.html) | 48 | 49 | * [REPL](repl.html) | 49 | 50 | * [Report](report.html) | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/net.md +9Lines changed: 9 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1105,6 +1105,14 @@ immediately initiates connection with | 1105 | 1105 | [`socket.connect(port[, host][, connectListener])`][`socket.connect(port)`], | 1106 | 1106 | then returns the `net.Socket` that starts the connection. | 1107 | 1107 |
| | 1108 | +## `net.createQuicSocket([options])` | | 1109 | +<!-- YAML | | 1110 | +added: REPLACEME | | 1111 | +--> | | 1112 | + | | 1113 | +Creates and returns a new `QuicSocket`. Please refer to the [QUIC documentation][] | | 1114 | +for details. | | 1115 | + | 1108 | 1116 | ## `net.createServer([options][, connectionListener])` | 1109 | 1117 | <!-- YAML | 1110 | 1118 | added: v0.5.0 | @@ -1213,6 +1221,7 @@ Returns `true` if input is a version 6 IP address, otherwise returns `false`. | 1213 | 1221 | [IPC]: #net_ipc_support | 1214 | 1222 | [Identifying paths for IPC connections]: #net_identifying_paths_for_ipc_connections | 1215 | 1223 | [Readable Stream]: stream.html#stream_class_stream_readable | | 1224 | +[QUIC documentation]: quic.html | 1216 | 1225 | [`'close'`]: #net_event_close | 1217 | 1226 | [`'connect'`]: #net_event_connect | 1218 | 1227 | [`'connection'`]: #net_event_connection | |
|