Table of Contents
Event if the soft works out of the box, you can add your own torrent clients. Your need to catch HTTP request sent by your Torrent client. I personally use TCPCatcher as a proxy to sniff my network, or Wireshark if there is no proxy option in the BitTorrent client.
So, let's catch a start or stop HTTP announce for vuze-leap client:
GET /announce?info_hash=%04%03%fbG(%bdx%8f%bc%b6~%87%d6%fe%b2A%ef8%c7Z&peer_id=-LT1100--7VQ9*I9V!z9&port=6881&uploaded=0&downloaded=0&left=1593835520&corrupt=0&key=8C45B745&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
Host: torrent.ubuntu.com:6969
User-Agent: libtorrent_leap/1.1.1.0
Accept-Encoding: gzip
Connection: close
With such an HTTP request we can extract all needed data to create the .client file bellow. Keep in mind that it is recommended to restart BitTorrent client and catch multiple announce to ensure that keys and peerID type are correct.
Note that the Host
header is automatically set, you don't need to add it to the list of client header.
{
"peerIdInfo": {
"prefix": "-LT1100-",
"type": "random",
"upperCase": false,
"lowerCase": false
},
"keyInfo": {
"length": 8,
"type": "alphanumeric",
"upperCase": false,
"lowerCase": false
},
"query": "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&corrupt=0&key={key}&event={event}&numwant={numwant}&compact=1&no_peer_id=1&supportcrypto=1&redundant=0",
"numwant": 200,
"requestHeaders": [
{ "name": "User-Agent", "value":"libtorrent_leap/1.1.1.0" },
{ "name": "Connection", "value": "close" },
{ "name": "Accept-Encoding", "value":"gzip" }
]
}
-
peerIdInfo (required)
- prefix : The BitTorrentClient prefix (required)
- type : The type of the peer_id_suffix (required, supported types: alphabetic, alphanumeric, numeric, random, printable, hexadecimal)
- upperCase : Is the suffix uppercased? (optional, default=false)
- lowerCase : Is the suffix lowercased? (optional, default=false)
-
keyInfo (required only if query contains {key})
- length : Length of the key (required)
- type : The type of the peer_id_suffix (required, supported types: alphabetic, alphanumeric, numeric, random, printable, hexadecimal)
- upperCase : Is the suffix uppercased? (optional, default=false)
- lowerCase : Is the suffix lowercased? (optional, default=false)
-
query (required) : The BitTorrent client HTTP query string with variables
-
numwant (optional, default 50) : The BitTorrent numwant
-
requestHeaders (optional)
Query variables:
{peerid}
: BitTorrent client peerId (value from peerIdInfo){key}
: The key for the current session (value from keyInfo, optional if there is no key param in query string){numwant}
: BitTorrent client numwant (default is 50){infohash}
: Torrent file info_hash (auto-generated){uploaded}
: Total uploaded during this session (auto-generated){downloaded}
: Total downloaded during this session (auto-generated){left}
: Remaining to download for this torrent (auto-generated, and hardcoded to 0){port}
: Port you are listening on (auto-generated){ip}
: Local ip address (auto-generated){event}
: Event to be send to the tracker (auto-generated)
Header variables:
{os}
: The current os (auto-generated){java}
: The current running version of java (auto-generated)