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