Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usingcurl/ipfs: add #348

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index-words
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
--http2-prior-knowledge
--http3
--http3-only
--ipfs-gateway
--json
--keepalive-time
--libcurl
Expand Down Expand Up @@ -281,6 +282,7 @@ HTTP/3 backend
HttpGet
IDN
Indentation
IPFS
IPv4
IPv6
IRC
Expand Down
1 change: 1 addition & 0 deletions usingcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ here to help you do your file transfer tasks as conveniently as possible.
* [TELNET](usingcurl/telnet.md)
* [DICT](usingcurl/dict.md)
* [TLS](usingcurl/tls.md)
* [IPFS](usingcurl/ipfs.md)
* [Copy as curl](usingcurl/copyas.md)
24 changes: 24 additions & 0 deletions usingcurl/ipfs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# IPFS

IPFS is the *Inter-Planetary File System*. curl supports IPFS only via a *HTTP
gateway*. It means that it understands IPFS URLs when given to it, but you
must also provide a working gateway URL for curl to use to retrieve the
content. curl does not speak IPFS natively.

## Gateway

The `--ipfs-gateway` lets the user specify the IPFS HTTP gateway URL. Like this:

curl --ipfs-gateway http://localhost:8080 ipfs://bafybeigagd5nmnn2iys2f3d/

If you opt to go for a remote gateway you should be aware that you completely
trust the gateway. This is fine in local gateways as you host it yourself.
With remote gateways there could potentially be a malicious actor returning
you data that does not match the request you made, inspect or even interfere
with the request. You will not notice this when getting IPFS using curl.

If the `--ipfs-gateway` option is not used, curl will check the `IPFS_GATEWAY`
environment variable for guidance and if not set, the `~/.ipfs/gateway` file
that can be used to identify the gateway.

IPFS support was first added to curl in version 8.4.0.
3 changes: 2 additions & 1 deletion wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ init
interoperates
IoT
IPCXN
IPFS
ipod
IPv
IRIs
Expand Down Expand Up @@ -326,6 +327,7 @@ mutex
MX
Nagel
NAMELOOKUP
natively
NATs
Necko
Nethercote
Expand Down Expand Up @@ -570,4 +572,3 @@ Zakrzewski
Zitzmann
zlib
zsh

Loading