#4908 closed Bug (fixed)
Handle UDP scrapes when they don't follow the /announce idiom
Reported by: | rb07 | Owned by: | jordan |
---|---|---|---|
Priority: | Low | Milestone: | 2.60 |
Component: | libtransmission | Version: | 2.51 |
Severity: | Minor | Keywords: | tracker UDP scrape |
Cc: |
Description
When the tracker is an UDP tracker the scrape is never made.
Simple fix attached.
Attachments (3)
Change History (12)
Changed 10 years ago by rb07
comment:1 follow-up: ↓ 2 Changed 10 years ago by jordan
rb07, could you explain this patch a little bit?
So, for example a sample linux torrent I've got has this announce URL:
udp://tracker.openbittorrent.com:80/announce
and it looks to me like that will be correctly converted in the existing tr_convertAnnounceToScrape() code. What's the case that you're seeing that the current code isn't handling?
comment:2 in reply to: ↑ 1 Changed 10 years ago by rb07
Replying to jordan:
So, for example a sample linux torrent I've got has this announce URL:
udp://tracker.openbittorrent.com:80/announce
and it looks to me like that will be correctly converted in the existing tr_convertAnnounceToScrape() code.
Agree.
What's the case that you're seeing that the current code isn't handling?
Most UDP trackers don't have an 'announce', this patch fixes that since tr_tracker_udp_announce() already handles the action (which is a parameter on the request, not an URL).
Example UDP trackers (copied from one torrent):
udp://tracker.openbittorrent.com:80/ udp://tracker.publicbt.com:80 udp://tracker.ccc.de:80 udp://tracker.istole.it:80
If you like I can show a "before & after" screen shot. The before shows those trackers forever "Queued to ask for peer counts", the after shows successful scrapes.
comment:3 Changed 10 years ago by livings124
Is this specified in the bittorrent spec anywhere?
comment:4 Changed 10 years ago by rb07
No, I found it specified here: http://xbtt.sourceforge.net/udp_tracker_protocol.html, and probably somewhere else.
And it was already implemented in libtransmission, except that announce.c's tierNeedsToScrape() always returns false in this case (no 'announce' in the URL) since tr_convertAnnounceToScrape() return NULL; my fix just changes that with the valid UDP URL (which is the same as the announce URL).
comment:5 Changed 10 years ago by rb07
BTW Livings, how does Transmission in Mac OSX get the scrape info on http URLs that don't have the 'announce' string?
Sorry for the off-topic, but I've been trying to solve this other minor bug/annoyance. Similar to this case, but somebody showed me a screenshot of Transmission-Mac showing the seeders and leechers stats. He also said that this could have changed on newer versions, he's using an old one (2.33 I think).
comment:6 follow-up: ↓ 8 Changed 10 years ago by jordan
- Milestone changed from None Set to 2.53
- Status changed from new to assigned
- Summary changed from Fix UDP scrape to Handle UDP scrapes even when they don't follow the "/announce" idiom
I don't see that this is spec'ed anywhere, but after testing a pile of .torrent files I do see thee udp-without-/announce idiom used in maybe 20% of them.
comment:7 Changed 10 years ago by jordan
- Resolution set to fixed
- Status changed from assigned to closed
- Summary changed from Handle UDP scrapes even when they don't follow the "/announce" idiom to Handle UDP scrapes when they don't follow the /announce idiom
Fixed in r13311
comment:8 in reply to: ↑ 6 Changed 10 years ago by rb07
Replying to jordan:
I don't see that this is spec'ed anywhere, but after testing a pile of .torrent files I do see thee udp-without-/announce idiom used in maybe 20% of them.
The xbtt page I showed does have the "scrape"-less URL definition at the top.
Since the UDP scrape protocol is binary, what sense does it make to have the "announce" string in the URL? i.e. there is no http GET. So it must be just for show on those 80%.
comment:9 Changed 10 years ago by livings124
- Milestone changed from 2.53 to 2.60
Enables scrape with UDP trackers.