-
-
Notifications
You must be signed in to change notification settings - Fork 629
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
Webtorrent support #138
Comments
Do you refer to https://github.com/feross/webtorrent ? Can you link to a spec on bittorrent clients interacting with webrtc clients? |
Not offhand, but I'm happy to google for it.... To leverage existing WebRTC implementations a dedicated instance of a Chromium browser is used. This 'bridge' mediates communication between Vuze and WebTorrent peers. ....ouch. Maybe I can find better in the node.js? |
That's as much as I found. If you found specifics in the node.js code, that may expedite adding support for this. |
Hey! We'd love to help make WebTorrent support happen here. We're working on a spec. I'll share here when it's complete. At the moment you can check out the following files, to see what's going on:
To sum up what it would take to support this:
When a Once connected to a peer over WebRTC, you can treat the remote peer exactly the same -- the wire protocol is exactly the same. |
Webtorrent support here would be amazing. The current node.js implementations are limited by chromes implementation of webrtc causing cpu time to multiply with each torrent being seeded. I'm interested in sponsoring Webtorrent support |
I'll revisit this when there's a spec. |
This comment has been minimized.
This comment has been minimized.
No progress. There's no spec, and WebRTC is abysmal to work with. |
Hey @anacrolix ! I have been working on Go native WebRTC https://github.com/pions/webrtc and would love to get it to the point that you could use it! It currently has full support for Audio/Video (send and recv) and I am maybe two weeks out from finishing DataChannels. We have ~5 developers involved, so things are moving pretty quick! If you are interested would love to chat/figure out what is most important to you. All the devs are on the Gophers slack in the #pion channel |
That sounds great @Sean-Der . I'm guessing WebRTC is not so simple as a stream of bytes, when data-channels are ready we can look at integrating those. Specifically dial/accept interfaces are required, and a way to send/receive bytes. A spec on how the peer protocol operates over WebRTC is still required. Unrelated, there was a comment earlier about websocket trackers, I've yet to see any in the wild. Some examples of those will be helpful. Implementing those should be very easy. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Quick update on pions/webrtc: we've finished implementing DTLS and plan to land it in master as soon as December 1st. This enables WebRTC in pure Go! I reached out in chihaya/chihaya#388 for the tracker side of things. Regarding the client side. It seems we need to:
After that we should be able to pipe the Bittorrent protocol over the WebRTC @anacrolix what are your thoughts on this? Am I missing any big steps? How would you favor to handle the Webtorrent peers alongside regular IP-based peers? |
@backkem It looks like you've covered all the important factors. Can you link to the WebRTC Dial/Addr/Listen equivalents so I can get a feel for how it will sit alongside the other socket types? |
Any news about support webrtc? It is https://github.com/gorilla/websocket |
@Vladislavik No news on WebRTC. |
https://github.com/pion/webrtc
|
@jpillora I would love to see that happen :) I wish I had the bandwidth to help, but I am always behind with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@vijayanandnandam I have Patreon, Liberapay, and GitHub Sponsors, you can view that stuff at the top of the project page when you click the Sponsor button. @Sean-Der I've created https://issuehunt.io/r/anacrolix/torrent/issues/138, I think that should work? I'm open to suggestions. Thanks to @backkem for his existing sponsorship. Sorry everyone else for the noise. |
An anonymous user has funded $100.00 to this issue.
|
An anonymous user has funded $100.00 to this issue.
|
@anacrolix and there it is :) If you hit any bugs/have questions we are in Slack and would love to help. I am sure you will hit some roadblocks along the way, but will do my best to unblock you! |
@Sean-Der thanks. |
@steelbrain has funded $50.00 to this issue.
|
The Dialer and Listener interfaces have been abstracted out in #380, which is the first step toward implementing this. I've created https://github.com/anacrolix/torrent/milestone/2 to track any issues and PRs that progress this issue. |
Anything I can do to help @anacrolix ? Happy to get involved with any of the WebRTC stuff. |
@Sean-Der I've created issues the next 2 items we need. I think it may be possible to do them concurrently, so long as the |
I did some more investigating. This looks exceptionally difficult to integrate into the existing code. The tracker and connection management are tightly coupled. It's also probably not appropriate just to maintain state at the Torrent level for trackers, it might be necessary at the Client level in order to scale to many Torrents with the same tracker URLs specified. The potential for disconnection from the trackers is a real kicker, I think there will be need to be many events flowing around the system. |
I think disconnecting form the tracker isn't the end of the world. Once established, the WebRTC connections don't need the tracker's Websocket connection to stay alive. Managing the tracker Websocket connections globally is probably a good idea since they will have more overhead than regular UDP ones. |
The WebRTC connection setup is likely even more tricky. Normally WebRTC will allocate random ports for both sides of the connection. In addition, there are two steps: signaling (tracker) and the actual connections (torrent). This would require a bunch of back-and-fort between the tracker and connection logic and it's quite inefficient for this use-case. However, unlike in the browser we have more control over the network stack. You could potentially address these downsides as follows:
This would mean:
The pion/webrtc library should be flexible enough to make this happen. |
Thanks for the assistance again @backkem. I have a in-progress branch at https://github.com/anacrolix/torrent/tree/webtorrent that's able to download. Within the |
That command is now |
@anacrolix has rewarded $225.00 to @anacrolix. See it on IssueHunt
|
I'm closing this as done. There are further improvements to be made, but now that Webtorrent is supported on master, those will come over time. |
Nice work Matt!
…On Thu, 16 Apr 2020 at 9:35 am Matt Joiner ***@***.***> wrote:
Closed #138 <#138>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#138 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE2X4234VIIWQYJNC6W6MTRMZAE7ANCNFSM4CZIEDIQ>
.
|
Does this client by any chance support webtorrent?
If no, anyone know of a go torrent solution that does?
thanks!
IssueHunt Summary
anacrolix has been rewarded.
Backers (Total: $250.00)
Submitted pull Requests
Tips
IssueHunt has been backed by the following sponsors. Become a sponsor
The text was updated successfully, but these errors were encountered: