ap-pauloafonso / ratio-spoof

A bittorrent ratio spoof tool
MIT License
90 stars 13 forks source link

Event field value #32

Open Deschain opened 5 months ago

Deschain commented 5 months ago

All announces are sent with the optional field "event" as "started" (except for the last packet which is sent with "event" as "stopped") and I think it is wrong.

According to the bittorrent protocol

event This is an optional key which maps to started, completed, or stopped (or empty, which is the same as not being present). If not present, this is one of the announcements done at regular intervals. An announcement using started is sent when a download first begins, and one using completed is sent when the download is complete. No completed is sent if the file was complete when started. Downloaders send an announcement using stopped when they cease downloading.

As I understand it the "event" "started" should be sent only once, when a download first begins. Afterwards, it should send the field event as empty or don't send it at all (if not completed or stopped).

I haven't checked if this is the behaviour of qBittorrent, though.