Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upOnly seed to Browser #1626
Only seed to Browser #1626
Comments
This comment has been minimized.
This comment has been minimized.
|
That's a tricky situation. When a regular client downloads all odd pieces and a web client downloads all even pieces it looks like there's a 1.0 ratio, but if you stop seeding to regular torrent clients now they will never be able to complete unless the other webclient can send them data. |
This comment has been minimized.
This comment has been minimized.
|
Making the torrent "private" will change it's info hash. That's by design. This is not what you want to use. To disable non WebRTC peers, you can disable the DHT (since no WebRTC peers come from that): { dht: false }You should also remove all tracker servers that are not prefixed with const WebTorrent = require('webtorrent')
const createTorrent = require('create-torrent')
const websocketTrackers = createTorrent.announceList.filter(url => url.startsWith('ws'))
const client = new WebTorrent()
const torrent = client.seed(file, {
announce: websocketTrackers,
dht: false
})That should do it. But if you're using You should be able to fix that by overwriting const WebTorrent = require('webtorrent-hybrid')
const createTorrent = require('create-torrent')
global.WEBTORRENT_ANNOUNCE = []
const websocketTrackers = createTorrent.announceList.filter(url => url.startsWith('ws'))
const client = new WebTorrent()
const torrent = client.seed(file, {
announce: websocketTrackers,
dht: false
}) |
What version of WebTorrent?
0.103.1 Webtorrent-hybrid
What operating system and Node.js version?
Windows 10 (64-bit) Nodejs v10.15.3 (64-bit)
What browser and version? (if using WebTorrent in the browser)
Chrome Version 74.0.3729.131 (Official Build) (64-bit)
What did you expect to happen?
Seed only to WebRTC peers, disable UDP seeding on adding a torrent
What actually happened?
Seeds to both WebRTC and UDP
Hi all,
I know it's normal to seed when adding a torrent and keep the download/upload ratio above 1.0.
This is fine, but when the torrent files are 100% downloaded, I would like to continue seeding the files with the same hash but only to WebRTC clients.
Is there a way to block UDP leechers / seeders when the torrent is 100% finished?
I also tried to delete the torrent and use the
Client.seedfunction with a private tracker in the announce, but webtorrent keeps adding the default trackers as stated in this issue Issue 1604 plus the torrent hash is different than the one we started with ( not sure if it's possible to create the same magnet with the .seed function )Could anyone point me in the right direction?
Thanks!