Commit Graph

103 Commits

Author SHA1 Message Date
Marcin Rataj
2ab3f58c99
fix(config): wire up Provider.Enabled flag (#10804)
* fix(config): explicit Provider.Enabled flag

Adds missing config option described in
https://github.com/ipfs/kubo/issues/10803

* refactor: remove Experimental.StrategicProviding

removing experiment, replaced with Provider.Enabled

* test(cli): routing [re]provide

updated and added tests for manually triggering provide and reprovide
and making them respect global configuration flag to avoid
inconsistent behaviors

* docs: improve DelegatedRouters

* refactor: default DefaultProviderWorkerCount=16

- simplified default for both
- 16 is safer for non-accelerated DHT client
- acceletated DHT performs better without limit anyway - updated docs
2025-05-15 19:19:18 +02:00
Sergey Gorbunov
7c844bacea
feat(fuse): Expose MFS as FUSE mount point (#10781)
* Add MFS command line options, extend existing mount functions for MFS, set defaults.

* Directory listing and file stat.

* Add a read-only MFS view.

* Add mkdir and interface checks.

* Add remove and rename functionality.

* Implement all required write interfaces.

* Adjust mount  functions for other architechtures.

* Merge branch 'master' into feat/10710-mfs-fuse-mount

* Write a basic read/write test.

* Write more basic tests, add a mutex to the file object, fix modtime.

* Add a concurrency test, remove mutexes from file and directory structures.

* Refactor naming(mfdir -> mfsdir) and add documentation.

* Add CID retrieval through ipfs_cid xattr.

* Add docs, add xattr listing, fix bugs for mv and stat, refactor.

* Add MFS command line options, extend existing mount functions for MFS, set defaults.

* docs phrasing

* docs: Mounts.MFS

* docs: warn about lazy-loaded DAGs

* test: TEST_FUSE=1 ./t0030-mount.sh -v

---------

Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-05-06 21:55:53 +02:00
Hector Sanjuan
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
Hector Sanjuan
6b55e64918
feat(config): ipfs add and Import options for controling UnixFS DAG Width (#10774)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-04-15 22:56:38 +02:00
Andrew Gillis
095cc0d731
Nonfunctional (#10753)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
* fix typos
* fix func name in docstring
* use t.TempDir instead of os.MkdirTemp
* fix typo
* unique option names
2025-03-11 14:04:16 -07:00
Abhinav Prakash
e221e941c7
fix(mfs): basic UnixFS sanity checks in files cp (#10701)
Some checks are pending
CodeQL / codeql (push) Waiting to run
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
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
2025-03-05 20:40:33 +01:00
Marco Munizaga
baa94fcb2f
chore: update go-libp2p to v0.41.0 (#10733)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
https://github.com/libp2p/go-libp2p/releases/tag/v0.41.0

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2025-02-25 23:50:45 +01:00
Marcin Rataj
d6a5bc0b68
feat(AutoTLS): enabled by default with 1h RegistrationDelay (#10724)
Enables AutoTLS by default, but delays registration by 1h
if user did not explicitly set `AutoTLS.Enabled` to `true`
2025-02-25 22:25:58 +01:00
Andrew Gillis
8f07460ab3
Upgrade to go1.24 (#10726)
* Upgrade to go1.24
* fix test to look for new version info string
2025-02-24 14:46:20 -08:00
Sergey Gorbunov
b35555978d
feat: Better self-service commands for DHT providing (#10677)
* Add lastRun, NextRun, move reprovide cmd to routing.
* acceleratedDHT logic
* changelog
* depend on latest boxo

---------

Co-authored-by: guillaumemichel <guillaume@michel.id>
Co-authored-by: Guillaume Michel <guillaumemichel@users.noreply.github.com>
2025-01-31 16:33:11 +01:00
Marcin Rataj
256a739e3b
fix(autotls): renewal and AutoTLS.ShortAddrs (#10669)
Some checks are pending
CodeQL / codeql (push) Waiting to run
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
* fix(autotls): renewal and AutoTLS.ShortAddrs

updates to p2p-forge/client with fix from
https://github.com/ipshipyard/p2p-forge/pull/42

we also add AutoTLS.ShortAddrs flag and enable it by default
to benefit from shorter addrs discusses in
https://github.com/ipshipyard/p2p-forge/pull/40

* test: fix flaky NewRandPort

reducing chance of bind: address already in use
2025-01-22 17:26:15 +01:00
Marcin Rataj
3b098b969a
fix(cli): support HTTPS in ipfs --api (#10659)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
* fix(cli): support HTTPS in ipfs --api

Closes #10539

* chore: go-ipfs-cmds v0.14.1

https://github.com/ipfs/go-ipfs-cmds/releases/tag/v0.14.1

* docs: ipfs --api example

* test(cli): https rpc support

makes sure we dont have regression where HTTPS endpoint
starts getting cleartext requests
2025-01-10 22:34:56 +01:00
Andrew Gillis
7383e1ecbb
chore: fix typos and comment formatting (#10653)
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Build / docker-build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / go-test (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
* fix typos and comment formatting
2025-01-06 18:17:39 -08:00
Hector Sanjuan
02995d5d7d
tests(cli/harness): use unused Verbose flag to pipe daemon outputs (#10601)
Obtain actual daemon output on the screen while
debugging tests. 
Might be useful in the future even though it needs to
manually set verbose somewhere.
2024-11-27 19:35:15 +01:00
Hector Sanjuan
fb58b0ae85
tests/cli: fix flapping tests (#10600)
The issue is that for dht providing to work correctly, at least two nodes must
have dht routing.

Before, dht providing in the test always failed, but the test succeeded when
the tested-CID was the one that the failure happened with (the first in the
list for ProvideMany).
2024-11-26 19:19:07 +01:00
Hector Sanjuan
37c5060742
Update to boxo with refactored providerQueryManager. (#10595)
Some checks are pending
CodeQL / codeql (push) Waiting to run
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
2024-11-26 03:34:06 -08:00
gammazero
a5f4d0be02 Cleanup commented imports 2024-08-19 19:55:11 -07:00
Andrew Gillis
56abfc4911
Merge branch 'master' into uds-client 2024-08-19 19:05:35 -07:00
gammazero
893a94864a Add unit test for rpc over unix socket 2024-08-19 19:00:46 -07:00
Marcin Rataj
feef0851bd
feat: go-libp2p 0.36 and /webrtc-direct listener (#10463)
Co-authored-by: Marco Munizaga <git@marcopolo.io>
2024-08-06 21:25:27 +02:00
Marcin Rataj
749a61bae2
chore: update dependencies (#10462)(#10466)
* chore: go get -u
* fix(gateway): return 404 in no-fetch contexts (#10466)

applies and tests fix from https://github.com/ipfs/boxo/pull/630
2024-07-30 16:42:18 +02:00
Marcin Rataj
a07852a3f0
fix(cli): unify --name param in ls and add (#10439)
This is a cosmetic fix for bug found during testing 0.29.0-rc2.
pin add --name had shorthand -n
pin ls --name had no shorthand, and --names had -n

This unifies -n making it a shorthand for the same parameter in both
`pin ls` and `pin add`.
2024-06-06 22:19:23 +02:00
Henrique Dias
8022e13a6b
config: introduce Import section (#10421)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-05-14 14:17:04 +00:00
IGP
ae05085644
feat: enables searching pins by name (#10412)
Co-authored-by: Henrique Dias <mail@hacdias.com>
2024-05-14 11:05:35 +00:00
Henrique Dias
6f2a61e1df
core/node: prioritize announcing pin roots, and flat strategy (#10376)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-04-09 06:37:23 +00:00
Henrique Dias
11183bb2f5
chore: upgrade go-libp2p-kad-dht (#10378)
* chore: upgrade go-libp2p-kad-dht
* config: make LoopbackAddressesOnLanDHT a Flag
* config: add DefaultLoopbackAddressesOnLanDHT
* docs(config): Routing.LoopbackAddressesOnLanDHT

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2024-04-04 12:56:19 +00:00
occupyhabit
62eb143915
docs: fix some typos (#10377) 2024-03-25 09:59:47 +01:00
Henrique Dias
9047fed8d5
core/commands!: remove deprecated object APIs (#10375) 2024-03-22 09:32:30 +01:00
Henrique Dias
e22f47ae4b
core/corehttp!: remove /api/v0 from gateway port 2024-03-05 08:21:13 +00:00
Marcin Rataj
a01cc58c8d
test: cleanup content blocking tests (#10360) 2024-03-01 09:58:10 +01:00
Henrique Dias
1ef8f83a41
core/commands: remove 'ipfs dht' commands, except 'query' (#10328) 2024-02-07 09:56:30 +00:00
Henrique Dias
80973d87cc core: deprecate CoreAPI.Dht, introduce CoreAPI.Routing 2024-02-07 10:47:30 +01:00
Henrique Dias
dccbfcf6b5
refactor: superfluous namespace test redirects (#10322) 2024-02-06 09:23:16 +00:00
Marcin Rataj
c0d7da22a2
docs(cli): name inspect --verify (#10308)
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
2024-01-17 14:59:02 +00:00
Henrique Dias
8a421868f0 feat(pinning): allow for overwriting pin name 2024-01-09 10:25:35 +01:00
Henrique Dias
a8a6bbe929
feat: support optional pin names (#10261) 2024-01-04 14:25:06 +01:00
Henrique Dias
5c31db3a3d
commands: remove several deprecated commands
Removes the following commands: ipfs tar, ipfs urlstore, ipfs repo fsck, ipfs file ls, ipfs dns.
2023-12-12 18:21:52 +01:00
Jorropo
8c4bdd8556
fix: allow daemon to start correctly if the API is null (#10062) 2023-12-11 11:45:08 +01:00
Jorropo
6a51849c29 libp2p: remove mplex
Fixes: #10069
2023-11-22 08:06:39 +03: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
Adin Schmahmann
9371d18b53
fixes to routing put command (#10205)
* fix(commands): routing put command returns the IPNS ID rather than the host's ID

* fix(commands): routing put command errors with the allow-offline hint if the error is an offline error

* fix: test expects correct error message

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-11-08 01:07:10 -05:00
Henrique Dias
9f3251c1b0 feat: add WebRTC Direct support 2023-11-03 14:43:42 +01:00
Hector Sanjuan
a0f34b16dd
feat: built-in content blocking based on IPIP-383 (#10161)
Fixes #8492

This introduces "nopfs" as a preloaded plugin into Kubo
with support for denylists from https://github.com/ipfs/specs/pull/383

It automatically makes Kubo watch *.deny files found in:

- /etc/ipfs/denylists
- $XDG_CONFIG_HOME/ipfs/denylists
- $IPFS_PATH/denylists

* test: Gateway.NoFetch and GatewayOverLibp2p

adds missing tests for "no fetch" gateways one can expose,
in both cases the offline mode is done by passing custom
blockservice/exchange into path resolver, which means
global path resolver that has nopfs intercept is not used,
and the content blocking does not happen on these gateways.

* fix: use offline path resolvers where appropriate

this fixes the problem described in
https://github.com/ipfs/kubo/pull/10161#issuecomment-1782175955
by adding explicit offline path resolvers that are backed
by offline exchange, and using them in NoFetch gateways
instead of the default online ones

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-10-28 05:34:14 +02:00
Henrique Dias
4695fd9fed
refactor: namesys cleanup, gateway /ipns/ ttl (#10115) 2023-10-18 10:23:50 +02:00
Henrique Dias
170686b420
chore: update types to match boxos (#10179) 2023-10-17 19:02:26 +02:00
Henrique Dias
a7c6518497
feat: path consolidation (#10063) 2023-10-06 16:14:44 +02:00
Henrique Dias
97527472fe
feat(gateway): update gateway api, no multi-range support 2023-10-02 16:43:52 +02:00
Jorropo
551b36b83f chore: update go-libp2p-kad-dht 2023-09-21 20:14:21 +02:00
Henrique Dias
0bac56c3aa
feat: add Gateway.DisableHTMLErrors option (#10137) 2023-09-21 15:03:17 +00:00