0
votes

So I am trying to build an application that uses libtorrent. However, before I start I would like to make sure that I have compiled the lib correctly and that I have a functioning environment for testing. I am currently running a VM with opentracker and I try to connect using the example client in libtorrent. First I start by creating a .torrent file using libtorrent (I am currently not sitting in front of a computer with libtorrent available so I might be remembering the exact commands a bit wrong):

maketorrent.exe  dummy.txt -t "http://10.XXX.XXX.XXX/announce"

This gives me a .torrent file called a.torrent. Opening the file everything looks ok, the bencoding is correct and the announce address is there. Next I try to add it to the example client hoping it starts to seed:

client_test.exe a.torrent

Everything starts up OK, but no tracker is found. Then if I press t to show tracker information I see an error (maybe not the exact phrasing):

Alert: {null} unsupported URL protocol

OK, so maybe something is wrong with how I built libtorrent. So I get the Halite client instead since that is also supposed to be build upon libtorret. But there I have the same problem. So I have a look at the code and found where this error message is generated. The code is checking if I am supplying an address using the HTTP or HTTPS protocol, which I am. So could it be that I am not able to use a bare IP-address or am I doing something wrong?

1
Is the torrent file really correct? Test to upload it to: torrenteditor.comEncombe
Good idea. I might do that tomorrow when I am back at the office.jimmy

1 Answers

0
votes

I found the problem. It was not a problem with the IP address or the torrent itself. Instead it was a problem with caching. The first time I added the torrent I used http:\XXX.XXX.XXX.XXX instead of http://XXX.XXX.XXX.XXX which didn't work. However whatever change i did to the torrent file after that did not stick. It was always falling back to that original file until I removed the .resume folder.