首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Webtorrent进行种子设定不能与webtorrent一起使用-节点上的混合

通过Webtorrent进行种子设定不能与webtorrent一起使用-节点上的混合
EN

Stack Overflow用户
提问于 2020-02-03 11:42:15
回答 2查看 631关注 0票数 0

软件版本:"webtorrent-hybrid":"^4.0.1",

OS X 10.14.4

NPM: 6.13.4

节点: v8.17.0

代码语言:javascript
复制
var WebTorrent = require('webtorrent-hybrid')

var client = new WebTorrent()

client.on('error', (err) => {
  console.error(`fatalError ${err.message || err}`);
  process.exit(1);
});

client.seed('./c5l.mp4', function (torrent) {
  torrent.on('warning', function (err) {
    console.warn(err);
  });
  torrent.on('error', function (err) {
    console.error(err);
  });

  console.log('client.seed done', {
    magnetURI: torrent.magnetURI,
    ready: torrent.ready,
    paused: torrent.paused,
    done: torrent.done,
    infohash: torrent.infoHash
  });
});

给了我我的磁力线。在前端,我有:

代码语言:javascript
复制
script(src = 'https://cdnjs.cloudflare.com/ajax/libs/webtorrent/0.107.17/webtorrent.min.js')

script.
  var client = new WebTorrent()


// working torrentId
  var torrentId2 = 'magnet:?xt=urn:btih:c9e15763f722f23e98a29decdfae341b98d53056&dn=Cosmos+Laundromat&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fcosmos-laundromat.torrent'

// failing torrentId
  var torrentId5 = 'magnet:?xt=urn:btih:f9435fb103d53a0b3cce14afbae867cc6999d76b&dn=c5l.mp4&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.openwebtorrent.com'

  client.add(torrentId5, function (torrent) {
    // Torrents can contain many files. Let's use the .mp4 file
    var file = torrent.files.find(function (file) {
      console.log(file);

      return file.name.endsWith('.mp4')
    })

    // Display the file by adding it to the DOM.
    // Supports video, audio, image files, and more!
    file.appendTo('body')
  })

当我有了正常工作的torrentId时,视频就会像预期的那样加载。当我使用通过webtorrent混合包创建的磁铁url将其细分出来时,我首先得到了一些错误:

WebSocket connection to 'wss://tracker.fastcast.nz/' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

很好,所以我从querystring中删除了追踪器,再试一次:

WebSocket connection to 'wss://tracker.btorrent.xyz/' failed: Unknown reason

很好,再次删除它,我得到了一些东西,只是挂起,什么也没有发生。

如果我在勇敢上使用磁铁,它就会挂在Loading the torrent file list上,旋转器就会无休止地旋转。

到底怎么回事?谢谢

EN

回答 2

Stack Overflow用户

发布于 2020-07-09 22:15:09

代码语言:javascript
复制
// working torrentId
var torrentId2
magnet:?xt=urn:btih:c9e15763f722f23e98a29decdfae341b98d53056&dn=Cosmos+Laundromat&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fcosmos-laundromat.torrent

是/是一个良好的种子文件意味着它可以工作90%-100%

代码语言:javascript
复制
// failing torrentId
var torrentId5 = 'magnet:?xt=urn:btih:f9435fb103d53a0b3cce14afbae867cc6999d76b&dn=c5l.mp4&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.openwebtorrent.com'

无或低种子文件表示它工作0.1-10%

票数 0
EN

Stack Overflow用户

发布于 2020-07-09 23:05:48

当我有一个正常工作的torrentId时,视频会按预期加载。当我使用通过webtorrent混合包创建的磁铁url将其细分出来时,我首先得到了一些错误:

到‘wss://tracker.fast cast.nz/’的WebSocket连接失败:建立连接时出错: net::ERR_NAME_NOT_RESOLVED

很好,所以我从querystring中删除了追踪器,再试一次:

到'wss://tracker.btorrent.xyz/‘的WebSocket连接失败:未知原因

很好,再次删除它,我得到了一些东西,只是挂起,什么也没有发生。

如果我在Brave上使用磁铁,它只是在加载torrent文件列表时挂起,旋转器无休止地旋转。

到底怎么回事?谢谢

到‘wss://tracker.fast cast.nz/’的WebSocket连接失败:建立连接时出错: net::ERR_NAME_NOT_RESOLVED

wss://tracker.fast cast.nz/已死,已于2019年停止拥有者支持

到'wss://tracker.btorrent.xyz/‘的WebSocket连接失败:未知原因是跟踪器忙,响应速率太长,并且由于资金不足而在廉价的服务器上运行。所以它的工作效率是30-90%。所以结果是失败的:未知原因

如果我在Brave上使用磁铁,它只是在加载torrent文件列表时挂起,旋转器无休止地旋转。

Webtorrent客户端在下载/播放大文件和不支持的文件格式(如.mkv /x-Matroska)时会遇到一些问题。如果出现错误,您将看不到任何通知。它就挂断了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60032835

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档