cabal-client icon indicating copy to clipboard operation
cabal-client copied to clipboard

network blocking

Open ghost opened this issue 5 years ago • 4 comments

This patch uses the swarm opts.verify hook and cabal.removeConnection() to implement network-level blocking of peers. This is only part of what we'll need for a full implementation of blocking since you can still get the content from blocked peers via other peers. I also had to make some room in the command-handling to support blocks as well as other arbitrary flags. Before these changes any flags that weren't hide/unhide wouldn't show up correctly.

depends on https://github.com/cabal-club/cabal-core/pull/96

ghost avatar Jul 05 '20 04:07 ghost

this is really dope :3

looks like it is missing logic to show messages on clients when e.g. someone i trust (mod/admin) has blocked someone, see the existing logic for (un)hide/mod/admin https://github.com/cabal-club/cabal-client/blob/ee626cd2bc667ef191e94044b6021465d36bac17/src/cabal-details.js#L717-L764

cblgh avatar Jul 05 '20 07:07 cblgh

Woo! Network-level blocking!

Does this also undownload the blocked peer's feed? Such as in the case of an illegal number attack, spamming, etc.

garbados avatar Jul 05 '20 19:07 garbados

This patch doesn't yet delete the remote feed and refuse to replicate it again. That is the second part of implementing this feature fully which will require some changes upstream in multifeed.

ghost avatar Jul 05 '20 19:07 ghost

Noted, thanks :+1:

garbados avatar Jul 05 '20 20:07 garbados