Skip to content

Commit

Permalink
fix: support /quic-v1 and /webtransport listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Dec 16, 2022
1 parent cd11c85 commit 79a5cd5
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 60 deletions.
90 changes: 31 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"got": "^12.0.3",
"ipfs-or-gateway": "^4.1.0",
"npm-run-all": "^4.1.5",
"patch-package": "^6.4.7",
"patch-package": "^6.5.0",
"playwright": "^1.24.0",
"pre-commit": "^1.2.2",
"proxyquire": "^2.1.3",
Expand Down
34 changes: 34 additions & 0 deletions patches/multiaddr+10.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/node_modules/multiaddr/src/convert.js b/node_modules/multiaddr/src/convert.js
index c315201..80170c7 100644
--- a/node_modules/multiaddr/src/convert.js
+++ b/node_modules/multiaddr/src/convert.js
@@ -51,6 +51,7 @@ Convert.toString = function convertToString (proto, buf) {
case 55: // dns6
case 56: // dnsaddr
case 400: // unix
+ case 466: // certhash
case 777: // memory
return bytes2str(buf)

@@ -84,6 +85,7 @@ Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto
case 55: // dns6
case 56: // dnsaddr
case 400: // unix
+ case 466: // certhash
case 777: // memory
return str2bytes(str)

diff --git a/node_modules/multiaddr/src/protocols-table.js b/node_modules/multiaddr/src/protocols-table.js
index 3431af5..8939fb1 100644
--- a/node_modules/multiaddr/src/protocols-table.js
+++ b/node_modules/multiaddr/src/protocols-table.js
@@ -60,6 +60,9 @@ Protocols.table = [
[445, 296, 'onion3'],
[446, V, 'garlic64'],
[460, 0, 'quic'],
+ [461, 0, 'quic-v1'],
+ [465, 0, 'webtransport'],
+ [466, V, 'certhash'],
[477, 0, 'ws'],
[478, 0, 'wss'],
[479, 0, 'p2p-websocket-star'],

0 comments on commit 79a5cd5

Please sign in to comment.