webtorrent / instant.io Goto Github PK
View Code? Open in Web Editor NEW๐ Streaming file transfer over WebTorrent (torrents on the web)
Home Page: https://instant.io
License: MIT License
๐ Streaming file transfer over WebTorrent (torrents on the web)
Home Page: https://instant.io
License: MIT License
The downloader side's magnet link lacks any trackers, which makes it hard to use in webtorrent-hybrid or other clients.
This should be an option.
This should come after encryption has been implemented.
Could we assume that this method of P2P transfer is somewhat safer than more mainstream ones?
Let me explain my scenario. My sister lives in Germany where illegally downloading licensed content is under strict surveillance. You can get fined without warning and fines are usually pretty salty. She works on a boat and gets bored after work hours without internet. Before she embarks I have files I want to send her to keep busy. Like a movie that I got legally by buying it directly from the artist's website, or an ebook from a kickstarter I supported. These are legal to share with my family, and I am not planning on distributing them. Though, from the point of view of an algorithm, it might look like I'm broadcasting licensed content.
Could sharing through instant.io be considered safe? Or will she get fined if I choose to send her files this way?
Setting TRACKER_URL in client/index.js does not fully switch the tracker. I still see requests to wss://tracker.webtorrent.io
Could running/installing this on one's server instructions be added? Thanks!
When first going to a download link (instant.io/#infoHash) there are quite a few seconds where it looks like just an upload page before the download section gets populated with progress. Would be good to put at least a spinner there as soon as the page loads so the user knows a download is coming.
To get a "preview" of the content that is coming.
Setting TRACKER_URL to an http or udp tracker does not work (and does not produce any errors).
The video previews autoplay when you upload them, but if you upload more than one video at once, they all play at the same time.
mafintosh> is there a way i can share a link to instant.io+info-hash?
cc @mafintosh
I get following in the console:
TypeError: asm.js type error: expecting argument type declaration for 'e' of the form 'arg = arg|0' or 'arg = +arg' or 'arg = fround(arg)'
Then when it tries to hash a file:
AssertionError: false == true
I guess it might be related to this: subrosa-io/subrosa-client#39
Otherwise, it's not worth disturbing the user.
Executed localStorage.debug = '*'
Random info hash with a lot of seeds: 1FA6D2D6A5FE21D00E0B822CCDA7699547163F65
Click download.
"webtorrent " "new webtorrent" " +0ms" bundle.js:7710
"bittorrent-client " "new client peerId 2d5757303030312d643461336135313438666163 nodeId 3b40854e569e83ab91b91cc657295eb06ae72249" " +2ms" bundle.js:7710
localStorage.debug = '*'
"*"
"webtorrent " "add [object Object]" " +2m" bundle.js:7710
"bittorrent-client " "add [object Object]" " +1ms" bundle.js:7710
"bittorrent-client:torrent " "new torrent" " +0ms" bundle.js:7710
"webtorrent-swarm " "new swarm i 1fa6d2d6a5fe21d00e0b822ccda7699547163f65 p 2d5757303030312d643461336135313438666163" " +2ms" bundle.js:7710
"torrent-discovery " "setTorrent 1FA6D2D6A5FE21D00E0B822CCDA7699547163F65" " +1ms" bundle.js:7710
"webtorrent-tracker " "new client 1fa6d2d6a5fe21d00e0b822ccda7699547163f65" " +0ms" bundle.js:7710
"webtorrent-tracker " "new tracker wss://tracker.webtorrent.io" " +1ms" bundle.js:7710
"webtorrent-tracker " "sent `start` wss://tracker.webtorrent.io {"event":"started"}" " +0ms" bundle.js:7710
GET https://tracker.webtorrent.io/ [HTTP/1.1 101 Switching Protocols 925ms]
"webtorrent-tracker " "generating 15 offers" " +1s" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-3e51f593800eae610c1b3554d6bd46daf1c0249d" " +1ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-f13fb56b594c810b47a76e166394cbddc0da2b34" " +137ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-3829444fac77f0b5cdf2090a48622e816aa6c72e" " +170ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-49ca926597b481836b4790ad11319de48d96f8d0" " +153ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-354a0eff1663ded83a35a9a9edae21848964cf02" " +54ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-c9f5d4343a328c981fa32f0110190f9ec1253ab9" " +80ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-bea48aeeeb9718c29b06269a462d3c7039476b10" " +89ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-137a863bf8edad4d11c79f08f9f495171d78677f" " +139ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-3713f12c797b4d2143521b9d1087fc57eb1c253f" " +74ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-b767fb81cb320f68ffa2a6a7e4a150807f4afc4e" " +61ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-446d7904c2f337c56f344da2e101354947271886" " +60ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-d91858637919d05d54093da6b0081b8aa8dc3dd4" " +107ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-85bf6f9931c8738940a56c0c00394dff755272b0" " +77ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-9deecc6252b239196f70dd0e11f6064eb1b2b438" " +87ms" bundle.js:7710
"simple-peer " "new peer initiator: true channelName: simple-peer-0e2494e0bd8a3b82c2ab127f629ffee68e78b418" " +194ms" bundle.js:7710
ICE failed, see about:webrtc for more details
"simple-peer " "iceConnectionStateChange new failed" " +100ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +2ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +0ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +1ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +0ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +1ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +0ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +2ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +0ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +1ms" bundle.js:7710
"simple-peer " "iceConnectionStateChange new failed" " +0ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +52ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +0ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +5ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +0ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +1ms" bundle.js:7710
"simple-peer " "signalingStateChange have-local-offer" " +0ms" bundle.js:7710
about:webrtc
shows 15 of these:
Closed PeerConnection:1413129330578000 (id=5700 url=http://instant.io/) 18:04:08 GMT+0200
ICE statistics
Local SDP
v=0
o=Mozilla-SIPUA-33.0 16730 0 IN IP4 0.0.0.0
s=SIP Call
t=0 0
a=ice-ufrag:5abadc12
a=ice-pwd:c3794f4089d896401a248b1ae64599d3
a=fingerprint:sha-256 51:CD:4F:DB:59:8C:DD:74:A3:38:FF:B0:53:7B:0D:B0:13:D2:52:CF:15:B3:98:9D:8F:EC:48:E1:A6:BD:A9:D7
m=application 9 DTLS/SCTP 5000
c=IN IP4 0.0.0.0
a=sctpmap:5000 webrtc-datachannel 16
a=setup:actpass
Remote SDP
I don't know if it's a problem with FF, with my setup, or webtorrent.
If i can help in any way tell me.
Peers seem not to be removed from torrent.swarm._peers
correctly. Also, the peer count is sometimes 0 even though a transfer is happening.
i cannot stream any video
i always receive this error...
Uncaught InvalidStateError: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer has been removed from the parent media source. bundle.js:10746
Great job.
It somehow doesn't work and gives no error. I saw info_hash changed while sending via websockets.
I'm posting the response message as gist so maybe it helps you.
Is always generating magnet:?tr=wss%3A%2F%2Ftracker.webtorrent.io
TURN servers will increase the chances that peers will be able to connect. TURN servers act as a relay point that both peers can reach easily (since it's not behind a NAT and has a publicly-accessible URL).
Downside: This is a point of centralization where eavesdropping could occur. Thus, we should add streaming file encryption (issue https://github.com/feross/instant.io/issues/15) first.
This is a minor issue but it's probably easy to fix and would give a better experience right after cloning the repo.
When dropping multiple files, or a folder (which will soon be supported for Chrome!), we currently just pick the first file name as the name of the torrent. This is confusing. What should we name the torrent instead?
Let's show the content of text files in the page!
The peer count doesn't go down when peers disconnect. Something's not being cleaned up correctly, probably.
It would be cool if it was possible to choose what happens when more than one file is selected or dropped in. The user should be able to choose if a torrent is created from the array of files or if a torrent is created for each file so each file has its own individual hash. I'm willing to give this an attempt and make a PR.
instant.io gives "Uncaught Error: Invalid torrent identifier" in the javascript console when trying to download from a torrent file rather than info hash or magnet link.
Steps to reproduce:
I'm using Chrome Version 43.0.2357.81
04:25 <substack> feross: drag/drop on instant.io doesn't work very well for me on linux
04:25 <substack> what about a download form?
04:26 <substack> it just opens the file in the browser instead of intercepting the dropped file
cc @substack
Right now it's super confusing when the download never starts!
Large files fail with RangeError (in Chrome)
Hi Ferros,
I have removed the node modules of the clone so that i can install the "bin" files but for some reason it asks for a password. Is it required for me to implement these .sh files or should I continue with browserifying the indexes? Thanks for your help in advance.
I have a few questions on how peer discovery works in instant.io and webtorrent:
index.js
, line 43.)infoHash
?Thanks in advance!
I think it would be nice to have a list of demo files (like this) that people can download/watch to better understand what's instant.io is about.
It could be an html page or a simple markdown page (maybe in instant.io's wiki ? idk)
That way we don't need to load the whole file into memory up-front.
drag-drop/buffer
-> drag-drop
It looks like just making this change triggers some bug in filestream
where the 'end' event is not emitted. Investigate.
When I transfer directly from one tab to another, the uploader's transfer rate appears significantly higher than the receiver's. What is going on?
How could I seed files withoud internet inside NAT?
How could I seed files from the server after client have uploaded the file. Webtorrent-hybrid and webtorrent use the same websocket adress so i have an error
Is there an option to save the downloaded (video) file? I could not find one after downloading mp4 file; only playback option is provided.
Hello,
just leaving a bugfix that there is an issue with code located here
app.use(express.static(path.join(__dirname, '../static')))
my editor does not seem to like express.static
(static comes up as red)
Let me know if anyone figured it out or if it is just my coder.
Cheers
K!
We don't need to show "Streaming is not supported in this browser. Try a browser that supports MediaSource, like Chrome. You can still save the file once it's fully downloaded, if you want." when the user isn't trying to download a non-video file.
It would be nice to not include these useless hidden files.
From this comment: feross/simple-peer#24 (comment)
I'm noticing that sometimes the 'disconnect' ICE state happens, but never 'closed', so the peer never fires 'close' and lives on as a zombie. Adding a timer into instant.io would allow 'close' to eventually fire and give reconnect a chance to happen.
I checked a few hours ago and https://instant.io/ seemed to be down. It still is and I was wondering what's happening? I was thinking about running my own tracker, but if I did would peers from my website using my tracker, be able to connect to peers from instant.io?
Just though of this. Wouldn't it be cool if you could choose to participate in some sort of chat with all your WebTorrent peers using WebRTC? Since you're sharing content it seems that you're also sharing an interest. And that's always a good place to start a conversation!
I was thinking like an opt-in sidepanel with a chat "hosted" by the peers - like Friends!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.