kubo/plugin/plugins
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
..
badgerds style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
dagjose style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
flatfs style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
fxtest feat: add fx options plugin 2022-08-12 17:04:29 -04:00
git style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
levelds style: gofumpt and godot [skip changelog] (#10081) 2023-08-17 14:02:08 +02:00
nopfs feat: built-in content blocking based on IPIP-383 (#10161) 2023-10-28 05:34:14 +02:00
peerlog refactor: stop using go-libp2p deprecated peer.ID.Pretty 2023-09-18 15:58:15 +02:00
.gitignore plugin: make the plugin preload work again 2017-07-13 21:16:04 +02:00
gen_main.sh Fix typos and cleanup 2020-04-20 22:00:01 +03:00
Rules.mk Update Go version to 1.17 (#8815) 2022-04-15 14:32:00 -04:00