Skip to content
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

Web (HTTP) Seeding #331

Merged
merged 3 commits into from Jul 3, 2015
Merged

Web (HTTP) Seeding #331

merged 3 commits into from Jul 3, 2015

Conversation

@olalonde
Copy link
Contributor

olalonde commented May 27, 2015

WIP (do not merge). See #67
Depends on this PR: https://github.com/feross/bittorrent-swarm/pull/19

I started working on a web seed implementation. The implementation right now is a bit naive (it maps every bittorrent protocol requests to HTTP Range requests) and could probably be optimized.

  • downloads from web seeds listed in url-list
  • test in web browser
  • test what happens when regular peers and web peer
@olalonde olalonde changed the title Webseed: wrote simple webseed test. WIP, do not merge. Web (HTTP) Seeding May 27, 2015
olalonde added 2 commits May 28, 2015
@olalonde

This comment has been minimized.

Copy link
Contributor Author

olalonde commented Jun 3, 2015

@feross could you just take a quick look at this and let me know if there's any chance to get this merged? And if I'm heading in the right direction...

@piedshag

This comment has been minimized.

Copy link

piedshag commented Jun 26, 2015

@feross this would be quite handy.

@feross

This comment has been minimized.

Copy link
Member

feross commented Jul 3, 2015

@olalonde - you're a hero! Thanks for this PR! Please accept my sincere apologies for the delay in getting this merged. This was a much needed feature.

It only works in node right now, and it only supports BEP19, and the approach isn't very efficient with so many separate requests, but that's all okay for now. We have a starting point to work from now!

@feross feross merged commit 9df26f6 into webtorrent:master Jul 3, 2015
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
@feross

This comment has been minimized.

Copy link
Member

feross commented Jul 3, 2015

This is released as 0.51.0.

@olalonde

This comment has been minimized.

Copy link
Contributor Author

olalonde commented Jul 4, 2015

Great, @feross. Was starting to wonder if you'd ever take a look at the PR 👍. I'll probably try to improve it in coming days/weeks as I need the functionality for a project I'm working on. I'll try to catch you on IRC if I need some advice.

@feross

This comment has been minimized.

Copy link
Member

feross commented Jul 6, 2015

Sounds great!

@samcruz

This comment has been minimized.

Copy link

samcruz commented Jul 10, 2015

Hi there! I'm also interested in support for web seeding. I didn't try this out yet, but from reading the code, it seems this only supports single-file torrents, is that correct? Because if I'm reading BEP19 correctly, one would need to translate from pieces to offsets into specific files for multi-file torrents, which I don't see being done here.

@feross

This comment has been minimized.

Copy link
Member

feross commented Jul 10, 2015

@samcruz Yeah, that's not implemented yet.

@batjko

This comment has been minimized.

Copy link

batjko commented Jul 11, 2015

Does this mean, the testing indicated above hasn't been done before merging?

@jakefb

This comment has been minimized.

Copy link
Contributor

jakefb commented Jul 21, 2015

Great work @olalonde! I'm trying to test this out but I'm getting an error

When I run the test file download-webseed-torrent.js in node I get:

TAP version 13
# Download using webseed (via .torrent file)

TypeError: Cannot read property 'length' of undefined
    at WebConn.Wire.handshake (/home/jake/webtorrent/node_modules/bittorrent-swarm/node_modules/bittorrent-protocol/index.js:190:39)
    at WebConn.<anonymous> (/home/jake/webtorrent/node_modules/bittorrent-swarm/lib/webconn.js:26:10)
    at WebConn.emit (events.js:106:17)
    at WebConn.Wire._onHandshake (/home/jake/webtorrent/node_modules/bittorrent-swarm/node_modules/bittorrent-protocol/index.js:391:8)
    at WebConn.<anonymous> (/home/jake/webtorrent/node_modules/bittorrent-swarm/node_modules/bittorrent-protocol/index.js:665:12)
    at WebConn.Wire._write (/home/jake/webtorrent/node_modules/bittorrent-swarm/node_modules/bittorrent-protocol/index.js:555:10)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at WebConn.Writable.write (_stream_writable.js:183:11)
    at write (_stream_readable.js:585:24)
@feross

This comment has been minimized.

Copy link
Member

feross commented Jul 27, 2015

@jakefb Hey! Were you by chance using a magnet link when you got that error? I fixed an issue with that in cb5c9a4 and released it as 0.53.4. Please update and give it another try!

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.