1--- 2c: Copyright (C) Mark Gaiser, <markg85@gmail.com> 3SPDX-License-Identifier: curl 4Long: ipfs-gateway 5Arg: <URL> 6Help: Gateway for IPFS 7Protocols: IPFS 8Added: 8.4.0 9Category: ipfs 10Multi: single 11See-also: 12 - help 13 - manual 14Example: 15 - --ipfs-gateway $URL ipfs:// 16--- 17 18# `--ipfs-gateway` 19 20Specify which gateway to use for IPFS and IPNS URLs. Not specifying this will 21instead make curl check if the IPFS_GATEWAY environment variable is set, or if 22a `~/.ipfs/gateway` file holding the gateway URL exists. 23 24If you run a local IPFS node, this gateway is by default available under 25`http://localhost:8080`. A full example URL would look like: 26 27 curl --ipfs-gateway http://localhost:8080 ipfs://bafybeigagd5nmnn2iys2f3doro7ydrevyr2mzarwidgadawmamiteydbzi 28 29There are many public IPFS gateways. See for example: 30https://ipfs.github.io/public-gateway-checker/ 31 32WARNING: If you opt to go for a remote gateway you should be aware that you 33completely trust the gateway. This is fine in local gateways as you host it 34yourself. With remote gateways there could potentially be a malicious actor 35returning you data that does not match the request you made, inspect or even 36interfere with the request. You will not notice this when using curl. A 37mitigation could be to go for a "trustless" gateway. This means you locally 38verify that the data. Consult the docs page on trusted vs trustless: 39https://docs.ipfs.tech/reference/http/gateway/#trusted-vs-trustless 40