Commit Graph

66 Commits

Author SHA1 Message Date
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
Adin Schmahmann
f2c43d5bbf feat(config): Add gateway-over-libp2p experiment 2023-09-01 16:52:09 -04:00
Adin Schmahmann
2a1d91f67a test(gateway): add harness tests for gateway over libp2p 2023-08-31 04:54:39 -04:00
Adin Schmahmann
fb5cacac86 test(harness): use SIGKILL to terminate daemons in Windows testing 2023-08-31 01:47:35 -04:00
Adin Schmahmann
a11c542408 test(harness): skip environment variables starting with = 2023-08-31 00:30:56 -04:00
Henrique Dias
4606586207
feat(gateway): expose /routing/v1 server (opt-in) (#9877) 2023-08-25 17:30:04 +02:00
Henrique Dias
1e5ce93659 fix: use %-encoded headers in most compatible way 2023-08-22 15:43:01 +02:00
Marcin Rataj
733b01a37b
fix(gw): useful IPIP-402 CARs on not found errors (#10084)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-08-18 06:54:08 +00:00
Amir Mohammad Fakhimi
ced348366c
feat: add zsh completions (#10040)
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-08-17 16:43:27 +02:00
Kay
f12b372af9
style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02: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
Jorropo
6be6630e4e libp2p: stop reporting ProtocolVersion 2023-07-26 14:48:19 +02:00
Henrique Dias
5156f21162
feat(ipns): records with V2-only signatures (#9932) 2023-06-20 14:24:31 +02:00
Arthur Gavazza
726eabead4
feat: add deduplication ratio to 'ipfs dag stat' (#9787) 2023-06-06 15:17:45 +02:00
Nikhilesh Susarla
6eef0b4eef
fix: 'ipfs routing findpeer' explicitly fails when searching for self (#9903) 2023-06-01 12:19:29 +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
Henrique Dias
e3126eb3e0
chore: upgrade boxo and fix test function signature (#9896) 2023-05-25 15:36:33 +02:00
Lucas Molas
63561f3baf
feat(bootstrap): save connected peers as backup bootstrap peers (#8856)
* feat(bootstrap): save connected peers as backup temporary bootstrap ones
* fix: do not add duplicated oldSavedPeers, not using tags, reuse
randomizeList
* test: add regression test
* chore: add changelog

---------

Co-authored-by: Henrique Dias <hacdias@gmail.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
2023-05-25 14:39:49 +02:00
Jorropo
da28fbc65a chore: use assert.NoError instead of assert.Nil for errors 2023-05-16 15:42:54 +02:00
Henrique Dias
65b8d530b0
test: add streaming delegated routing test (#9874) 2023-05-16 14:05:22 +02:00
Henrique Dias
13c379604f
fix(gateway): redirect /ipns/b58mh to /ipns/cidb36 (#9785) 2023-05-16 13:09:39 +02:00
Henrique Dias
0e7331c952
feat: update boxo with routing streaming 2023-05-10 08:14:48 +00:00
Henrique Dias
c178c51835
fix: deadlock on retrieving WebTransport addresses (#9857)
Co-authored-by: Marco Polo <git@marcopolo.io>
2023-05-08 16:11:03 +02:00
Gus Eggert
03a98280e3 test: port twonode test to Go, remove multinode test
The multinode test is effectively the same as the twonode test. There
are some problems with it too: it *looks* like it's testing the
Websocket transport with the "listentype,ws" IPTB attribute, but that
attribute doesn't actually exist in ipfs/iptb-plugins, so it does
nothing, so that test actually just runs the same test twice (Yamux
disabled). Furthermore, this is just the same test as in the mplex
twonode test. So this just removes the useless multinode test
entirely.

Also, this removes the part of the twonode test that checks the amount
of data transferred over Bitswap. This is an implementation detail of
Bitswap, it's not appropriate to test this in an end-to-end test as it
depends on algorithmic details of how Bitswap works, and has nothing
to do with transports. This is probably more appropriate as a perf or
benchmark test of Bitswap.

This also moves equivalent functionality from jbenet/go-random-files
into the testutils package. This just copies the code and modifies it
slightly for better ergonomics.
2023-04-10 14:57:15 -04:00
Gus Eggert
0e55ca9377 feat: add experimental optimistic provide
This adds the ability to enable "optimistic provide" to the default
DHT client, which enables faster provides and reprovides.

For more information about optimistic provide, see:

https://protocollabs.notion.site/Optimistic-Provide-2c79745820fa45649d48de038516b814

Note that this feature only works when using non-custom router
types. This does not include the ability to enable optimistic provide
on custom routers for now, to minimize the footprint of this
experimental feature. We intend on continuing to test this and improve
the UX, which may or may not involve adding configuration for it to
custom routers. We also plan on refactoring/redesigning custom routers
more broadly so I don't want this to add more effort for maintainers
and confusion for users.
2023-04-06 16:49:46 -04:00
Gus Eggert
1b3e4438fc
chore: upgrade OpenTelemetry dependencies (#9736) 2023-04-05 11:44:14 +00:00
Gus Eggert
fd830b3c1a
test: fix flaky content routing over HTTP test (#9772) 2023-04-05 11:10:32 +00:00
Henrique Dias
55587d8e41
feat!: make --empty-repo default (#9758)
Context:
https://github.com/ipfs/kubo/pull/9758#pullrequestreview-1366898875
2023-03-31 15:06:23 +02:00
Adin Schmahmann
353dd49be2
refactor: switch gateway code to new API from go-libipfs (#9681)
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Henrique Dias <hacdias@gmail.com>
2023-03-30 13:20:37 +00:00
Gus Eggert
a24cfb89a5
test: port remote pinning tests to Go (#9720)
This also means that rb-pinning-service-api is no longer required for
running remote pinning tests. This alone saves at least 3 minutes in
test runtime in CI because we don't need to checkout the repo, build
the Docker image, run it, etc.

Instead this implements a simple pinning service in Go that the test
runs in-process, with a callback that can be used to control the async
behavior of the pinning service (e.g. simulate work happening
asynchronously like transitioning from "queued" -> "pinning" ->
"pinned").

This also adds an environment variable to Kubo to control the MFS
remote pin polling interval, so that we don't have to wait 30 seconds
in the test for MFS changes to be repinned. This is purely for tests
so I don't think we should document this.

This entire test suite runs in around 2.5 sec on my laptop, compared to
the existing 3+ minutes in CI.
2023-03-30 07:46:35 -04:00
Arthur Gavazza
e89cce63fd
feat: add identify option to swarm peers command
Fixes #9578
2023-03-30 04:34:57 +00:00
Gus Eggert
9fb09dd398
test: port routing DHT tests to Go (#9709) 2023-03-29 19:28:55 -04:00
Gus Eggert
f4d361dd4e
test: fix autoclient flakiness (#9769)
The test trims all whitespace bytes from the output of 'ipfs cat' but
if the random bytes end in a whitespace char then it trims that too,
resulting in random test failure.

Instead this updates the test harness to only trim a single trailing
newline char, so that it doesn't end up chomping legitimate output.
2023-03-29 11:56:25 -04:00
Gus Eggert
4c49967d9c feat: add client-side metrics for routing-v1 client 2023-03-27 18:19:28 -04:00
Gus Eggert
60ba0b1821 test: increase max wait time for peering assertion
The peering test is flaky and fails waiting for peers to be connected
to each other, I don't know if this will fix it, but worth trying.
2023-03-27 23:32:04 +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
Henrique Dias
b975593920
feat(gateway): invalid CID returns 400 Bad Request (#9726) 2023-03-20 14:14:38 +01:00