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

70 Commits

Author SHA1 Message Date
b5d73695ba feat: opt-in http retrieval client (#10772)
* Feat: http retrieval as experimental feature

This introduces the http-retrieval capability as an experimental feature.

It can be enabled in the configuration `Experimental.HTTPRetrieval.Enabled = true`.

Documentation and changelog to be added later.

* refactor: HTTPRetrieval.Enabled as Flag

* docs(config): HTTPRetrieval section

* refactor: reusable MockHTTPContentRouter

* feat: HTTPRetrieval.TLSInsecureSkipVerify

allows self-signed certificates in tests

* feat(config): HTTPRetrieval.MaxBlockSize

* test: end-to-end HTTPRetrieval.Enabled

this spawns two http services on localhost:
1. HTTP router that returns HTTP provider when /routing/v1/providers/cid  i queried
2. HTTP provider that returns a block when /ipfs/cid is queried
3. Configures Kubo to use (1) instead of cid.contact

this seems to work (running test with DEBUG=true shows (1) was queried
for the test CID and returned multiaddr of (2), but Kubo never requested
test CID block from (2) – needs investigation

* fix: enable /routing/v1/peers for non-cid.contact

we artificially limited every delegated routing endpoint because of
cid.contact being limited to one endpoint

* feat: Routing.DelegatedRouters

make it easy to override the hardcoded implicit HTTP routeur URL
without having to set the entire custom Router.Routers and
Router.Methods

(http_retrieval_client_test.go still needs to be fixed in future commit)

* test: flag remaining work

* docs: review feedback

* refactor: providerQueryMgr with bitswapNetworks

this fixes two regressions:

(1) introduced in https://github.com/ipfs/kubo/issues/10717
    where we only used bitswapLib2p query manager
    (this is why E2E did not act on http provider)

(2) introduced in https://github.com/ipfs/kubo/pull/10765
    where it was not possible to set binary peerID in IgnoreProviders
    (we changed to []string)

* refactor: Bitswap.Libp2pEnabled

replaces Bitswap.Enabled with Bitswap.Libp2pEnabled
adds tests that confirm it is possible to disable libp2p bitswap fully
and only keep http in client mode

also, removes the need for passing empty blockstore in client-only mode

* docs: changelog

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-05-06 19:06:40 +02:00
IGP
e8ff2d59de feat(config): ability to disable Bitswap fully or just server (#10782)
* feat: add Bitswap configuration and related tests
* fix: update Bitswap function to use 'provide' parameter for server enablement
* docs: update changelog for Bitswap functionality changes
* fix: update Bitswap server enablement logic and improve related tests
* fix: rename BitswapConfig to Bitswap and update references
* docs: config and changelog
* fix: `ipfs cat` panic when `Bitswap.Enabled=false`

Fixes panic described in:
https://github.com/ipfs/kubo/pull/10782#discussion_r2069116219

---------

Co-authored-by: gystemd <gystemd@gmail.com>
Co-authored-by: gammazero <11790789+gammazero@users.noreply.github.com>
Co-authored-by: Giulio Piva <giulio.piva@dedicated.world>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-30 22:23:51 +02:00
032ceaf5d1 fix: Issue #9364 JSON config validation (#10679)
* Fix JSON config validation
* updated ReflectToMap

---------

Co-authored-by: galargh <piotr.galar@gmail.com>
Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
Co-authored-by: guillaumemichel <guillaume@michel.id>
2025-02-04 17:26:36 +01:00
4009ad3e5a chore: stop using go-homedir (#10568)
* chore: stop using go-homedir

The `github.com/mitchellh/go-homedir` repo is archived, no longer needed, and no longer maintained.

- `homedir.Dir` is replaced by the stdlib `os.UserHomeDir`
- `homedir.Expand` is replaced by fsutil.ExpandHome` in the `github.com/ipfs/kubo/misc/fsutil` package.

Additional functionality, such as `DirWritable` and `FileExists` was moved into or included in the `github.com/ipfs/kubo/misc/fsutil` package.
2024-11-05 07:45:11 -08:00
3134fd246e feat(AutoTLS): opt-in WSS certs from p2p-forge at libp2p.direct (#10521)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-10-29 22:37:33 +01:00
225dbe6c03 feat: periodic version check and json config (#10438)
Co-authored-by: Lucas Molas <schomatis@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-07-24 23:42:19 +02:00
8022e13a6b config: introduce Import section (#10421)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-05-14 14:17:04 +00:00
Kay
2b7c20fc66 refactor: using error is instead of == (#10093) 2023-08-22 14:53:29 +00:00
Kay
f12b372af9 style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
f2a6c4f764 fix: correctly handle migration of configs
readPluginsConfig was copied from ReadMigrationConfig and switched
erroring fields to a bool so it can be omitemptied.
2023-06-27 16:32:06 +02:00
82fbb84384 fmt: applies go1.19 fmt 2022-09-08 18:34:06 +02:00
6817fd4744 feat(cmds): allow to set the configuration file path 2022-04-22 13:03:28 -03:00
44291176e6 go-ipfs-config: feat: add Internal and Internal.Bitswap config options 2021-08-18 08:14:25 -04:00
67456e2e64 go-ipfs-config: Add config for downloading repo migrations 2021-04-16 17:35:34 -07:00
c932e6b700 go-ipfs-config: add default empty config for DNS, rename struct from DNSConfig to DNS 2021-04-14 18:46:35 +03:00
8a8b161da4 go-ipfs-config: add custom DNS Resolver configuration 2021-04-12 13:53:19 +03:00
06fe967955 go-ipfs-config: add remote pinning services config 2020-12-05 17:21:55 -05:00
13bcc4da44 go-ipfs-config: feat: add peering service config section 2020-05-25 14:05:24 -07:00
4554fc9246 go-ipfs-config: feat: add an autonat config section
And remove the current EnableAutoNATService option from the swarm config. While
a breaking change, this shouldn't cause _too_ much trouble given that we're
going to enable AutoNAT everywhere by default anyways.
2020-04-14 19:05:01 -07:00
a04a858922 go-ipfs-config: add plugins config section
* Allow users to store plugin specific config options.
* Allow users to disable specific plugins.

Eventually, we can use this to allow loading plugins from non-standard locations.
2019-08-29 10:15:31 -07:00
86abf1fc57 go-ipfs-config: Fix bad go fmt 2019-06-27 12:52:23 -07:00
f61d052ce1 go-ipfs-config: Add very basic (possibly temporary) Provider configs 2019-06-27 12:20:44 -07:00
b627585f28 go-ipfs-config: add a Clone function
The user must call this before modifying the config. Given that the config
contains slices/maps modifications can modified *shared* state, even after
dereferencing.
2018-12-13 16:03:26 -08:00
212b72f236 go-ipfs-config: add pubsub configuration 2018-08-12 14:16:38 +03:00
757f25d4b1 go-ipfs-config: gx-go uw 2018-07-23 16:13:00 +02:00
d67080f478 go-ipfs-config: Setup gx 2018-07-23 16:12:26 +02:00
af1fc17657 go-ipfs-config: fix error style
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-30 09:43:27 +02:00
88d7dfec2f go-ipfs-config: config: apply review to lowpower profile
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-24 16:11:42 +01:00
842d0d3248 go-ipfs-config: remove the rest of the supernode code
missed in the initial cleanup

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-10-14 16:43:30 -07:00
2f2b1fbcd7 go-ipfs-config: Removed tour command and fix test
License: MIT
Signed-off-by: Sherod Taylor <sherodtaylor@gmail.com>
2017-08-09 10:14:57 -04:00
9e050b1526 go-ipfs-config: apply the megacheck tool to improve code quality
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-05-31 16:56:11 -04:00
f1cb6feeb5 go-ipfs-config: Implement basic filestore 'no-copy' functionality
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2017-03-06 00:37:24 -08:00
ed67b7bf9a go-ipfs-config: Changed so only explicit ipfs cli commands are lowercased
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-10-27 22:55:13 -07:00
16dd9472bd go-ipfs-config: update deps for libp2p 3.4.0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-25 19:02:55 -07:00
f5e4f1861c go-ipfs-config: reprovider: add config option to set reprovide interval
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-19 16:52:03 -07:00
c36294a933 go-ipfs-config: Update go-log in whole dependency tree (#2898)
* Update golog in go-ipfs

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-secio for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-crypto for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-peer for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Import peersore, it wasn't imported

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peerstore

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peer

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update secio

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-24 09:38:07 -07:00
c82b581650 go-ipfs-config: Update go-log
https://github.com/ipfs/go-log/pull/3

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-09 23:37:09 +02:00
641003089b go-ipfs-config: Update go-log to 1.1.0 and fix calls to go-log.Uuid
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2016-05-04 23:17:21 +02:00
46e32373f0 go-ipfs-config: clean up dead code and config fields
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-08 13:11:30 -07:00
a7c4694354 go-ipfs-config: Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
389545c750 go-ipfs-config: correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
ac586580ba go-ipfs-config: initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
3f419cc599 go-ipfs-config: Implement pluggable Datastore types, with nothing implemented yet
License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
2016-01-12 08:22:55 -08:00
1f3ad37541 go-ipfs-config: Remove Config file section "Datastore", it's not used
This gives us a clean slate for the new code, avoiding leftovers.

License: MIT
Signed-off-by: Tommi Virtanen <tv@eagain.net>
2016-01-12 08:22:55 -08:00
7c4736abac go-ipfs-config: Merge pull request #1959 from ipfs/remove-log-config
repo: remove Log config
2015-11-16 11:32:54 -05:00
5ed0af6438 go-ipfs-config: repo: remove Log config
We stopped logging to files in a676b5a8ac2848a57318283f4b2b52d7d8686323
and this config section was missed.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-11-11 18:32:24 +01:00
1e4bd88117 go-ipfs-config: vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
b6d1a3f6ee go-ipfs-config: update code to use new logging changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-27 11:04:56 -07:00
f6c74ee68b go-ipfs-config: replace imports with absolute path instead of using symlink
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-03 14:30:50 -07:00
4f6eb40056 go-ipfs-config: Implement ipns republisher
This commit adds a very basic process that will periodically go through
a list of given ids and republish the values for their ipns entries.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-29 09:47:47 -07:00