37
- [`AutoTLS.RegistrationDelay`](#autotlsregistrationdelay)
38
- [`AutoTLS.CAEndpoint`](#autotlscaendpoint)
39
- [`Bitswap`](#bitswap)
40
- - [`Bitswap.Enabled`](#bitswapenabled)
40
+ - [`Bitswap.Libp2pEnabled`](#bitswaplibp2penabled)
41
- [`Bitswap.ServerEnabled`](#bitswapserverenabled)
42
- [`Bootstrap`](#bootstrap)
43
- [`Datastore`](#datastore)
127
- [`Routing.AcceleratedDHTClient`](#routingaccelerateddhtclient)
128
- [`Routing.LoopbackAddressesOnLanDHT`](#routingloopbackaddressesonlandht)
129
- [`Routing.IgnoreProviders`](#routingignoreproviders)
130
+ - [`Routing.DelegatedRouters`](#routingdelegatedrouters)
131
- [`Routing.Routers`](#routingrouters)
132
- [`Routing.Routers: Type`](#routingrouters-type)
133
- [`Routing.Routers: Parameters`](#routingrouters-parameters)
185
- [`DNS`](#dns)
186
- [`DNS.Resolvers`](#dnsresolvers)
187
- [`DNS.MaxCacheTTL`](#dnsmaxcachettl)
188
+ - [`HTTPRetrieval`](#httpretrieval)
189
+ - [`HTTPRetrieval.Enabled`](#httpretrievalenabled)
190
+ - [`HTTPRetrieval.Allowlist`](#httpretrievalallowlist)
191
+ - [`HTTPRetrieval.Denylist`](#httpretrievaldenylist)
192
+ - [`HTTPRetrieval.NumWorkers`](#httpretrievalnumworkers)
193
+ - [`HTTPRetrieval.MaxBlockSize`](#httpretrievalmaxblocksize)
194
+ - [`HTTPRetrieval.TLSInsecureSkipVerify`](#httpretrievaltlsinsecureskipverify)
195
- [`Import`](#import)
196
- [`Import.CidVersion`](#importcidversion)
197
- [`Import.UnixFSRawLeaves`](#importunixfsrawleaves)
632
633
## `Bitswap`
634
627
-High level client and server configuration of the [Bitswap Protocol](https://specs.ipfs.tech/bitswap-protocol/).
635
+High level client and server configuration of the [Bitswap Protocol](https://specs.ipfs.tech/bitswap-protocol/) over libp2p.
636
637
For internal configuration see [`Internal.Bitswap`](#internalbitswap).
638
631
-### `Bitswap.Enabled`
639
+For HTTP version see [`HTTPRetrieval`](#httpretrieval).
640
633
-Manages both Bitswap client and server functionality. For testing or operating a node without Bitswap requirements.
641
+### `Bitswap.Libp2pEnabled`
642
+
643
+Determines whether Kubo will use Bitswap over libp2p.
644
+
645
+Disabling this, will remove `/ipfs/bitswap/*` protocol support from [libp2p identify](https://github.com/libp2p/specs/blob/master/identify/README.md) responses, effectively shutting down both Bitswap libp2p client and server.
646
647
> [!WARNING]
636
-> Bitswap is a core component of Kubo, and disabling it completely may cause unpredictable outcomes. Treat this as experimental and use it solely for testing purposes.
648
+> Bitswap over libp2p is a core component of Kubo and the oldest way of exchanging blocks. Disabling it completely may cause unpredictable outcomes, such as retrieval failures, if the only providers were libp2p ones. Treat this as experimental and use it solely for testing purposes with `HTTPRetrieval.Enabled`.
649
650
Default: `true`
651
655
656
Determines whether Kubo functions as a Bitswap server to host and respond to block requests.
657
646
-Disabling the server retains client and protocol support in libp2p identify responses but causes Kubo to reply with "don't have" to all block requests.
658
+Disabling the server retains client and protocol support in [libp2p identify](https://github.com/libp2p/specs/blob/master/identify/README.md) responses but causes Kubo to reply with "don't have" to all block requests.
659
648
-Default: `true`
660
+Default: `true` (requires `Bitswap.Libp2pEnabled`)
661
662
Type: `flag`
663
1737
There are multiple routing options: "auto", "autoclient", "none", "dht", "dhtclient", and "custom".
1738
1739
* **DEFAULT:** If unset, or set to "auto", your node will use the public IPFS DHT (aka "Amino")
1728
- and parallel HTTP routers listed below for additional speed.
1740
+ and parallel [`Routing.DelegatedRouters`](#routingdelegatedrouters) for additional speed.
1741
1742
* If set to "autoclient", your node will behave as in "auto" but without running a DHT server.
1743
1767
unless you're sure your node is reachable from the public network.
1768
1769
When `Routing.Type` is set to `auto` or `autoclient` your node will accelerate some types of routing
1758
-by leveraging HTTP endpoints compatible with [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/)
1770
+by leveraging [`Routing.DelegatedRouters`](#routingdelegatedrouters) HTTP endpoints compatible with [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/)
1771
introduced in [IPIP-337](https://github.com/ipfs/specs/pull/337)
1772
in addition to the Amino DHT.
1761
-By default, an instance of [IPNI](https://github.com/ipni/specs/blob/main/IPNI.md#readme)
1762
-at https://cid.contact is used.
1773
1764
-Alternative routing rules can be configured in `Routing.Routers` after setting `Routing.Type` to `custom`.
1774
+[Advanced routing rules](https://github.com/ipfs/kubo/blob/master/docs/delegated-routing.md) can be configured in `Routing.Routers` after setting `Routing.Type` to `custom`.
1775
1766
-Default: `auto` (DHT + IPNI)
1776
+Default: `auto` (DHT + [`Routing.DelegatedRouters`](#routingdelegatedrouters))
1777
1778
Type: `optionalString` (`null`/missing means the default)
1779
1838
1839
### `Routing.IgnoreProviders`
1840
1831
-An array of peerIDs. Any provider record associated to one of these peer IDs is ignored.
1841
+An array of [string-encoded PeerIDs](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md#string-representation). Any provider record associated to one of these peer IDs is ignored.
1842
1843
Apart from ignoring specific providers for reasons like misbehaviour etc. this
1844
setting is useful to ignore providers as a way to indicate preference, when the same provider
1845
is found under different peerIDs (i.e. one for HTTP and one for Bitswap retrieval).
1846
1847
+> [!TIP]
1848
+> This denylist operates on PeerIDs.
1849
+> To deny specific HTTP Provider URL, use [`HTTPRetrieval.Denylist`](#httpretrievaldenylist) instead.
1850
+
1851
Default: `[]`
1852
1839
-Type: `array[peerID]`
1853
+Type: `array[string]`
1854
+
1855
+### `Routing.DelegatedRouters`
1856
1857
+This is an array of URL hostnames that support the [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) which are used alongside the DHT when [`Routing.Type`](#routingtype) is set to `auto` or `autoclient`.
1858
+
1859
+> [!TIP]
1860
+> Delegated routing allows IPFS implementations to offload tasks like content routing, peer routing, and naming to a separate process or server while also benefiting from HTTP caching.
1861
+>
1862
+> One can run their own delegated router either by implementing the [Delegated Routing V1 HTTP API](https://specs.ipfs.tech/routing/http-routing-v1/) themselves, or by using [Someguy](https://github.com/ipfs/someguy), a turn-key implementation that proxies requests to the Amino DHT and other delegated routing servers, such as the Network Indexer at `cid.contact`. Public utility instance of Someguy is hosted at [`https://delegated-ipfs.dev`](https://docs.ipfs.tech/concepts/public-utilities/#delegated-routing).
1863
+
1864
+Default: `["https://cid.contact"]` (empty or `nil` will also use this default; to disable delegated routing, set `Routing.Type` to `dht` or `dhtclient`)
1865
+
1866
+Type: `array[string]`
1867
1868
### `Routing.Routers`
1869
2622
2623
Type: `optionalDuration`
2624
2625
+## `HTTPRetrieval`
2626
+
2627
+`HTTPRetrieval` is configuration for pure HTTP retrieval based on Trustless HTTP Gateways'
2628
+[Block Responses (`application/vnd.ipld.raw`)](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw)
2629
+which can be used in addition to or instead of retrieving blocks with [Bitswap over Libp2p](#bitswap).
2630
+
2631
+Default: `{}`
2632
+
2633
+Type: `object`
2634
+
2635
+### `HTTPRetrieval.Enabled`
2636
+
2637
+> [!CAUTION]
2638
+> This feature is **EXPERIMENTAL** and may change in future release. Enable with caution, and provide feedback via GitHub issues.
2639
+
2640
+Controls whether HTTP-based block retrieval is enabled.
2641
+
2642
+When enabled, Kubo will be able to act on `/tls/http` (HTTP/2) providers ([Trustless HTTP Gateways](https://specs.ipfs.tech/http-gateways/trustless-gateway/)) returned by the [`Routing.DelegatedRouters`](#routingdelegatedrouters)
2643
+to perform pure HTTP [block retrievals](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw)
2644
+in addition to [Bitswap over Libp2p](#bitswap).
2645
+
2646
+HTTP requests for `application/vnd.ipld.raw` will be issued instead of Bitswap if a peer has a `/tls/http` multiaddr
2647
+and the HTTPS server returns HTTP 200 for the [probe path](https://specs.ipfs.tech/http-gateways/trustless-gateway/#dedicated-probe-paths).
2648
+
2649
+> [!IMPORTANT]
2650
+> - Requires TLS and HTTP/2.
2651
+> - This feature works in the same way as Bitswap: connected HTTP-peers receive optimistic block requests even for content that they are not announcing.
2652
+> - HTTP client does not follow redirects. Providers should keep announcements up to date.
2653
+> - IPFS ecosystem is working towards [supporting HTTP providers on Amino DHT](https://github.com/ipfs/specs/issues/496). Currently, HTTP providers are mostly limited to results from [`Routing.DelegatedRouters`](#routingdelegatedrouters) endpoints and requires `Routing.Type=auto|autoclient`.
2654
+
2655
+Default: `false`
2656
+
2657
+Type: `flag`
2658
+
2659
+### `HTTPRetrieval.Allowlist`
2660
+
2661
+Optional list of hostnames for which HTTP retrieval is allowed for.
2662
+If this list is not empty, only hosts matching these entries will be allowed for HTTP retrieval.
2663
+
2664
+> [!TIP]
2665
+> To limit HTTP retrieval to a provider at `/dns4/example.com/tcp/443/tls/http` (which would serve `HEAD|GET https://example.com/ipfs/cid?format=raw`), set this to `["example.com"]`
2666
+
2667
+Default: `[]`
2668
+
2669
+Type: `array[string]`
2670
+
2671
+### `HTTPRetrieval.Denylist`
2672
+
2673
+Optional list of hostnames for which HTTP retrieval is not allowed.
2674
+Denylist entries take precedence over Allowlist entries.
2675
+
2676
+
2677
+> [!TIP]
2678
+> This denylist operates on HTTP endpoint hostnames.
2679
+> To deny specific PeerID, use [`Routing.IgnoreProviders`](#routingignoreproviders) instead.
2680
+
2681
+Default: `[]`
2682
+
2683
+Type: `array[string]`
2684
+
2685
+### `HTTPRetrieval.NumWorkers`
2686
+
2687
+The number of worker goroutines to use for concurrent HTTP retrieval operations.
2688
+This setting controls the level of parallelism for HTTP-based block retrieval operations.
2689
+Higher values can improve performance when retrieving many blocks but may increase resource usage.
2690
+
2691
+Default: `16`
2692
+
2693
+Type: `optionalInteger`
2694
+
2695
+### `HTTPRetrieval.MaxBlockSize`
2696
+
2697
+Sets the maximum size of a block that the HTTP retrieval client will accept.
2698
+
2699
+> [!NOTE]
2700
+> This setting is a security feature designed to protect Kubo from malicious providers who might send excessively large or invalid data.
2701
+> Increasing this value allows Kubo to retrieve larger blocks from compatible HTTP providers, but doing so reduces interoperability with Bitswap, and increases potential security risks.
2702
+>
2703
+> Learn more: [Supporting Large IPLD Blocks: Why block limits?](https://discuss.ipfs.tech/t/supporting-large-ipld-blocks/15093#why-block-limits-5)
2704
+
2705
+Default: `2MiB` (matching [Bitswap size limit](https://specs.ipfs.tech/bitswap-protocol/#block-sizes))
2706
+
2707
+Type: `optionalString`
2708
+
2709
+### `HTTPRetrieval.TLSInsecureSkipVerify`
2710
+
2711
+Disables TLS certificate validation.
2712
+Allows making HTTPS connections to HTTP/2 test servers with self-signed TLS certificates.
2713
+Only for testing, do not use in production.
2714
+
2715
+Default: `false`
2716
+
2717
+Type: `flag`
2718
+
2719
## `Import`
2720
2721
Options to configure the default options used for ingesting data, in commands such as `ipfs add` or `ipfs block put`. All affected commands are detailed per option.