-
-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only works with websocket trackers #52
Comments
Yeah, this is a limitation of the browser. The browser can't make TCP or UDP connections for security reasons. No browsers can do this. |
UDP totally makes sense but why can't the browser query the http interface? |
Assuming the http tracker set the correct cross-origin headers (unlikely), what would the browser do with the resulting ip:port addresses that the tracker returns? It can't make TCP connections, so it's not very useful. The browser can only make webrtc connections. |
Oh I certainly agree the connections to peers would have to be websocket. I'm unfamiliar with the details of WebTorrent. Are the peers returned by the websocket tracker in a different format than the http version to distinguish them as websocket? The idea here is that websocket clients could still use something like opentracker rather than being restricted to bittorrent-tracker (not that there's anything wrong with it, just for ease of setup). — On Fri, May 29, 2015 at 12:45 PM, Feross Aboukhadijeh
|
Sorry that this isn't clearer from the documentation. I'm working on improving docs. Right now, webtorrent in the browser MUST use a websocket tracker. The only implementation of a websocket tracker is currently the The peers returned from the websocket tracker are fundamentally different than those for normal bittorrent. Normal bittorrent returns "ip:port" addresses. The websocket tracker returns webrtc offer/answers. It's a bit more complicated :) |
Ahh I see thanks for clearing that up. Is there a more formal spec for the websocket tracker RPC? Or is it just the code right now? — On Fri, May 29, 2015 at 1:11 PM, Feross Aboukhadijeh
|
Right now it's just the code, but it's quite simple. It's very similar to the current tracker spec, but with a few changes to accommodate webrtc. I'll write up a formal spec asap. |
Setting TRACKER_URL to an http or udp tracker does not work (and does not produce any errors).
The text was updated successfully, but these errors were encountered: