kubo/config/http_retrieval.go
Marcin Rataj b45ed8a3d7
Some checks failed
Docker Build / docker-build (push) Waiting to run
Gateway Conformance / gateway-conformance (push) Waiting to run
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Waiting to run
Go Build / go-build (push) Waiting to run
Go Check / go-check (push) Waiting to run
Go Lint / go-lint (push) Waiting to run
Go Test / go-test (push) Waiting to run
Interop / interop-prep (push) Waiting to run
Interop / helia-interop (push) Blocked by required conditions
Interop / ipfs-webui (push) Blocked by required conditions
Sharness / sharness-test (push) Waiting to run
Spell Check / spellcheck (push) Waiting to run
CodeQL / codeql (push) Has been cancelled
feat: HTTP retrieval enabled by default (#10836)
2025-06-17 01:48:46 +02:00

20 lines
875 B
Go

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