| 1 | package config |
| 2 | |
| 3 | // HTTPRetrieval is the configuration object for HTTP Retrieval settings. |
| 4 | // Implicit defaults can be found in core/node/bitswap.go |
| 5 | type HTTPRetrieval struct { |
| 6 | Enabled Flag `json:",omitempty"` |
| 7 | Allowlist []string `json:",omitempty"` |
| 8 | Denylist []string `json:",omitempty"` |
| 9 | NumWorkers *OptionalInteger `json:",omitempty"` |
| 10 | MaxBlockSize *OptionalString `json:",omitempty"` |
| 11 | TLSInsecureSkipVerify Flag `json:",omitempty"` |
| 12 | } |
| 13 | |
| 14 | const ( |
| 15 | DefaultHTTPRetrievalEnabled = true |
| 16 | DefaultHTTPRetrievalNumWorkers = 16 |
| 17 | DefaultHTTPRetrievalTLSInsecureSkipVerify = false // only for testing with self-signed HTTPS certs |
| 18 | DefaultHTTPRetrievalMaxBlockSize = "2MiB" // matching bitswap: https://specs.ipfs.tech/bitswap-protocol/#block-sizes |
| 19 | ) |