Skip to content

Commit 1d48087

Browse files
committed
feat(brave): Gateway with IPNS+DNSLink+HAMT
tl;dr opening /ipns/tr.wikipedia-on-ipfs.org/wiki/Mars.html works Switched to js-ipfs with cherry-picked changes from: ipfs/js-ipfs#2020 ipfs/js-ipfs#1989 ipfs/js-ipfs#2002 ipfs/js-ipfs-http-response#22 ipfs-inactive/js-ipfs-mfs#48
1 parent 8a374af commit 1d48087

File tree

3 files changed

+28
-39
lines changed

3 files changed

+28
-39
lines changed

add-on/src/lib/options.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports.optionDefaults = Object.freeze({
2727
ipfsApiUrl: buildIpfsApiUrl(),
2828
ipfsApiPollMs: 3000,
2929
ipfsProxy: true, // window.ipfs
30-
logNamespaces: 'jsipfs*,ipfs*,-*:mfs*,-*:ipns*,-ipfs:preload*,-ipfs-http-client:request*'
30+
logNamespaces: 'jsipfs*,ipfs*,-*:ipns*,-ipfs:preload*,-ipfs-http-client:request*'
3131
})
3232

3333
function buildCustomGatewayUrl () {

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
"@hapi/hapi": "https://github.com/lidel/hapi/tarball/ccbf84ba5edc9b24564fdd166e3ee6d81c4c02d8/hapi.tar.gz",
7070
"pino": "5.12.3",
7171
"hapi-pino": "https://github.com/pinojs/hapi-pino/tarball/3767ed6b67601831e176e084ed82ba4ed9f726e6/hapi-pino.tar.gz",
72+
"ipfs-http-response": "https://github.com/ipfs/js-ipfs-http-response/tarball/7c2a49f43d1903689b50f87e14d1e5f046e3fe78/js-ipfs-http-response.gz",
73+
"ipfs-mfs": "https://github.com/ipfs/js-ipfs-mfs/tarball/c644291f31a57f7bc65318ba8bf83e002b83e030/js-ipfs-mfs.gz",
7274
"iso-stream-http": "0.1.2",
7375
"stream-http": "npm:[email protected]",
7476
"pull-to-stream": "0.1.1",
@@ -123,7 +125,7 @@
123125
"filesize": "4.1.2",
124126
"http-dns": "3.0.1",
125127
"http-node": "1.2.0",
126-
"ipfs": "https://github.com/lidel/js-ipfs/tarball/17712a4b86bacb748ed429bd2a3ca73976e54ae0/js-ipfs.tar.gz",
128+
"ipfs": "https://github.com/lidel/js-ipfs/tarball/4081cbd69a252ec8adcec1e965724246669c9e9f/js-ipfs.tar.gz",
127129
"ipfs-css": "0.12.0",
128130
"ipfs-http-client": "30.1.3",
129131
"ipfs-http-response": "0.2.2",

yarn.lock

+24-37
Original file line numberDiff line numberDiff line change
@@ -774,10 +774,10 @@
774774
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-6.2.1.tgz#d3a66329159af879bfdf0b0cff2229c43c5a3451"
775775
integrity sha512-+ryw4GU9pjr1uT6lBuErHJg3NYqzwJTvZ75nKuJijEzpd00Uqi6oiawTGDDf5Hl0zWmI7qHfOtaqB0kpQZJQzA==
776776

777-
"@hapi/joi@^15.0.0":
778-
version "15.0.0"
779-
resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.0.0.tgz#675d227b4c10d902fc5a96a2235665f0bc292e1b"
780-
integrity sha512-pLCfcSeT26g59jEKZntmzlqe19dRMDNxCFKGD4CriF8+9FAD3Mq1aWNuKIFpKpX+u3x8lxLKXolDwk0gYl3b2w==
777+
"@hapi/joi@^15.0.1":
778+
version "15.0.1"
779+
resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.0.1.tgz#dec64ff87555954f925220a9c5db062ba34493fc"
780+
integrity sha512-6RLoFusVbSkKjo51IGy7TT72TYKaks3OLKRV4Wy4E8f0Vt2oqKBgtG+8VMnbruy+M4iLItiLYjETX7mQqklObQ==
781781
dependencies:
782782
"@hapi/address" "2.x.x"
783783
"@hapi/hoek" "6.x.x"
@@ -5763,7 +5763,7 @@ handlebars@^4.1.0:
57635763
optionalDependencies:
57645764
uglify-js "^3.1.4"
57655765

5766-
hapi-pino@^5.2.0, "hapi-pino@https://github.com/pinojs/hapi-pino/tarball/3767ed6b67601831e176e084ed82ba4ed9f726e6/hapi-pino.tar.gz":
5766+
hapi-pino@^5.4.1, "hapi-pino@https://github.com/pinojs/hapi-pino/tarball/3767ed6b67601831e176e084ed82ba4ed9f726e6/hapi-pino.tar.gz":
57675767
version "5.4.0"
57685768
resolved "https://github.com/pinojs/hapi-pino/tarball/3767ed6b67601831e176e084ed82ba4ed9f726e6/hapi-pino.tar.gz#3a8f286bdb50b8dc3a6c949be22df2cd192dc317"
57695769
dependencies:
@@ -6528,10 +6528,9 @@ ipfs-http-client@^30.1.1:
65286528
tar-stream "^2.0.1"
65296529
through2 "^3.0.1"
65306530

6531-
6531+
[email protected], "ipfs-http-response@https://github.com/ipfs/js-ipfs-http-response/tarball/7c2a49f43d1903689b50f87e14d1e5f046e3fe78/js-ipfs-http-response.gz", "ipfs-http-response@https://github.com/ipfs/js-ipfs-http-response/tarball/7c2a49f43d1903689b50f87e14d1e5f046e3fe78/js-ipfs-http-response.tar.gz":
65326532
version "0.2.2"
6533-
resolved "https://registry.yarnpkg.com/ipfs-http-response/-/ipfs-http-response-0.2.2.tgz#40f1dad22c73b4d64fcfad8a2cbe55f634f4a2ec"
6534-
integrity sha512-RMc9GUdyfFdOclobCXslfS+tGevJJs9ZhUv1xuJd32d1CVEd3PlZB2VBgWPMP5jXyZJWQ9kkAha8fBHGtC55Cw==
6533+
resolved "https://github.com/ipfs/js-ipfs-http-response/tarball/7c2a49f43d1903689b50f87e14d1e5f046e3fe78/js-ipfs-http-response.gz#25ac8baeea7a9f7a724ad97fdacda3ee8c4b4a2b"
65356534
dependencies:
65366535
async "^2.6.1"
65376536
cids "~0.5.7"
@@ -6545,27 +6544,9 @@ [email protected]:
65456544
promisify-es6 "^1.0.3"
65466545
stream-to-blob "^1.0.1"
65476546

6548-
ipfs-http-response@~0.2.1:
6549-
version "0.2.1"
6550-
resolved "https://registry.yarnpkg.com/ipfs-http-response/-/ipfs-http-response-0.2.1.tgz#94aecd9a4732fb4cceb0931ad68af5d5b5e34172"
6551-
integrity sha512-A3FPRa/IqiGE0dNRDDYRdDnPsq5eBuJWpASWGuEzTeGAh7Ad5dvIaU9JyIcLlcLLF3tAhueUnaFxjgAhot7xog==
6552-
dependencies:
6553-
async "^2.6.0"
6554-
cids "~0.5.5"
6555-
debug "^3.1.0"
6556-
file-type "^8.0.0"
6557-
filesize "^3.6.1"
6558-
get-stream "^3.0.0"
6559-
ipfs-unixfs "~0.1.14"
6560-
mime-types "^2.1.18"
6561-
multihashes "~0.4.13"
6562-
promisify-es6 "^1.0.3"
6563-
stream-to-blob "^1.0.1"
6564-
6565-
ipfs-mfs@~0.10.2:
6566-
version "0.10.4"
6567-
resolved "https://registry.yarnpkg.com/ipfs-mfs/-/ipfs-mfs-0.10.4.tgz#44244f732a35e7031783b6ab7bdde276a724de01"
6568-
integrity sha512-WFGSkbSdpUcHXstLhhK1Tn/CFXtQTtRH6zPGvjGoZ+Zmap3LXc4gwVkIlaswllZhzP9lOYhPULC3rLZc/IuUUw==
6547+
"ipfs-mfs@https://github.com/ipfs/js-ipfs-mfs/tarball/c644291f31a57f7bc65318ba8bf83e002b83e030/js-ipfs-mfs.gz", "ipfs-mfs@https://github.com/ipfs/js-ipfs-mfs/tarball/c644291f31a57f7bc65318ba8bf83e002b83e030/js-ipfs-mfs.tar.gz":
6548+
version "0.10.3"
6549+
resolved "https://github.com/ipfs/js-ipfs-mfs/tarball/c644291f31a57f7bc65318ba8bf83e002b83e030/js-ipfs-mfs.gz#f2d1ac27c5af6a7e3f6d054cbc074797f26307a3"
65696550
dependencies:
65706551
async "^2.6.1"
65716552
cids "~0.5.5"
@@ -6716,20 +6697,20 @@ ipfs-unixfs-importer@~0.38.5:
67166697
optionalDependencies:
67176698
rabin "^1.6.0"
67186699

6719-
ipfs-unixfs@~0.1.14, ipfs-unixfs@~0.1.16:
6700+
ipfs-unixfs@~0.1.16:
67206701
version "0.1.16"
67216702
resolved "https://registry.yarnpkg.com/ipfs-unixfs/-/ipfs-unixfs-0.1.16.tgz#41140f4359f1b8fe7a970052663331091c5f54c4"
67226703
integrity sha512-TX9Dyu77MxpLzGh/LcQne95TofOyvOeW0oOi72aBMMcV1ItP3684e6NTG9KY1qzdrC+ZUR8kT7y18J058n8KXg==
67236704
dependencies:
67246705
protons "^1.0.1"
67256706

6726-
"ipfs@https://github.com/lidel/js-ipfs/tarball/17712a4b86bacb748ed429bd2a3ca73976e54ae0/js-ipfs.tar.gz":
6707+
"ipfs@https://github.com/lidel/js-ipfs/tarball/4081cbd69a252ec8adcec1e965724246669c9e9f/js-ipfs.tar.gz":
67276708
version "0.35.0"
6728-
resolved "https://github.com/lidel/js-ipfs/tarball/17712a4b86bacb748ed429bd2a3ca73976e54ae0/js-ipfs.tar.gz#d14fbe7038aa790dfe6f8c553dbf1f489acf2514"
6709+
resolved "https://github.com/lidel/js-ipfs/tarball/4081cbd69a252ec8adcec1e965724246669c9e9f/js-ipfs.tar.gz#c02cf99869813939d6443e3443d40f6145c486b7"
67296710
dependencies:
67306711
"@hapi/ammo" "^3.1.0"
67316712
"@hapi/hapi" "^18.3.1"
6732-
"@hapi/joi" "^15.0.0"
6713+
"@hapi/joi" "^15.0.1"
67336714
async "^2.6.1"
67346715
bignumber.js "^8.0.2"
67356716
binary-querystring "~0.1.2"
@@ -6751,15 +6732,15 @@ ipfs-unixfs@~0.1.14, ipfs-unixfs@~0.1.16:
67516732
fsm-event "^2.1.0"
67526733
get-folder-size "^2.0.0"
67536734
glob "^7.1.3"
6754-
hapi-pino "^5.2.0"
6735+
hapi-pino "^5.4.1"
67556736
human-to-milliseconds "^1.0.0"
67566737
interface-datastore "~0.6.0"
67576738
ipfs-bitswap "~0.23.0"
67586739
ipfs-block "~0.8.0"
67596740
ipfs-block-service "~0.15.1"
67606741
ipfs-http-client "^30.1.1"
6761-
ipfs-http-response "~0.2.1"
6762-
ipfs-mfs "~0.10.2"
6742+
ipfs-http-response "https://github.com/ipfs/js-ipfs-http-response/tarball/7c2a49f43d1903689b50f87e14d1e5f046e3fe78/js-ipfs-http-response.tar.gz"
6743+
ipfs-mfs "https://github.com/ipfs/js-ipfs-mfs/tarball/c644291f31a57f7bc65318ba8bf83e002b83e030/js-ipfs-mfs.tar.gz"
67636744
ipfs-multipart "~0.1.0"
67646745
ipfs-repo "~0.26.1"
67656746
ipfs-unixfs "~0.1.16"
@@ -6774,6 +6755,7 @@ ipfs-unixfs@~0.1.14, ipfs-unixfs@~0.1.16:
67746755
ipld-raw "^2.0.1"
67756756
ipld-zcash "~0.1.6"
67766757
ipns "~0.5.0"
6758+
is-domain-name "^1.0.1"
67776759
is-ipfs "~0.6.0"
67786760
is-pull-stream "~0.0.0"
67796761
is-stream "^1.1.0"
@@ -7158,6 +7140,11 @@ is-directory@^0.3.1:
71587140
resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1"
71597141
integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
71607142

7143+
is-domain-name@^1.0.1:
7144+
version "1.0.1"
7145+
resolved "https://registry.yarnpkg.com/is-domain-name/-/is-domain-name-1.0.1.tgz#f6eb33b14a497541dca58335137d4466e0c20da1"
7146+
integrity sha1-9uszsUpJdUHcpYM1E31EZuDCDaE=
7147+
71617148
is-extendable@^0.1.0, is-extendable@^0.1.1:
71627149
version "0.1.1"
71637150
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
@@ -9118,7 +9105,7 @@ [email protected]:
91189105
dependencies:
91199106
mime-db "1.40.0"
91209107

9121-
mime-types@^2.1.12, mime-types@^2.1.18, mime-types@^2.1.21, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
9108+
mime-types@^2.1.12, mime-types@^2.1.21, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
91229109
version "2.1.21"
91239110
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96"
91249111
integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==

0 commit comments

Comments
 (0)