Commit Graph

301 Commits

Author SHA1 Message Date
Henrique Dias
e166af9756
core/corehttp: wrap gateway with headers, deprecate gateway /api/v0 2024-01-24 09:33:23 +00:00
Henrique Dias
d1db95c447 config: remove all options that are marked as REMOVED
Most of the removed options are many years old. In addition, they've all been removed in past iterations of Kubo. Some options were marked as removed in the config.md, but we still had a warning in the code to let users know they have been removed.

I think it's been long enough for all of this options, and enough Kubo iterations in order to alert the users. It is good to keep it in the config.md for now so that people can actually check. However, I think it's time to remove them from the code itself.
2024-01-22 15:33:27 +01:00
Marcin Rataj
9343a95f4d docs(config): clarify ReproviderStrategy roots 2024-01-12 13:13:29 +01:00
sukun
3ae04c536e docs: clarify WebRTCDirect cannot reuse the same port as QUIC 2023-11-22 10:29:43 +01:00
Jorropo
6a51849c29 libp2p: remove mplex
Fixes: #10069
2023-11-22 08:06:39 +03:00
Jorropo
a617c52f57 libp2p: default to preffering TLS
See https://github.com/libp2p/go-libp2p/pull/2650.
2023-11-22 06:06:15 +01:00
Henrique Dias
01cc5eab57
feat(rpc): Opt-in HTTP RPC API Authorization (#10218)
Context: https://github.com/ipfs/kubo/issues/10187
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-11-17 01:29:29 +01:00
Marcin Rataj
7834a26d03 docs(changelog): clarify webrtc in v0.24
This sets the expectations (not production ready) and
gives users hint how to enable it by adding `/udp/4001/webrtc-direct`
listener.
2023-11-09 09:23:22 +01:00
Jonas Keunecke
f17a064193 docs/config: remove extra commas in PublicGateways example entries 2023-11-06 15:03:57 +01:00
Henrique Dias
884a3f36d4
docs: make it clear Web RTC Direct is experimental 2023-11-03 14:49:35 +01:00
Henrique Dias
9f3251c1b0 feat: add WebRTC Direct support 2023-11-03 14:43:42 +01:00
Alejandro Criado-Pérez
cc3c224c62
docs: fix typos 2023-09-22 11:08:26 +00:00
Marcin Rataj
5c0508b8dd docs: s/ipfs dht/amino dht/ 2023-09-22 08:23:09 +02:00
Henrique Dias
0bac56c3aa
feat: add Gateway.DisableHTMLErrors option (#10137) 2023-09-21 15:03:17 +00:00
Henrique Dias
4606586207
feat(gateway): expose /routing/v1 server (opt-in) (#9877) 2023-08-25 17:30:04 +02:00
Henrique Dias
5ea58251d5
chore: update boxo, go-libp2p, and internalize mplex (#10095) 2023-08-24 06:11:02 +00:00
Jorropo
f805b9fcda feat: allow users to optin again into mplex
This is a partial revert of 7220409394.

Closes #9958
2023-08-15 14:53:44 +02:00
Jorropo
7220409394 feat: remove Mplex
Mplex does not implement backpressure, our implementation will randomly reset streams if buffers overflow instead of risking deadlocks.

In the past we had a bug where kubo nodes would prefer mplex over yamux. Turning off mplex make our connections to thoses nodes negociate yamux.

Closes #9958
2023-08-15 11:35:45 +02:00
Marcin Rataj
da44c9f7a1 docs: Gateway.HTTPHeaders 2023-06-30 09:27:04 +02:00
Jorropo
e7294cbdff feat: warn users who are falling behind reprovides
Fixes: #9704
Fixes: #9702
Fixes: #9703
Fixes: #9419
2023-06-08 10:05:30 +02:00
Marco Munizaga
8390f8596f
docs: update QUIC as the most widely used transport by Kubo nodes (#9921)
* Update QUIC as the most widely used transport by Kubo nodes

* Update docs
2023-06-08 01:04:20 +02:00
Henrique Dias
c10b804449
feat: Gateway.DeserializedResponses config flag (#9789)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-05-30 00:59:34 +02:00
Marcin Rataj
38556b8d21
docs: Reprovider config (#9900)
This updates docs to match new values from https://github.com/ipfs/kubo/pull/9326
2023-05-29 16:17:11 +02:00
Marcin Rataj
196b5c16c0
docs(config): remove mentions of relay v1 (#9860)
Context: https://github.com/ipfs/interop/pull/592
2023-05-08 14:20:51 +02:00
Henrique Dias
88d431c812
feat: remove writable gateway (#9743)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-03-27 15:19:55 +02:00
Jorropo
1f5763f787 chore: deprecate the pubsub api
Fixes #9717
2023-03-15 04:42:02 +01:00
Gus Eggert
0d94bac30c feat: add "autoclient" routing type
This routing type is the same as "auto" but it creates the DHT in
"client" mode and hence does not start a DHT server.
2023-03-09 08:18:14 -05:00
omahs
698166bf2a
docs: fix typos 2023-03-06 09:42:54 -05:00
Steve Loeppky
f84ad6d627 Doc updates/additions 2023-03-03 12:39:25 +01:00
Gabe
e3b17a4fe6
docs: be clear about swarm.addrfilters (#9661) 2023-02-27 15:43:20 +01:00
ElPaisano
714a968faa
docs: bulk spelling edits (#9544)
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-02-20 23:37:10 +01:00
Henrique Dias
14649aa8ba
refactor: new go-libipfs/gateway API, deprecate Gateway.Writable (#9616) 2023-02-02 02:50:46 +01:00
Antonio Navarro Perez
633c497f63 Adjust inbound connection limits depending on memory. 2023-01-30 11:01:03 +01:00
Mohsin Zaidi
9652f24f6c
feat: Pubsub.SeenMessagesStrategy (#9543)
* feat: expire messages from the cache based on last seen time
* docs: Pubsub.SeenMessagesStrategy

Ref. https://github.com/libp2p/go-libp2p-pubsub/pull/513

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-27 00:24:35 +01:00
Steve Loeppky
9327ee64ce
fix: clarity: no user supplied rcmgr limits of 0 (#9563)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-22 20:04:18 +01:00
Antonio Navarro Perez
d386c43117
docs(config): ProviderSearchDelay (#9526)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-01-04 20:44:37 +01:00
Jorropo
ffb635d797
Merge pull request #9492 from ipfs/default-webtransport
feat: turn on WebTransport by default
2022-12-12 22:57:09 +01:00
Jorropo
16d189b8b8 feat: turn on WebTransport by default
Fixes #9292
2022-12-12 21:56:55 +01:00
Henrique Dias
7bdb341132
feat: fast directory listings with DAG Size column (#9481)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-12-12 21:45:13 +01:00
Marcin Rataj
70e604ff99
feat: Routing.Type=auto (DHT+IPNI) (#9475)
This changes the default routing to use both DHT and IPNI
at the same time. Closes #9454 Closes #9422

Full context:
https://github.com/ipfs/kubo/issues/9454
https://github.com/ipfs/kubo/issues/9422

Co-authored-by: Steve Loeppky <biglep@protocol.ai>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
2022-12-08 23:20:24 +01:00
Marcin Rataj
1f636400aa
feat: adjust ConnMgr target to 32-96 (#9483)
https://github.com/ipfs/kubo/pull/9483#issuecomment-1343067553
2022-12-08 21:45:32 +01:00
Steve Loeppky
01e0bfa359
docs: libp2p resource management (#9468)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-12-08 16:18:04 +01:00
Marcin Rataj
e0e4741fe0 feat: lower connection pool 2022-12-07 23:00:00 +01:00
Antonio Navarro Perez
7a8639ee33 Apply suggestions from code review
Co-authored-by: Steve Loeppky <biglep@protocol.ai>
2022-12-07 16:47:37 +01:00
Antonio Navarro Perez
22a03bda6d Increase MaxMemory param to use half of total memory.
Previously it was using 1/8 of the total memory.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-12-07 16:47:37 +01:00
Antonio Navarro Perez
7f5adb5e07 Add sharness tests and documentation 2022-12-07 16:34:59 +01:00
Mohsin Zaidi
51f60ea05a
feat(config): Pubsub.SeenMessagesTTL (#9372)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-11-29 00:05:44 +01:00
galargh
227641a309 Merge remote-tracking branch 'origin/master' into merge-release-v0.17.0 2022-11-23 10:56:34 +01:00
Steve Loeppky
039badf3b2
Update config.md for resource management limits (#9421) 2022-11-18 18:51:12 +01:00
Steve Loeppky
83034d840c Doc improvements and changelog for resource manager (#9413)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-11-16 13:09:12 +01:00
Steve Loeppky
6f730dc268
Doc improvements and changelog for resource manager (#9413)
Co-authored-by: Antonio Navarro Perez <antnavper@gmail.com>
2022-11-16 11:26:59 +01:00
Steve Loeppky
9eeca82269 Revert "Doc improvements for rcmgr"
This reverts commit b1a89c93e4.
2022-11-16 08:32:24 +00:00
Steve Loeppky
b1a89c93e4 Doc improvements for rcmgr
This was done taking a fresh look for someone learning about
the resource manager being enabled by default.

Moved and expanded documentation to the right places for more visibility.

Added an initial changelog entry.
2022-11-16 08:06:23 +00:00
Marcin Rataj
db3d1cd8e1 fix(docs): typo 2022-11-15 21:36:10 +01:00
Lucas Molas
65365192f7 refactor(config): remove Swarm.ConnMgr defaults
This moves defaults to Kubo code, cleaning up config.
If value is in config, we assume it is an explicit choice made by user.
Makes migrations easier.
2022-11-15 21:34:38 +01:00
Lucas Molas
e34c0da2b5 refactor(config): remove Swarm.ConnMgr defaults
This moves defaults to Kubo code, cleaning up config.
If value is in config, we assume it is an explicit choice made by user.
Makes migrations easier.
2022-11-15 20:26:59 +01:00
Antonio Navarro Perez
e58cde1789
docs: Deprecate Reframe on docs. (#9401) 2022-11-15 17:01:08 +01:00
Marcin Rataj
fd1a8f2cec
fix(docs): typo 2022-11-11 00:05:02 +01:00
Antonio Navarro Perez
254d81a9d5
feat: Improve ResourceManager UX (#9338)
This PR adds several new functionalities to make easier the usage of ResourceManager:

- Now resource manager logs when resources are exceeded are on ERROR instead of warning.
- The resources exceeded error now shows what kind of limit was reached and the scope.
- When there was no limit exceeded, we print a message for the user saying that limits are not exceeded anymore.
- Added `swarm limit all` command to show all set limits with the same format as `swarm stats all`
- Added `min-used-limit-perc` option to `swarm stats all` to only show stats that are above a specific percentage
- Simplify a lot default values.
- **Enable ResourceManager by default.**

Output example:
```
2022-11-09T10:51:40.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:51:50.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 483095 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:51:50.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:00.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 455294 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:00.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:10.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 471384 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:10.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 8 times with error "peer:12D3KooWKqcaBtcmZKLKCCoDPBuA6AXGJMNrLQUPPMsA5Q6D1eG6: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 192 times with error "peer:12D3KooWPjetWPGQUih9LZTGHdyAM9fKaXtUxDyBhA93E3JAWCXj: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 469746 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 484137 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 29 times with error "peer:12D3KooWPjetWPGQUih9LZTGHdyAM9fKaXtUxDyBhA93E3JAWCXj: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:40.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 468843 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:40.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:52:50.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 366638 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:52:50.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 405526 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 107 times with error "peer:12D3KooWQZQCwevTDGhkE9iGYk5sBzWRDUSX68oyrcfM9tXyrs2Q: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:00.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:10.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 336923 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:10.566+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:55      Resource limits were exceeded 71 times with error "transient: cannot reserve inbound stream: resource limit exceeded".
2022-11-09T10:53:20.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:59      Consider inspecting logs and raising the resource manager limits. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#swarmresourcemgr
2022-11-09T10:53:30.565+0100    ERROR   resourcemanager libp2p/rcmgr_logging.go:64      Resrouce limits are no longer being exceeded.

```
## Validation tests

- Accelerated DHT client runs with no errors when ResourceManager is active. No problems were observed.
- Running an attack with 200 connections and 1M streams using yamux protocol. Node was usable during the attack. With ResourceManager deactivated, the node was killed by the OS because of the amount of memory consumed.
	- Actions done when the attack was active:
		- Add files 
		- Force a reprovide
		- Use the gateway to resolve an IPNS address.

It closes #9001 
It closes #9351
It closes #9322
2022-11-10 12:25:57 +01:00
Henrique Dias
4291d6b236
fix: add InlineDNSLink flag to PublicGateways config (#9328)
https://github.com/ipfs/kubo/issues/9243
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-10-11 15:45:43 +02:00
Jorropo
b539cd4e47 docs: add WebTransport docs 2022-09-27 16:14:34 +02:00
Antonio Navarro Perez
d1b9e41fc2
feat: Delegated routing with custom configuration. (#9274)
New multi-router configuration system based on https://hackmd.io/G1KRDEX5T3qyfoBMkIrBew#Methods

- Added a new routing type: "custom"
- Added specific struct types for different Routers (instead of map[string]interface{})
- Added `Duration` config type, to make easier time string parsing
- Added config documentation.
- Use the latest go-delegated-routing library version with GET support.
- Added changelog notes for this feature.

It:
- closes #9157
- closes #9079
- closes #9186
2022-09-22 15:47:45 +02:00
eth-limo
8e2bf82f97
docs: fix broken ENS DoH example (#9281) 2022-09-21 00:37:47 +02:00
Marcin Rataj
c9693edbc5 chore: remove Gateway.PathPrefixes
Closes #7702
2022-08-30 15:38:04 +02:00
Oleg
6516883b6b
correct data type for Reprovider.Interval (#9224)
* correct data type for Reprovider.Interval

Signed-off-by: Oleg Silkin <16809287+osilkin98@users.noreply.github.com>
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-08-25 12:27:42 -07:00
Marcin Rataj
9c6094e651 docs(config): mention routing.delegate.ipfs.io 2022-08-18 16:52:44 +02:00
Marcin Rataj
77251b60c4
test(rcmgr): regression test prometherus metrics 2022-08-17 01:27:50 +02:00
Marcin Rataj
5ca74c7f7a docs(config): Swarm.ResourceMgr.Allowlist 2022-08-17 00:38:51 +02:00
Brendan O'Brien
8fd49badc2
Add reference to Experimental config doc (#9181)
* Add reference to Experimental config doc

this clarifies that `Experimental` is in fact a top level configuration key, and links to the most current documentation

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-08-11 10:15:08 -07:00
Seungbae Yu
cb280cbf16
docs: replace docs.ipfs.io with docs.ipfs.tech (#9158)
* docs: fix redirecting URL in README.md
* all: replace `docs.ipfs.io` with `docs.ipfs.tech`
* apply suggestions from code review

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-08-05 19:01:10 +03:00
lostystyg
f9db823138
chore: fix markdown link syntax typo for AutoNAT.ServiceMode 2022-08-03 15:17:28 +02:00
Marcin Rataj
bcab64d42d docs(config): add link to someguy router 2022-07-21 21:00:39 +02:00
Antonio Navarro Perez
92c4dc61a8
feat(routing): Delegated Routing (#8997)
* Delegated Routing.

Implementation of Reframe specs (https://github.com/ipfs/specs/blob/master/REFRAME.md) using go-delegated-routing library.

* Requested changes.

* Init using op string

* Separate possible ContentRouters for TopicDiscovery.

If we don't do this, we have a ciclic dependency creating TieredRouter.
Now we can create first all possible content routers, and after that,
create Routers.

* Set dht default routing type

* Add tests and remove uneeded code

* Add documentation.

* docs: Routing.Routers

* Requested changes.

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>

* Add some documentation on new fx functions.

* Add changelog entry and integration tests

* test: sharness for 'dht' in 'routing' commands

Since 'routing' is currently the same as 'dht' (minus query command)
we need to test both, that way we won't have unnoticed divergence
in the default behavior.

* test(sharness): delegated routing via reframe URL

* Add more tests for delegated routing.

* If any put operation fails, the tiered router will fail.

* refactor: Routing.Routers: Parameters.Endpoint

As agreed  in https://github.com/ipfs/kubo/pull/8997#issuecomment-1175684716

* Try to improve CHANGELOG entry.

* chore: update reframe spec link

* Update go-delegated-routing dependency

* Fix config error test

* use new changelog format

* Remove port conflict

* go mod tidy

* ProviderManyWrapper to ProviderMany

* Update docs/changelogs/v0.14.md

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2022-07-07 17:10:25 -04:00
Marcin Rataj
8565bbb75c
refactor: kubo in ./docs 2022-07-06 23:45:25 +02:00
Daniel N
e5f63393ff docs: refine wording 2022-07-06 22:47:07 +02:00
Daniel N
d323189598 docs: refine the wording of provider strategies 2022-07-06 22:47:07 +02:00
Marcin Rataj
61f0710100
fix: remove mdns_legacy & Discovery.MDNS.Interval
* fix: remove mdns_legacy

We've been running both implementations for a long, long time.
It is time to remove legacy version and lower the number of LAN packets
IPFS node produces.

See https://github.com/ipfs/go-ipfs/pull/9048#discussion_r906814717
for the Interval removal rational.
2022-06-27 04:17:40 +02:00
Marcin Rataj
88d88158c6 docs: mark Swarm.ResourceMgr as experimental 2022-06-16 14:34:13 -04:00
Gus Eggert
b1c051d250
feat: disable resource manager by default (#9003)
* feat: disable resource manager by default

We are disabling this by default for v0.13 as we work to improve the
UX around Resource Manager. It is still usable and can be enabled in
the IPFS config with "ipfs config --bool Swarm.ResourceMgr.Enabled true".

We intend to enable Resource Manager by default in a subsequent
release.

* docs(config): Swarm.ResourceMgr disabled by default

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-06-02 10:31:06 -04:00
Marcin Rataj
53299e84e0
chore: mark fuse experimental (#8962)
It works only on some platforms, and does not work reliably.
This corrects our error of not setting expectations right.
2022-05-12 10:32:54 -07:00
Gus Eggert
3d527753ff feat: enable Resource Manager by default 2022-05-04 14:08:37 -04:00
Marcin Rataj
cab69276e9 docs: Swarm.ResourceMgr.Limits 2022-05-03 16:21:03 -04:00
Adin Schmahmann
7ad6447453 feat: enable hole-punching by default 2022-05-03 14:26:09 -04:00
Lucas Molas
25cc85fa93
feat(gateway): Gateway.FastDirIndexThreshold (#8853)
* fix(core/gateway): option to limit directory size listing

* feat(gw): HTMLDirListingLimit

This is alternative take on the way we limit the HTML listing output.
Instead of a hard cut-off, we list up to HTMLDirListingLimit.
When a directory has more items than HTMLDirListingLimit we show
additional header and footer informing user that only $HTMLDirListingLimit
items are listed. This is a better UX.

* fix: 0 disables Gateway.HTMLDirListingLimit

* refactor: Gateway.FastDirIndexThreshold

see explainer in docs/config.md

* refactor: prealoc slices

* docs: Gateway.FastDirIndexThreshold

* refactor: core/corehttp/gateway_handler.go

https://github.com/ipfs/go-ipfs/pull/8853#discussion_r851437088

* docs: apply suggestions from code review

Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
2022-04-28 19:36:57 +02:00
Marten Seemann
232ccb4e55
feat: relay v2 discovery (go-libp2p v0.19.0) (#8868)
* update go-libp2p to v0.19.0
* chore: go-namesys v0.5.0
* refactor(config): cleanup relay handling
* docs(config): document updated defaults
* fix(tests): panic during sharness

* fix: t0160-resolve.sh
See https://github.com/ipfs/go-namesys/pull/32

* fix: t0182-circuit-relay.sh
* test: transport encryption

Old tests were no longer working because go-libp2p 0.19 removed
the undocumented 'ls' pseudoprotocol.

This replaces these tests with handshake attempt (name is echoed back on
OK or 'na' is returned when protocol is not available) for tls and noise
variants + adds explicit test that safeguards us against enabling
plaintext by default by a mistake.

* fix: ./t0182-circuit-relay.sh

test is flaky, for now we just restart the testbed when we get
NO_RESERVATION error

* refactor: AutoRelayFeeder with exp. backoff

It starts at feeding peers ever 15s, then backs off each time
until it is done once an hour

Should be acceptable until we have smarter mechanism in go-lib2p 0.20

* feat(AutoRelay): prioritize Peering.Peers

This ensures we feed trusted Peering.Peers in addition to any peers
discovered over DHT.

* docs(CHANGELOG): document breaking changes

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
2022-04-28 17:13:15 +02:00
Marten Seemann
514411bedb
feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680)
* update go-libp2p to v0.18.0

* initialize the resource manager

* add resource manager stats/limit commands

* load limit file when building resource manager

* log absent limit file

* write rcmgr to file when IPFS_DEBUG_RCMGR is set

* fix: mark swarm limit|stats as experimental

* feat(cfg): opt-in Swarm.ResourceMgr

This ensures we can safely test the resource manager without impacting
default behavior.

- Resource manager is disabled by default
    - Default for Swarm.ResourceMgr.Enabled is false for now
- Swarm.ResourceMgr.Limits allows user to tweak limits per specific
  scope in a way that is persisted across restarts
- 'ipfs swarm limit system' outputs human-readable json
- 'ipfs swarm limit system new-limits.json' sets new runtime limits
  (but does not change Swarm.ResourceMgr.Limits in the config)

Conventions to make libp2p devs life easier:
- 'IPFS_RCMGR=1 ipfs daemon' overrides the config and enables resource manager
- 'limit.json' overrides implicit defaults from libp2p (if present)

* docs(config): small tweaks

* fix: skip libp2p.ResourceManager if disabled

This ensures 'ipfs swarm limit|stats' work only when enabled.

* fix: use NullResourceManager when disabled

This reverts commit b19f7c9eca.
after clarification feedback from
https://github.com/ipfs/go-ipfs/pull/8680#discussion_r841680182

* style: rename IPFS_RCMGR to LIBP2P_RCMGR

preexisting libp2p toggles use LIBP2P_ prefix

* test: Swarm.ResourceMgr

* fix: location of opt-in limit.json and rcmgr.json.gz

Places these files inside of IPFS_PATH

* Update docs/config.md

* feat: expose rcmgr metrics when enabled (#8785)

* add metrics for the resource manager
* export protocol and service name in Prometheus metrics
* fix: expose rcmgr metrics only when enabled

Co-authored-by: Marcin Rataj <lidel@lidel.org>

* refactor: rcmgr_metrics.go

* refactor: rcmgr_defaults.go

This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled

We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p
decides to change defaults in any of the future releases.

* refactor: adjustedDefaultLimits

Cleans up the way we initialize defaults and adds a fix for case
when connection manager runs with high limits.

It also hides `Swarm.ResourceMgr.Limits` until we have a better
understanding what syntax makes sense.

* chore: cleanup after a review

* fix: restore go-ipld-prime v0.14.2

* fix: restore go-ds-flatfs v0.5.1

Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-04-07 21:06:35 -04:00
Adin Schmahmann
eafa1c7345
docs: note the default reprovider strategy as all (#8603) 2022-03-10 01:42:33 -08:00
Adin Schmahmann
686993f6f2
docs: add Internal.UnixFSShardingSizeThreshold (#8723)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-02-18 23:37:55 +01:00
Marcin Rataj
f9643a61d7
docs: optionalInteger|String|Duration (#8729) 2022-02-10 23:52:18 +01:00
Thibault Meunier
a93907a40f
feat: DNS.MaxCacheTTL for DNS-over-HTTPS resolvers (#8615)
* feat: Add MaxCacheTTL option for DNS-over-HTTPS resolvers
* Update libp2p/go-doh-resolver dependencies to support Options
* feat: Add `DNS.MaxCacheTTL` config documentation
* docs: DNS.MaxCacheTTL
* chore: go-ipfs-config@v0.19.0
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2022-02-10 22:26:14 +01:00
Marcin Rataj
4ad316803e
docs: update badger section in config.md (#8662)
This should fix the issue of users thinking badger
is "no-brainer faster choice" and then running into problems.

Co-authored-by: Johnny <9611008+johnnymatthews@users.noreply.github.com>
2022-01-28 23:22:26 +01:00
Somajit
7e4fcbb324 Fixed typos in docs/config.md 2022-01-14 11:32:00 -05:00
Marten Seemann
48a6cac00b
feat: Swarm.EnableHolePunching flag (#8562)
* feat: use Swarm.EnableHolePunching flag within libp2p
* docs: Swarm.EnableHolePunching

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-11-30 11:18:51 -08:00
jwh
029d82c4ea
feat: enabling pubsub and ipns-pubsub via config flags (#8510)
* Allow pubsub and namesys-pubsub to be enabled via config

Signed-off-by: Joe Holden <jwh@zorins.us>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-11-30 11:00:11 -08:00
Jorropo
c2953ab8f1
feat: Addresses.AppendAnnounce (#8177)
* feat: Addresses.AppendAnnounce

Closes #7791

* fix: deduplicate Swarm.Announce and AppendAnnounce

https://github.com/ipfs/go-ipfs/pull/8177#discussion_r759317772
https://github.com/ipfs/go-ipfs/pull/8177#discussion_r759320332

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-11-30 17:58:19 +01:00
Adin Schmahmann
52c177ced9
feat: go-libp2p 0.16, UnixFS autosharding and go-datastore with contexts (#8563)
* plumb through go-datastore context changes

* update go-libp2p to v0.16.0
* use LIBP2P_TCP_REUSEPORT instead of IPFS_REUSEPORT
* use relay config
* making deprecation notice match the go-ipfs-config key
* docs(config): circuit relay v2
* docs(config): fix links and headers
* feat(config): Internal.Libp2pForceReachability

This switches to config that supports setting and reading
Internal.Libp2pForceReachability OptionalString flag

* use configuration option for static relays

* chore: go-ipfs-config v0.18.0

https://github.com/ipfs/go-ipfs-config/releases/tag/v0.18.0

* feat: circuit v1 migration prompt when Swarm.EnableRelayHop is set (#8559)
* exit when Swarm.EnableRelayHop is set
* docs: Experimental.ShardingEnabled migration

This ensures existing users of global sharding experiment get notified
that the flag no longer works + that autosharding happens automatically.

For people who NEED to keep the old behavior (eg. have no time to
migrate today) there is a note about restoring it with
`UnixFSShardingSizeThreshold`.

* chore: add dag-jose code to the cid command output

* add support for setting automatic unixfs sharding threshold from the config
* test: have tests use low cutoff for sharding to mimic old behavior
* test: change error message to match the current error
* test: Add automatic sharding/unsharding tests (#8547)
* test: refactored naming in the sharding sharness tests to make more sense

* ci: set interop test executor to convenience image for Go1.16 + Node
* ci: use interop master

Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
Co-authored-by: Lucas Molas <schomatis@gmail.com>
2021-11-29 19:58:05 +01:00
Dimitris Apostolou
0c2f9d5950
Fix typos (#8548) 2021-11-17 21:16:06 +01:00
Adin Schmahmann
7448340d20
support bitswap configurability (#8268)
* feat: extract Bitswap fx initialization to its own file
* chore: bump go-bitswap dependency
* feat: bump go-ipfs-config dependency and utilize the new Internal.Bitswap configuration options. Add documentation around the new OptionalInteger config type as well as the Internal.Bitswap options.
* docs(docs/config.md): move the table of contents towards the top of the document and update it

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <877588+guseggert@users.noreply.github.com>
2021-08-18 14:15:16 -04:00
Steven Allen
6258374211 doc(config): address nits 2021-05-17 08:25:47 -07:00
@RubenKelevra
253f99f061 config.md: fix typos/improve wording 2021-05-17 08:25:46 -07:00
Andrew Gillis
c54cdaa1f8
Feat/migration ipfs download (#8064)
* Enable downloading migrations over IPFS

There are now options in the config file that control how migrations are downloaded. This includes enabling downloading migrations using IPFS by (when migrations are required) spinning up a temporary node for fetching the migrations before running them. There is also a config option to decide what to do with the migrations binaries once they are downloaded (e.g. cache or pin them in your node, or just throw out the data).

Co-authored-by: Steven Allen <steven@stebalien.com>
2021-05-12 09:33:14 -07:00
Marcin Rataj
35fe392491 docs: clarify DNS.Resolvers
- document implicit defaults for eth and crypto TLDs
- be very honest and link to ToS of cloudflare-eth.com
- provide suggestion that one should run own resolver if they really care about decentralization
2021-05-10 21:04:57 -07:00
vyzo
9866c13bda use {} as default for DNS.Resolvers in config 2021-05-10 21:04:57 -07:00
Marcin Rataj
0a4defe87b docs: fix formatting and add links to DNS section 2021-05-10 21:04:57 -07:00
vyzo
5a1593e87c update config documentation 2021-05-10 21:04:57 -07:00
David Pflug
d6322f485a
Fix transposed words in docs/config.md 2021-04-05 18:01:15 -04:00
Steven Allen
4cdb67f37d
Merge pull request #7890 from ipfs/fix/remove-clear-site-data
fix(gw): remove use of Clear-Site-Data in subdomain router
2021-03-31 16:24:24 -07:00
Marcin Rataj
2f105f79b9
chore: deprecate Gateway.PathPrefixes
Context:
https://github.com/ipfs/go-ipfs/issues/7702#issuecomment-803136077
2021-03-30 21:17:41 +02:00
Steven Allen
ccc2d23730 feat: remove secio support
We've had a reliable and enabled by default TLS implementation since
0.4.23 (over a year ago) and turned off SECIO in September of last year.
We might as well remove support entirely in the next release and
encourage users to upgrade their networks.

Noise is faster, anyways.
2021-02-25 13:36:40 -08:00
Marcin Rataj
cb7b147e5a
docs: tips on debugging Policies.MFS (#7929)
* docs: tips on debugging Policies.MFS

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-02-23 11:08:49 -05:00
Marcin Rataj
ced3580581
docs: fix DNSLink gw recipe
Unfortunate typo due to additional negation.
2021-02-20 11:46:08 +01:00
Marcin Rataj
04838257f8 docs: RepinInterval 2021-02-18 16:01:25 -05:00
Marcin Rataj
aaa64baaed style: docs/config.md
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
2021-02-18 16:01:25 -05:00
Marcin Rataj
af96ded973 style: improved MFS PinName example
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2021-02-18 16:01:25 -05:00
Marcin Rataj
c338ed83c7 docs: Pinning.RemoteServices.Policies 2021-02-18 16:01:25 -05:00
Marcin Rataj
d61ae2bcb4
fix: remove use of Clear-Site-Data
We used Clear-Site-Data to cushion transition period for local gateway
exposed at http://localhost while we were still figuring out
security-related details.

In the final implementation subdomain gateways are not tied to a
hostname explicitly, which removes the risk of cookies leaking,
removing the need for the header.

Turns out it causes issues for Firefox users, so let's just remove it.

Closes https://github.com/ipfs-shipyard/ipfs-companion/issues/977
2021-01-29 22:08:16 +01:00
Marcin Rataj
09178aa717
feat(gw): support inlined DNSLink names with TLS
Problem statement and rationale for doing this can be found under
"Option C" at: https://github.com/ipfs/in-web-browsers/issues/169

TLDR is:

`https://dweb.link/ipns/my.v-long.example.com` can be loaded from a
subdomain gateway with a wildcard TLS cert if represented as a single
DNS label: `https://my-v--long-example-com.ipns.dweb.link`
2021-01-01 21:39:42 +01:00
Petar Maymounkov
a8c7980721
add remote pinning to ipfs command (#7661)
Added support for remote pinning services

A pinning service is a service that accepts CIDs from a user in order to host the data associated with them.
The spec for these services is defined at https://github.com/ipfs/pinning-services-api-spec

Support is available via the `ipfs pin remote` CLI and the corresponding HTTP API

Co-authored-by: Petar Maymounkov <petarm@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
2020-12-08 20:32:33 -05:00
Jorropo
c2b4a83731
docs: Add a link in config.md 2020-11-19 01:30:51 +01:00
Marcin Rataj
76892f5c2f
docs(config): X-Forwarded-Host
This fixes a bug and documents X-Forwarded-Host

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-09-11 20:00:25 +02:00
Adin Schmahmann
0ad6a92716 docs: update config to indicate SECIO deprecation 2020-08-26 20:51:53 -04:00
Marcin Rataj
135b90e087 docs(config): fix Peering header
Peering is top level namespace
2020-08-25 10:39:32 -04:00
Adin Schmahmann
0c57e9dcf8
Merge pull request #7319 from MichaelMure/wildcard-gateways
feat: wildcard support for public gateways
2020-08-19 11:02:28 -04:00
Luflosi
0155a88e5f
docs: fix typo 2020-08-08 23:12:49 +02:00
Michael Muré
13e6bcfb4f
feat: wildcard support for public gateways
Add support for one or more wildcards in the hostname definition
of a public gateway. This is useful for example to support easily
multiples environment.

Wildcarded hostname are set in the config as for example "*.domain.tld".
2020-07-24 20:51:22 +02:00
Marcin Rataj
0acfb38763 chore: fix a typo 2020-07-10 14:13:11 -04:00
Marcin Rataj
580d68685c docs: document X-Forwarded-Host 2020-07-10 14:13:11 -04:00
Adin Schmahmann
19d6230cde Merge branch 'release' into master 2020-06-19 20:04:30 -04:00
Steven Allen
0cef475b2d docs(config): update toc 2020-06-16 22:04:24 -07:00
Steven Allen
c0951e73d7 doc(config): expand on config value limits 2020-06-16 15:15:51 -07:00
Steven Allen
e164af1f2a feat: add a transport config section
This way, users can disable transports (especially QUIC), and set muxer/security
transport priorities.
2020-06-16 15:15:47 -07:00
Steven Allen
ea55e747f2 doc(config): expand peering docs 2020-06-11 17:58:51 -07:00
Jessica Schilling
c86244ecf5
Update docs/config.md 2020-05-28 11:15:09 -06:00
Jessica Schilling
766023311a
Update docs-beta links to final URLs 2020-05-28 11:14:00 -06:00
Steven Allen
7990d2ccb5 doc: expand on peering service documentation
* Explain _why_ it exists.
* Explain how it can be used.
2020-05-25 20:24:43 -07:00
Steven Allen
978091a626 feat: implement peering service
MVP for #6097

This feature will repeatedly reconnect (with a randomized exponential backoff)
to peers in a set of "peered" peers.

In the future, this should be extended to:

1. Include a CLI for modifying this list at runtime.
2. Include additional options for peers we want to _protect_ but not connect to.
3. Allow configuring timeouts, backoff, etc.
4. Allow groups? Possibly through textile threads.
5. Allow for runtime-only peering rules.
6. Different reconnect policies.

But this MVP should be a significant step forward.
2020-05-25 20:24:41 -07:00
@RubenKelevra
2dc1f691f1 quic: remove experimental status and add it to the default config 2020-05-22 04:54:19 +02:00
Adin Schmahmann
a0e01501e7 docs: cleanup config formatting 2020-05-20 13:48:26 -04:00
Steven Allen
b29f9e9959 doc(config): document pubsub 2020-05-19 19:24:27 -07:00
Steven Allen
6719e124bb doc(config): sort sections 2020-05-19 19:13:50 -07:00
Marcin Rataj
10aaf24304
chore: update X-Forwarded-Proto copy text
Co-authored-by: Steven Allen <steven@stebalien.com>
2020-05-13 15:07:59 +02:00
Marcin Rataj
c5b30545bf
docs: X-Forwarded-Proto: https
Additional documentation for running subdomain gateway behind reverse proxy with TLS.
2020-05-12 13:00:25 +02:00
Corbin Page
19426b9ca2
Update config.md 2020-05-02 17:23:56 -04:00
Steven Allen
6d7d3ef30e doc: expand on relay documentation 2020-04-27 16:00:48 -07:00
Steven Allen
4ebe7e633d doc: fixup config docs
1. Update go-ipfs-config to fix default datastore.
2. Update TOC.
3. Update profiles list and indicate that badger isn't experimental.
2020-04-27 15:12:04 -07:00
Dimitris Apostolou
1e437c7e97
Fix typos and cleanup 2020-04-20 22:00:01 +03:00
Steven Allen
1f23fc000c feat: add autonat config options
1. Enable AutoNATService on _all_ nodes by default. If it's an issue, we can
disable it in RC3 but this will give us the best testing results.
2. Expose options to configure AutoNAT rate limiting.
2020-04-14 20:54:58 -07:00
Steven Allen
3e6f0a7942 doc: cleanup experimental features a bit 2020-04-06 18:53:16 -07:00
Marcin Rataj
3ecccd6e1d feat(gateway): subdomain and proxy gateway
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
2020-03-18 08:50:38 -07:00
Steven Allen
bd8917facf doc(config): cleanup
Trying to make this a bit more consistent and structured.

* Fix wrapping.
* Use headings for all config values.
2020-01-30 22:14:21 -08:00