What is the "source" field used for? #19406
Replies: 3 comments
-
@Kimbatt has pointed me to the solution here: Kimbatt/torrent-creator#10 (comment). |
Beta Was this translation helpful? Give feedback.
-
I'm going to try to reply to my question, but It might be inexact because I have not found confirmations from high-reputation sources with a good detailed explanation. The best explanation I've found so far it's this one by @2wicked:
DefinitionsTo remove the ambiguity, I will define a couple of terms:
More about cross-seeding (by https://www.perplexity.ai/)Cross-seeding in BitTorrent refers to the practice of using the same downloaded content to seed multiple torrents from different trackers or torrent sites. It allows users to share the same file across different torrent communities, maximizing the availability and distribution of the content. When cross-seeding, you typically download a torrent file from one tracker and then use that downloaded content to seed the same file on another tracker. This process helps to increase the number of seeders for a particular torrent, improving download speeds and availability for other users. Cross-seeding can be beneficial in several ways:
It's important to note that cross-seeding should be done within the rules and guidelines of each tracker. Some trackers may have specific rules regarding cross-seeding, so it's essential to familiarize yourself with the policies of each tracker before engaging in cross-seeding activities. Source file in the info dictionaryAn example torrent in a json format could be like this: {
"announce": "http://localhost",
"comment": "Comments",
"created by": "qBittorrent v4.4.1",
"creation date": 1690882922,
"info": {
"length": 172204,
"name": "mandelbrot_2048x2048.png",
"piece length": 16384,
"pieces": "<hex>7D 91 71 0D 9D 4D BA 88 9B 54 20 54 D5 26 72 8D 5A 86 3F E1 21 DF 77 C7 F7 BB 6C 77 96 21 66 25 38 C5 D9 CD AB 8B 08 EF 8C 24 9B B2 F5 C4 CD 2A DF 0B C0 0C F0 AD DF 72 90 E5 B6 41 4C 23 6C 47 9B 8E 9F 46 AA 0C 0D 8E D1 97 FF EE 68 8B 5F 34 A3 87 D7 71 C5 A6 F9 8E 2E A6 31 7C BD F0 F9 E2 23 F9 CC 80 AF 54 00 04 F9 85 69 1C 77 89 C1 76 4E D6 AA BF 61 A6 C2 80 99 AB B6 5F 60 2F 40 A8 25 BE 32 A3 3D 9D 07 0C 79 68 98 D4 9D 63 49 AF 20 58 66 26 6F 98 6B 6D 32 34 CD 7D 08 15 5E 1A D0 00 09 57 AB 30 3B 20 60 C1 DC 12 87 D6 F3 E7 45 4F 70 67 09 36 31 55 F2 20 F6 6C A5 15 6F 2C 89 95 69 16 53 81 7D 31 F1 B6 BD 37 42 CC 11 0B B2 FC 2B 49 A5 85 B6 FC 76 74 44 93</hex>",
"private": 1,
"source": "Source"
},
"url-list": "http://localhost/mandelbrot_2048x2048.png"
} The {
"length": 172204,
"name": "mandelbrot_2048x2048.png",
"piece length": 16384,
"pieces": "<hex>7D 91 71 0D 9D 4D BA 88 9B 54 20 54 D5 26 72 8D 5A 86 3F E1 21 DF 77 C7 F7 BB 6C 77 96 21 66 25 38 C5 D9 CD AB 8B 08 EF 8C 24 9B B2 F5 C4 CD 2A DF 0B C0 0C F0 AD DF 72 90 E5 B6 41 4C 23 6C 47 9B 8E 9F 46 AA 0C 0D 8E D1 97 FF EE 68 8B 5F 34 A3 87 D7 71 C5 A6 F9 8E 2E A6 31 7C BD F0 F9 E2 23 F9 CC 80 AF 54 00 04 F9 85 69 1C 77 89 C1 76 4E D6 AA BF 61 A6 C2 80 99 AB B6 5F 60 2F 40 A8 25 BE 32 A3 3D 9D 07 0C 79 68 98 D4 9D 63 49 AF 20 58 66 26 6F 98 6B 6D 32 34 CD 7D 08 15 5E 1A D0 00 09 57 AB 30 3B 20 60 C1 DC 12 87 D6 F3 E7 45 4F 70 67 09 36 31 55 F2 20 F6 6C A5 15 6F 2C 89 95 69 16 53 81 7D 31 F1 B6 BD 37 42 CC 11 0B B2 FC 2B 49 A5 85 B6 FC 76 74 44 93</hex>",
"private": 1,
"source": "Source"
} Notice that some fields are common for single-file and multi-file torrents, but other files are exclusive. Some are also optional. In the Torrust Tracker, we are using this struct for the torrent info dictionary: pub struct TorrentInfo {
pub name: String,
pub pieces: Option<ByteBuf>,
pub piece_length: i64,
pub md5sum: Option<String>, // single-file
pub length: Option<i64>, // single-file
pub files: Option<Vec<TorrentFile>>, // multi-file
pub private: Option<u8>,
pub path: Option<Vec<String>>, // ???
pub root_hash: Option<String>, // BiTorrent specification v2 (BEP 52)
pub source: Option<String>,
} More info about the info dictionary:
The torrent info-hash is the sha1 hash of the info dictionary in encoded format.
Since the Why was the
|
Beta Was this translation helpful? Give feedback.
-
yes, you are right. Source will become |
Beta Was this translation helpful? Give feedback.
-
I do not know what it is used for and I do not find official documentation about that field.
The field is included in the "info" dictionary, so it's included when calculating the torrent infohash.
Sample torrent:
Some BitTorrent clients include it (qBitorrent or this online torrent generator https://kimbatt.github.io/torrent-creator/), but others don't.
I have not found any BEP about it yet.
Beta Was this translation helpful? Give feedback.
All reactions