kubo/core/node
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
..
helpers style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
libp2p docs: fix typos 2023-09-22 11:08:26 +00:00
bitswap.go chore: migrate go-libipfs to boxo 2023-03-28 22:05:25 -04:00
builder.go refactor: stop using go-libp2p deprecated peer.ID.Pretty 2023-09-18 15:58:15 +02:00
core.go feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00
dns.go refactor: switch gateway code to new API from go-libipfs (#9681) 2023-03-30 13:20:37 +00:00
graphsync.go chore: migrate go-libipfs to boxo 2023-03-28 22:05:25 -04:00
groups.go style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
helpers.go fmt: applies go1.19 fmt 2022-09-08 18:34:06 +02:00
identity.go chore: bump go-libp2p v0.22.0 & go1.18&go1.19 2022-09-09 17:09:38 +02:00
ipns.go chore: migrate go-libipfs to boxo 2023-03-28 22:05:25 -04:00
peering.go chore: bump go-libp2p v0.22.0 & go1.18&go1.19 2022-09-09 17:09:38 +02:00
provider.go chore: remove outdated comment (#10077) 2023-08-17 05:45:45 +00:00
storage.go chore: migrate go-libipfs to boxo 2023-03-28 22:05:25 -04:00