Better HN
topnewbestaskshowjobs
Log inSign up

lidel

47 karma · joined Dec 18, 2017 (8y ago) · 7 submissions

[ my public key: https://keybase.io/lidel; my proof: https://keybase.io/lidel/sigs/YzRwitzsDjfTfDvdM42_-hOyKBkXPV0p1vtPqB8ADUg ]
Submissions

comment 3y ago · link · parent

My understanding is that the curl position was around making sure UX (defaults) are safe and don't tie the user to any third-party gateway.

Default behavior in the merged curl PR got adjusted and now the only gateway that is used implicitly is the localhost one. Using an external, potentially untrusted public gateway requires explicit opt-in from the user via IPFS_GATEWAY env variable.

FWIW, in recent years IPFS ecosystem made content-addressing over HTTP viable and useful. Standards and specifications got created. Verifiable responses have standardized content types registered at IANA.

For practical info, see:

"Deserialized responses" vs "Verifiable responses" at https://curl.se/docs/ipfs.html

"Deserialized responses" are designed to be used on localhost, "Verifiable responses" are something one would use with a gateway they don't trust

Client docs at https://docs.ipfs.tech/reference/http/gateway/#trustless-ver...

Server specification at https://specs.ipfs.tech/http-gateways/trustless-gateway/

comment 3y ago · link · parent

Web Browser use cases without native ipfs:// and ipns:// should use subdomain HTTP gateways like localhost in Kubo, or public dweb.link, cf-ipfs.com, which provide Origin per root CID, sandboxing web apps from each other.

See: - https://docs.ipfs.tech/how-to/address-ipfs-on-web/#subdomain... - https://specs.ipfs.tech/http-gateways/subdomain-gateway/

comment 4y ago · link · parent

These libdweb Browser Extension APIs never landed in any official Firefox Nightly build. Mozilla stopped working on libdweb in 2019 (https://github.com/ipfs/ipfs-companion/pull/533#issuecomment...).

comment 6y ago · link · parent

> I just installed 0.10.2 for Mac and it's by default using (600,900) for the low and high watermarks and routing type is set to dht rather than dhtclient.

(600,900) watermarks suggest you had an old config (ipfs-desktop will respect pre-existing config and won't override values). Just change watermarks manually to (50,300) and restart.

If you run daemon via ipfs-desktop the routing preference from config file is ignored: Desktop runs daemon with an explicit command line parameter (--routing=dhtclient) to avoid DHT server traffic.

Hope this helps.

comment 8y ago · link · parent

Keep in mind that HTTP gateways are provided just for convenience. Due to WebExtension API limitations embedded node can't act as a local HTTP gateway and extension falls back to public gateway. I imagine it was what you were experiencing.

Use window.ipfs property to play with pure IPFS (without HTTP gateway): window.ipfs.id(console.log) window.ipfs.add(Buffer.from('hello')).then(console.log) window.ipfs.cat('/ipfs/QmWfVY9y3xjsixTgbd9AorQxH7VtMpzfx2HaWtsoUYecaX').then((data) => console.log(new String(data))) More info: https://github.com/ipfs-shipyard/ipfs-companion/blob/master/...

6.

IPFS Companion 2.2.0 brings window.ipfs to your Browser(blog.ipfs.io ↗)

93 points · by lidel · 8y ago · 25 comments