kzahel / jstorrent

JavaScript Torrent Client primarily for ChromeOS and the Chrome Web Store
https://www.jstorrent.com
Other
409 stars 113 forks source link

rutracker.org support #66

Open alexeypetrenko opened 10 years ago

alexeypetrenko commented 10 years ago

Hi, I've been trying to download rutracker.org torrents with JStorrent. For some reason it does not work. It looks like there are problems with connection to a tracker. I see following errors in the console:

http tracker error XMLHttpRequestProgressEvent tracker.js:193
Failed to load resource: the server responded with a status of 403 (Forbidden)
http://bt4.rutracker.org/ann?uk=...

According to rutracker FAQ page there are three possible reasons for HTTP 403 response code:

  1. Client uses scrape-requests.
  2. Antivirus or proxy alters request parameters.
  3. Incompatible client (Doesn't strictly follow BitTorrent specifications).

For me 2 is definitely not the case. I do not use AV or proxy currently. So, apparently it's 1 or 3.

It would be really nice if you could fix this problem.


Oh, by the way. It also shows following error all the time:

window.onerror triggered Uncaught TypeError: undefined is not a function js/bencode.js 119 

It results in the notification: Notification Then these notifications stack up: notifications Which is quite annoying.

kzahel commented 10 years ago

Thanks for reporting this. I haven't had the resources to track down every private tracker and ask them to whitelist JSTorrent. I think the most likely thing happening is that they are looking at the User-Agent string that the JSTorrent uses, which is the same user-agent string as the browser, and simply issuing a 403 forbidden.

I'm going to look into it some more, but it's really the decision of the private tracker on how and which clients they want to allow. JSTorrent currently does not even have the ability to seed, because ChromeOS still has no way to open up the firewall to listen for new connections. So this may be against the rutracker rules. I'll do some more investigating and report back.

By the way, those errors should not show up any more if you have updated to version 2.3.2.

kzahel commented 10 years ago

So rutracker is an interesting tracker. The torrents are not market as "private" in the infodict, but you still get your own torrent file with a custom announce URL.

I could change the way JSTorrent announces to trackers, using a raw socket, but currently the default for public trackers is to re-use the browser XMLHttpRequest which sets the browser user-agent.

It looks like my custom raw socket announcer has some problems communicating specifically with rutracker, in any case. I am looking into either improving my own code or using something like this https://github.com/codeinchaos/chrome.sockets.tcp.xhr (which needs some improvement)

iamamongno1 commented 8 years ago

it's 2016 and still rutracker doesn't work with JSTorrent. Are you going to fix it?

mox512 commented 8 years ago

Guys please fix this issue.