1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 03:19:47 +08:00

142 Commits

Author SHA1 Message Date
a4d13e3f6b Add example of setting array to config command help
Closes #10645
2025-01-02 10:55:19 -10:00
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
Kay
f12b372af9 style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
82fbb84384 fmt: applies go1.19 fmt 2022-09-08 18:34:06 +02:00
82467bc936 refactor: rename to kubo 2022-07-06 18:40:37 +02:00
a433064d72 chore: replace ioutil with io and os (#8969)
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
2022-06-14 12:37:02 -04:00
20083ab328 fix(cmd/config): make config edit subcommand work on windows
Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
2022-06-09 17:36:11 +02:00
6817fd4744 feat(cmds): allow to set the configuration file path 2022-04-22 13:03:28 -03:00
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 b19f7c9eca4cee4187f8cba3389dc2c930258512.
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
8d549f03f3 fix: rewrite dependencies over the go-ipfs-config package 2022-03-04 09:45:16 +01:00
b3f054f450 Fix typo in comment 2021-04-22 20:30:41 +02:00
090953d298 docs: tweak ipfs cmd help
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842235
https://github.com/ipfs/go-ipfs/pull/8010#discussion_r600842123
2021-03-30 21:26:32 +02:00
0ff1cf33aa docs: cosmetic fixes of help text
Unfortunately, API docs are genereted from go-ipfs sources
via https://github.com/ipfs/http-api-docs
so it all gets lost when API docs for new version are re-generated.

This re-applies manual fixes from:
https://docs.ipfs.io/reference/http/api/
so the next time http-api-docs are re-generated, those changes stay.
2021-03-24 17:41:14 +01:00
8794928c31 add remote pinning policy for mfs (#7798)
* remote pinning service MFS policy
* update go-ipfs-config
* hardening secret sanitization in `ipfs config` commands

Co-authored-by: Adin Schmahmann <adin.schmahmann@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2021-01-28 18:58:44 -05:00
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
692e9f59ff refactor: get rid of cmdDetails awkwardness 2020-08-04 18:28:40 -04:00
5f64b270f8 cmdkit -> cmds
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-10 23:00:20 -07:00
1f293eff1b chore: fix a bunch of issues caught by golangci-lint
Most of these are probably harmless but a few looked like they might actually be
bugs. Most of them are just faulty tests.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-29 11:57:45 +00:00
42e191c017 gx: unrewrite
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-03-05 18:33:56 +01:00
3fa1bfe1bc gx: update cmds and flatfs
fixes #6028, fixes crash when writing after closing on flatfs.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-03-01 12:17:49 -08:00
f227862e88 gx: update go-ipfs-cmds, go-bitswap, go-libp2p-kad-dht, and go-mplex
Fixes the latest batch of bugs found in RC testing.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-27 12:39:24 -08:00
6972a9aa4d Gx Bubble. libp2p-6.0.38
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2019-02-27 01:10:59 +00:00
3c2536dd81 gx: update go-ipfs-cmds
fixes #6021

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-25 16:45:43 -07:00
2f17b951c2 gx: update deps
* Updates go-ipfs-cmds to try to get the tests to pass on travis.
* While we're at it, fix duplicate gx deps.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-19 13:12:21 -08:00
a356aeb9b9 cmds/config: make config get use EmitOnce
(interop)

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-18 19:27:24 -08:00
28cf3de0f9 Update protobuf
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2019-02-18 20:46:22 +01:00
e97a60b073 gx: update go-ipfs-files
fix compatibility issue with js-ipfs

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-11 10:48:58 -08:00
2c93eeffc6 gx: update go-libp2p-peer
Switch _back_ to the 0.4.18 style of peer IDs while we figure things out. See
https://github.com/libp2p/specs/issues/138.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-02-07 17:41:39 -08:00
7c2aa0e9a9 gx: update go-unixfs to propagate archive changes
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-30 20:58:32 +01:00
4e91469b90 refact(cmd/config): change string option to const
License: MIT
Signed-off-by: chenminjian <727180553@qq.com>
2019-01-27 14:26:58 +08:00
ab270fbaa7 Bubble go-ipfs-cmds 2.0.10
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2019-01-10 21:31:11 +01:00
08cc5da55f gx: update deps
Importantly:

* fixes a bunch of MFS bugs
* pulls in some bitswap improvements

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-01-08 19:19:34 -08:00
7b4ab36817 gx: update go-ipfs-config
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-01-04 02:37:06 +01:00
56b6277d26 fix config data race
This fixes a data-race in the config.

This does not fix https://github.com/ipfs/go-ipfs/issues/4942 as there's still a
logical race: parallel config updates clobber each other.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-20 10:07:37 -08:00
5894291139 gx: update go-ipfs-config
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-20 10:07:32 -08:00
351ed26bd8 files2.0: common single-file helper
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
eed806a58b files2.0: refactored helpers
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
b85ecb848a files2.0: Use new type helpers
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
b10e718ab4 files2.0: no error from Entries
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
adc7490755 files2.0: updates for file type split
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
0618fd77be gx: update go-ipfs-files to 2.0
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-12-20 13:52:20 +01:00
90926ca5c7 gx: update go-ipfs-cmds
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-12 16:35:42 -08:00
9dcec2b3e2 gx: update go-libp2p-peer
Reverts the changes that allowed small keys (ed25519 keys) to be inlined.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-12-07 15:37:23 -08:00
cef645936d gx: update go-ipfs-config
* AutoRelay options for #5785.
* Badger truncate-by-default option for #5275, #5625.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-11-26 17:42:13 -08:00
0afbafdeaf cmds: use w.Write directly
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
2018-11-06 13:06:11 -08:00
2c48466630 commands: use EmitOnce for single object
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
2018-11-06 13:06:11 -08:00
b1efb997bf refactor(cmds): use new cmds lib in config
License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
2018-11-06 13:06:11 -08:00
0d80fc54c3 gx: update go-log and sha256
fixes #5709

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-11-02 21:17:20 -07:00
2b0bc7e084 configurable pubsub singing
I'd like to sneak this into the release so we can turn on strict verification
ASAP.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-26 04:00:44 -07:00
c97c3459be gx update
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-24 09:59:43 -07:00