PDA

View Full Version : Transmission



anthony-joal
10.08.17, 19:02
Please before reading this thread, read Client file format (https://www.sb-innovation.de/f275/announce-parameters-url-headers-33455/).

Since BitTorrent clients are updated regularly, i'll post the default file template for Transmision. And will list any changes for a particular version against this default template.

Default template


{
"keyGenerator": {
"type": "digit_range_transformed_to_hex",
"randomDigitLowerBound": 1,
"randomDigitUpperBound": 2147483647,
"refreshOn": "NEVER",
"case": "lower",
},
"peerIdGenerator": {
"pattern": "xxxxxxxxxxxxxxxxxxxxxxx",
"refreshOn": "TORRENT_VOLATILE",
"shouldUrlEncode": false
},
"urlEncoder": {
"encodingExclusionPattern": "[A-Za-z0-9-]",
"encodedHexCase": "lower"
},
"query": "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&numwant={numwant}&key={key}&compact=1&supportcrypto=1&event={event}&ipv6={ipv6}",
"numwant": 80,
"numwantOnStop": 0,
"requestHeaders": [
{ "name": "Host", "value": "xxxxx"},
{ "name": "User-Agent", "value": "xxxxxxxxxxxxxxxxxxxxx" },
{ "name": "Accept", "value": "*/*" },
{ "name": "Accept-Encoding", "value": "gzip;q=1.0, deflate, identity" }
]
}



3.00
peerIdGenerator.pattern: -TR3000-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/3.00
requestHeaders.Accept-Encoding: deflate, gzip

2.94
peerIdGenerator.pattern: -TR2940-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/2.94

2.93
peerIdGenerator.pattern: -TR2930-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/2.93

2.92_14714
peerIdGenerator.pattern: -TR284Z-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/2.84+

anthony-joal
13.08.17, 16:04
Updated file format to a more readable one.

anthony-joal
18.03.18, 01:05
Added transmission 2.93

anthony-joal
09.12.18, 12:48
The key definition has been updated, as it was not a simple HASH.

anon
10.12.18, 23:08
"type": "digit_range_transformed_to_hex",


digit_range_transformed_to_hex: A random digit that is transmited as it's hexadecimal representation, without leading zeroes.

Interesting quirk, I'll have to keep it in mind for future client files.

anon
05.06.20, 16:40
3.00
peerIdGenerator.pattern: -TR3000-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/3.00
requestHeaders.Accept-Encoding: deflate, gzip

Based on the following build.


https://github.com/transmission/transmission-releases/raw/master/transmission-3.00-x64.msi

Also, this one attempted to GET a favicon.ico from the tracker, something previous versions did not do. I couldn't find a setting to control that behavior.

anthony-joal
05.06.20, 17:31
3.00
peerIdGenerator.pattern: -TR3000-[a-z0-9]{12}
requestHeaders.User-Agent: Transmission/3.00
requestHeaders.Accept-Encoding: deflate, gzip

Based on the following build.


https://github.com/transmission/transmission-releases/raw/master/transmission-3.00-x64.msi

Also, this one attempted to GET a favicon.ico from the tracker, something previous versions did not do. I couldn't find a setting to control that behavior.

i've edited the original post to include your addition :). Thanks.


The favicon seems a bit more tricky and kinda pain in the ass. Based on the source code they seems to query the favicon from the tracker (most likely to print the favicon next to the tracker in the UI).
https://github.com/transmission/transmission/blob/2ef07517b65e98c0c68bbff0ca2467434a1835d2/gtk/favicon.h

More than that, the favicon query frequency will be erratic since they use a local file system cache...
The cache key seems to be the tracker domain name.

I won't bother implementing such a nightmare just for one client ^^. i would reconsider if it was part of libtorrent, but...

anon
05.06.20, 19:48
I agree that it's not a big deal, especially if we consider that like Deluge, Transmission has several interfaces available (cli, Web, gtk, qt plus other third-party ones) that may not implement this feature.

sharktachi
31.08.23, 18:18
Any update or guide to create a Transmission 4.0.3 client file for JOAL?

I would like to learn how to update it by myself.

sharktachi
11.09.23, 17:26
I agree that it's not a big deal, especially if we consider that like Deluge, Transmission has several interfaces available (cli, Web, gtk, qt plus other third-party ones) that may not implement this feature.

Does this client structure look good to you? For Transmission 4.0.4, I took 3.0.0 structure as a reference:


{
"keyGenerator": {
"algorithm": {
"type": "DIGIT_RANGE_TRANSFORMED_TO_HEX_WITHOUT_LEADING_ZER OES",
"inclusiveLowerBound": 1,
"inclusiveUpperBound": 2147483647
},
"refreshOn": "NEVER",
"keyCase": "lower"
},
"peerIdGenerator": {
"algorithm": {
"type": "RANDOM_POOL_WITH_CHECKSUM",
"prefix": "-TR4040-",
"charactersPool": "0123456789abcdefghijklmnopqrstuvwxyz",
"base": 36
},
"refreshOn": "TORRENT_VOLATILE",
"shouldUrlEncode": false
},
"urlEncoder": {
"encodingExclusionPattern": "[A-Za-z0-9-]",
"encodedHexCase": "lower"
},
"query": "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&numwant={numwant}&key={key}&compact=1&supportcrypto=1&event={event}&ipv6={ipv6}",
"numwant": 80,
"numwantOnStop": 0,
"requestHeaders": [
{ "name": "User-Agent", "value": "Transmission/4.04" },
{ "name": "Accept", "value": "*/*" },
{ "name": "Accept-Encoding", "value": "deflate, gzip" }
]
}

Thanks in advance.

anon
12.09.23, 07:55
Does this client structure look good to you?

Due to the idiosyncrasies of building Transmission, verifying this requires capturing announces from the exact build and commit you're writing for, then comparing. We have tutorials for that; the remote memory reader in RM+ will be very helpful if this is a NAS client.

But I can at least tell you right here and now that the key is of type hash with length 8 as of Transmission 4.x.

sharktachi
12.09.23, 10:45
Due to the idiosyncrasies of building Transmission, verifying this requires capturing announces from the exact build and commit you're writing for, then comparing. We have tutorials for that; the remote memory reader in RM+ will be very helpful if this is a NAS client.

But I can at least tell you right here and now that the key is of type hash with length 8 as of Transmission 4.x.

Thank you so much for the info, now I have a starting point. I will look for the tutorial and try to emulate the announces.

sharktachi
14.09.23, 00:12
Due to the idiosyncrasies of building Transmission, verifying this requires capturing announces from the exact build and commit you're writing for, then comparing. We have tutorials for that; the remote memory reader in RM+ will be very helpful if this is a NAS client.

But I can at least tell you right here and now that the key is of type hash with length 8 as of Transmission 4.x.

I captured the traffic through WireShark+Npcap on port 58103/tcp using Transmission 4.0.4 running a private torrent on your LocalTracker workaround.

I got this announces, they all seem to have the same structure, I only copy the first two:


1100 68.488358 127.0.0.1 127.0.0.1 HTTP 367 GET /announce?info_hash=%7C%7D%1B%B7tt6%01%A3%3Ak%1D%1C %02%9B%B9%00%01%FE%A8&peer_id=-TR4040-2m9pimsnms89&port=49153&uploaded=0&downloaded=0&left=1&numwant=0&key=3E7889A1&compact=1&supportcrypto=1&event=stopped HTTP/1.1


510 36.061857 127.0.0.1 127.0.0.1 HTTP 368 GET /announce?info_hash=%7C%7D%1B%B7tt6%01%A3%3Ak%1D%1C %02%9B%B9%00%01%FE%A8&peer_id=-TR4040-2m9pimsnms89&port=49153&uploaded=0&downloaded=0&left=1&numwant=80&key=3E7889A1&compact=1&supportcrypto=1&event=started HTTP/1.1

anon
14.09.23, 09:09
Nice, but you should compare the entire requests (not just the GET line), and restart different torrents and also the client itself to check peer_id and key regeneration behavior.