rakshasa/rtorrent — Issue #35: Feature Request: download metadata not encrypted, files encrypted.
Author: sergio2012
Created: 2012-02-29 21:05:51+00:00
State: open

Hi, sorry for my bad english. I run rtorrent compiled from github (0.9.0/0.13.0) in Ubuntu 11.04 (kernel 2.6.38-13-generic 32 bits). The config of rtorrent is this:

min_peers = 40
max_peers = 100
min_peers_seed = 10
max_peers_seed = 50
max_uploads = 15
download_rate = 96
upload_rate = 96
directory = ~/.rtfiles
session = ~/.rtsession
port_range = 20192-20192
port_random = no
check_hash = yes
use_udp_trackers = yes
encryption=require,require_RC4
dht = on
dht_port = 20192
peer_exchange = yes

I want to encript all traffic, so I add "encryption=require,require_RC4". When I load a normal torrent, this work fine. But when I add a magnet link, rtorrent do not download the metadata file.

I tried to paste only the hash like this "magnet:?xt=urn:btih:8ac3731ad4b039c05393b5404afa6e7397810b41" and the hash and the trackers like this: "magnet:?xt=urn:btih:8ac3731ad4b039c05393b5404afa6e7397810b41&dn=ubuntu-11.10-desktop-i386.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80". In the first case, I have added the DHT node to bootstrap (router.utorrent.com, router.bittorrent.com and dht.transmissionbt.com) with de dht_add_node= command.

In both cases, rtorrent detects the size of the metadata but do not download them. The screens of rtorrent in this status are this: [{mainwindow}](http://goo.gl/kDM54) [{file list}](http://goo.gl/5qtGM) [{peer list}](http://goo.gl/8OHKI) [{tracker list}](http://goo.gl/CDWWK). In the peer list window, the peers appears and disappears constantly. In the main window, the text "Connecting to dht, searching..." appears in the "8AC3..." download sometimes and the number of nodes vary constantly. I waited more than two hours and nothing changes. I have tried with many magnets links, many of them with more than 10000 seeders and leechers.

The workaround which I use is quit rtorrent, deactivate encryption (encryption=none), start rtorrent, wait a few seconds to rtorrent download the metadata and put the download in closed state, quit rtorrent, activate encryption (encryption=require,require_RC4), start rtorrent, and start download (Ctrl+S).

I don't know if this is a bug or is the normal operation. If is the normal operation, is possible to add a new feature to handle this situation?. Something like a new encryption type (encryption=plain_metadata,require_files,require_RC4) to download the metadata unencrypted and the files encrypted.

If you want need more info, debug, capture packets, etc, please let me know. Thanks.