(Note: this will not modify your ratio or so)
If you use KTorrent as a preferred application for torrents, you might be in need at some point to trick client identification to tracker, in order to still connect to those trackers who have a “whitelist” applications (without Ktorrent, of course :) )
Because KTorrent doesn't have an inside option for this, you'll need to modify the sources and reinstall from them.
This howto assumes you already downloaded the ktorrent sources and unpack them in a directory of choice (at time time, ktorrent stable is 3.2.5).
Below is the solution (not necessarily elegant but a working one)
(add new options to command line)
inside main function, around line 81, find out the following line and comment it out:
then, a little bit below that, look for:
KCmdLineOptions options; options.add("+[Url]", ki18n("Document to open")); options.add("silent", ki18n("Silently open torrent given on URL"));
and add right after (and before the KCmdLineArgs::addCmdLineOptions(options); line ) the following:
options.add("client <clientString>",ki18n("Indentify application string sent to the tracker (e.g:UTorrent)"), "KTorrent"); options.add("clientcode <clientCode>",ki18n("Indentify application code sent to the tracker (e.g:UT)"),"KT"); options.add("clientver <clientVersion>",ki18n("Put here client version as major:minor:release (e.g. 1:8:0)"),"3:5:2");
(process the new options)
Inside int App::newInstance()
kt::GUI *widget = 0;
add the following code:
// here is the part that trick the client identification to tracker QString clientStr = args->getOption("client"); QString clientCode = args->getOption("clientcode"); QString version = args->getOption("clientver"); QStringList mmr = version.split(":"); bool ok; bt::SetClientInfo( clientStr, mmr.toInt(&ok), mmr.toInt(&ok), mmr.toInt(&ok), kt::VERSION_TYPE, clientCode);
cd directory_where_ktorrent_source_code_is mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. make sudo make install
If you installed successfully the new ktorrent, then it's time to fire it up like this:
ktorrent --client UTorrent --clientcode UT --clientver 1:8:0
This will report to tracker as UTorrent (code UT) and version 1.8.0. Pretty nice, huh?