@fails-components/webtransport-transport-http3-quiche 1.5.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CMakeLists.txt
CHANGED
|
@@ -437,8 +437,6 @@ third_party/quiche/quiche/quic/core/crypto/chacha_base_decrypter.cc
|
|
|
437
437
|
third_party/quiche/quiche/quic/core/crypto/chacha_base_decrypter.h
|
|
438
438
|
third_party/quiche/quiche/quic/core/crypto/chacha_base_encrypter.cc
|
|
439
439
|
third_party/quiche/quiche/quic/core/crypto/chacha_base_encrypter.h
|
|
440
|
-
third_party/quiche/quiche/quic/core/crypto/channel_id.cc
|
|
441
|
-
third_party/quiche/quiche/quic/core/crypto/channel_id.h
|
|
442
440
|
third_party/quiche/quiche/quic/core/crypto/client_proof_source.cc
|
|
443
441
|
third_party/quiche/quiche/quic/core/crypto/client_proof_source.h
|
|
444
442
|
third_party/quiche/quiche/quic/core/crypto/crypto_framer.cc
|
|
@@ -831,17 +829,12 @@ third_party/quiche/quiche/quic/platform/api/quic_stack_trace.h
|
|
|
831
829
|
third_party/quiche/quiche/quic/platform/api/quic_thread.h
|
|
832
830
|
third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.cc
|
|
833
831
|
third_party/quiche/quiche/quic/tools/quic_simple_crypto_server_stream_helper.h
|
|
832
|
+
third_party/quiche/quiche/web_transport/stream_helpers.h
|
|
834
833
|
third_party/quiche/quiche/web_transport/web_transport_headers.cc
|
|
835
834
|
third_party/quiche/quiche/web_transport/web_transport_headers.h
|
|
836
835
|
third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.cc
|
|
837
836
|
third_party/quiche/quiche/web_transport/web_transport_priority_scheduler.h
|
|
838
837
|
)
|
|
839
|
-
# workaround gquiche problem
|
|
840
|
-
target_precompile_headers(
|
|
841
|
-
gquiche
|
|
842
|
-
PRIVATE
|
|
843
|
-
<cstdint>
|
|
844
|
-
)
|
|
845
838
|
|
|
846
839
|
IF(APPLE OR WIN32)
|
|
847
840
|
target_sources(gquiche PRIVATE third_party/googleurl/url/url_idna_ascii_only.cc)
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
export class Http3WebTransportServerSocket extends Http3WebTransportSocket {
|
|
2
|
+
/**
|
|
3
|
+
* @param {import('../../../main/lib/types.js').Http3QuicheServerWebTransportInit|undefined} args
|
|
4
|
+
*/
|
|
5
|
+
constructor(args: import('../../../main/lib/types.js').Http3QuicheServerWebTransportInit | undefined);
|
|
2
6
|
port: number;
|
|
3
7
|
host: string;
|
|
4
8
|
/** @type {import('../../../main/lib/session.js').HttpServer} */
|
|
5
9
|
jsobj: import('../../../main/lib/session.js').HttpServer;
|
|
6
10
|
/** @type {import('node:dns').LookupAddress|undefined} */
|
|
7
11
|
address: import('node:dns').LookupAddress | undefined;
|
|
12
|
+
socketOptions: {};
|
|
8
13
|
init(): void;
|
|
9
14
|
stopServer(): void;
|
|
10
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serversocket.d.ts","sourceRoot":"","sources":["../../lib/serversocket.js"],"names":[],"mappings":"AAQA;
|
|
1
|
+
{"version":3,"file":"serversocket.d.ts","sourceRoot":"","sources":["../../lib/serversocket.js"],"names":[],"mappings":"AAQA;IACE;;OAEG;IACH,kBAFW,OAAO,4BAA4B,EAAE,iCAAiC,GAAC,SAAS,EAgB1F;IAVC,aAAwB;IACxB,aAAqC;IACrC,gEAAgE;IAEhE,OAFW,OAAO,8BAA8B,EAAE,UAAU,CAEtC;IAEtB,yDAAyD;IACzD,SADW,OAAO,UAAU,EAAE,aAAa,GAAC,SAAS,CAC7B;IAExB,kBAAwD;IAG1D,aAiDC;IAED,mBAKC;CACF"}
|
package/lib/serversocket.js
CHANGED
|
@@ -8,7 +8,7 @@ const log = logger(`webtransport:Http3WebTransportServerSocket(${process.pid})`)
|
|
|
8
8
|
|
|
9
9
|
export class Http3WebTransportServerSocket extends Http3WebTransportSocket {
|
|
10
10
|
/**
|
|
11
|
-
* @param {import('../../../main/lib/types.js').
|
|
11
|
+
* @param {import('../../../main/lib/types.js').Http3QuicheServerWebTransportInit|undefined} args
|
|
12
12
|
*/
|
|
13
13
|
constructor(args) {
|
|
14
14
|
super(args)
|
|
@@ -22,6 +22,8 @@ export class Http3WebTransportServerSocket extends Http3WebTransportSocket {
|
|
|
22
22
|
|
|
23
23
|
/** @type {import('node:dns').LookupAddress|undefined} */
|
|
24
24
|
this.address = undefined
|
|
25
|
+
|
|
26
|
+
this.socketOptions = args?.quicheNodeSocketOptions ?? {}
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
init() {
|
|
@@ -29,7 +31,11 @@ export class Http3WebTransportServerSocket extends Http3WebTransportSocket {
|
|
|
29
31
|
.then((result) => {
|
|
30
32
|
this.address = result
|
|
31
33
|
this.socketInt = createSocket({
|
|
32
|
-
|
|
34
|
+
...{
|
|
35
|
+
type: result.family === 4 ? 'udp4' : 'udp6',
|
|
36
|
+
reuseAddr: true
|
|
37
|
+
},
|
|
38
|
+
...this.socketOptions
|
|
33
39
|
})
|
|
34
40
|
|
|
35
41
|
this.socketInt.on('listening', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fails-components/webtransport-transport-http3-quiche",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A component to add webtransport support (server and client) to node.js, transport using libquiche",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/debug": "^4.1.7",
|
|
40
40
|
"bindings": "^1.5.0",
|
|
41
|
-
"cmake-js": "^
|
|
41
|
+
"cmake-js": "^8.0.0",
|
|
42
42
|
"debug": "^4.3.4",
|
|
43
43
|
"node-addon-api": "^7.0.0",
|
|
44
44
|
"prebuild-install": "^7.1.1"
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
#include "src/http3wtstreamvisitor.h"
|
|
6
6
|
#include "src/http3server.h"
|
|
7
|
+
#include "quiche/web_transport/stream_helpers.h"
|
|
7
8
|
|
|
8
9
|
namespace quic
|
|
9
10
|
{
|
|
@@ -140,7 +141,7 @@ namespace quic
|
|
|
140
141
|
{
|
|
141
142
|
auto cur = chunks_.front();
|
|
142
143
|
absl::Status status =
|
|
143
|
-
WriteIntoStream(*stream_, absl::string_view(cur.buffer, cur.len));
|
|
144
|
+
webtransport::WriteIntoStream(*stream_, absl::string_view(cur.buffer, cur.len));
|
|
144
145
|
QUIC_DVLOG(1) << "Attempted writing on WebTransport bidirectional stream "
|
|
145
146
|
<< ", success: " << status;
|
|
146
147
|
if (!status.ok())
|
|
@@ -155,7 +156,7 @@ namespace quic
|
|
|
155
156
|
|
|
156
157
|
if (send_fin_)
|
|
157
158
|
{
|
|
158
|
-
absl::Status status = SendFinOnStream(*stream_);
|
|
159
|
+
absl::Status status = webtransport::SendFinOnStream(*stream_);
|
|
159
160
|
if (status.ok()) {
|
|
160
161
|
fin_was_sent_ = true;
|
|
161
162
|
getJS()->processStreamNetworkFinish(NetworkTask::streamFinal);
|