Code Monkey home page Code Monkey logo

Comments (7)

feross avatar feross commented on May 20, 2024

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.

from instant.io.

gmbuell avatar gmbuell commented on May 20, 2024

UDP totally makes sense but why can't the browser query the http interface?

from instant.io.

feross avatar feross commented on May 20, 2024

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.

from instant.io.

gmbuell avatar gmbuell commented on May 20, 2024

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).


Sent from Mailbox

On Fri, May 29, 2015 at 12:45 PM, Feross Aboukhadijeh
[email protected] wrote:

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.

Reply to this email directly or view it on GitHub:
https://github.com/feross/instant.io/issues/52#issuecomment-106913424

from instant.io.

feross avatar feross commented on May 20, 2024

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 bittorrent-tracker package. Maybe opentracker could support websockets in the future? But until then, you have to use bittorrent-tracker.

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 :)

from instant.io.

gmbuell avatar gmbuell commented on May 20, 2024

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?


Sent from Mailbox

On Fri, May 29, 2015 at 1:11 PM, Feross Aboukhadijeh
[email protected] wrote:

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 bittorrent-tracker package. Maybe opentracker could support websockets in the future? But until then, you have to use bittorrent-tracker.

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 :)

Reply to this email directly or view it on GitHub:
https://github.com/feross/instant.io/issues/52#issuecomment-106923091

from instant.io.

feross avatar feross commented on May 20, 2024

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.

from instant.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.