kubo/core
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
..
bootstrap perf: make bootstrap saves O(N) 2023-09-21 20:14:21 +02:00
commands feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00
coreapi refactor: namesys cleanup, gateway /ipns/ ttl (#10115) 2023-10-18 10:23:50 +02:00
corehttp feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00
corerepo chore: migrate go-libipfs to boxo 2023-03-28 22:05:25 -04:00
coreunix feat: path consolidation (#10063) 2023-10-06 16:14:44 +02:00
mock fix: deadlock on retrieving WebTransport addresses (#9857) 2023-05-08 16:11:03 +02:00
node feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00
.gitignore ignore testdb 2014-07-05 15:04:04 -07:00
builder.go fix: silence staticcheck warning for fx.Extract usage 2022-12-12 03:47:17 +01:00
core_test.go chore: update boxo, go-libp2p, and internalize mplex (#10095) 2023-08-24 06:11:02 +00:00
core.go feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00