transmission icon indicating copy to clipboard operation
transmission copied to clipboard

fix: limit number of bad pieces to accept from a webseed

Open tearfur opened this issue 1 year ago • 5 comments

Fixes #267.

Notes: Limit the number of bad pieces to accept from a webseed before banning it.

tearfur avatar May 31 '24 01:05 tearfur

Anybody know of a webseed I can test this PR with? The webseeds provided by the issue either isn't working anymore, or is not corrupt.

tearfur avatar May 31 '24 02:05 tearfur

Anybody know of a webseed I can test this PR with? The webseeds provided by the issue either isn't working anymore, or is not corrupt.

Arch uses webseeds. https://archlinux.org/releng/releases/

Pentaphon avatar May 31 '24 08:05 Pentaphon

It has to be webseeds that distribute corrupt data.

tearfur avatar May 31 '24 10:05 tearfur

@tearfur probably the best way to do this reliably is to do it locally, e.g. with a local webserver and a torrent with a localhost webseed. Then after creating the .torrent file, overwrite all the file contents with bad data and serve it up on the local webserver.

ckerr avatar Jun 01 '24 23:06 ckerr

Finished testing, looks to be working as intended.

[2024-06-12 07:24:04.768] trc test.dat increasing peer localhost:80 strike count to 1 (peer-mgr.cc:646)
[2024-06-12 07:24:04.768] trc test.dat increasing peer localhost:80 strike count to 2 (peer-mgr.cc:646)
[2024-06-12 07:24:04.768] trc test.dat increasing peer localhost:80 strike count to 3 (peer-mgr.cc:646)
[2024-06-12 07:24:04.768] trc test.dat increasing peer localhost:80 strike count to 4 (peer-mgr.cc:646)
[2024-06-12 07:24:04.768] trc test.dat increasing peer localhost:80 strike count to 5 (peer-mgr.cc:646)
[2024-06-12 07:24:04.768] trc test.dat banning peer localhost:80 (peer-mgr.cc:651)

tearfur avatar Jun 12 '24 07:06 tearfur