Giter Club home page Giter Club logo

instant.io's Introduction

Instant.io

Streaming file transfer over WebTorrent (torrents on the web)

travis javascript style guide

Download/upload files using the WebTorrent protocol (BitTorrent over WebRTC). This is a beta.

Powered by WebTorrent, the first torrent client that works in the browser without plugins. WebTorrent is powered by JavaScript and WebRTC. Supports Chrome, Firefox, Opera (desktop and Android). Run localStorage.debug = '*' in the console and refresh to get detailed log output.

Install

If you just want to do file transfer on your site, or fetch/seed files over WebTorrent, then there's no need to run a copy of instant.io on your own server. Just use the WebTorrent script directly. You can learn more at https://webtorrent.io.

The client-side code that instant.io uses is here.

Run a copy of this site on your own server

To get a clone of https://instant.io running on your own server, follow these instructions.

Get the code:

git clone https://github.com/webtorrent/instant.io
cd instant.io
npm install

Modify the configuration options in config.js to set the IP/port you want the server to listen on.

Copy secret/index-sample.js to secret/index.js and update the options in there to a valid TURN server if you want a NAT traversal service (to help peers connect when behind a firewall).

To start the server, run npm run build && npm start. That should be it!

Tips

  1. Create a shareable link by adding a torrent infohash or magnet link to the end of the URL. For example: https://instant.io#INFO_HASH or https://instant.io/#MAGNET_LINK.

  2. You can add multiple torrents in the same browser window.

License

MIT. Copyright (c) WebTorrent, LLC.

instant.io's People

Contributors

bnb avatar danbovey avatar dependabot[bot] avatar diegorbaquero avatar feross avatar fumesover avatar gcq avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hisener avatar iuriguilherme avatar jakefb avatar jhiesey avatar jimmywarting avatar josephfrazier avatar joshterrill avatar kitten-s avatar linusu avatar mafintosh avatar markreid avatar mathiasvr avatar nicola avatar nixxquality avatar r0mflip avatar renovate-bot avatar renovate[bot] avatar toxel avatar tsonge avatar willstott101 avatar zackees avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instant.io's Issues

Error in /instant.io-master/server/index.js

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!

Downloading from .torrent files is broken

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:

  1. Start seeding a file on instant.io
  2. Download the torrent for the file
  3. Open the torrent in a new tab at instant.io

I'm using Chrome Version 43.0.2357.81

Have a list of demo files

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)

add normal file upload box

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

ICE failed under Firefox 33.0

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.

Questions about Torrent/Peer Discovery

I have a few questions on how peer discovery works in instant.io and webtorrent:

  • If DHT working in webtorrent, why did you use a tracker server instead? (index.js, line 43.)
  • If DHT is enabled on a torrent, can it be found by just its infoHash?
  • Is it ok to use wss://tracker.webtorrent.io for applications using webtorrent?
    • If not, do you have any tips on creating a tracker server?

Thanks in advance!

Video autoplay

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.

Transfer stats: peer count is wrong

Peers seem not to be removed from torrent.swarm._peers correctly. Also, the peer count is sometimes 0 even though a transfer is happening.

Privacy & legality

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?

instant.io broken in firefox nightly

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

Add a progress/status indicator for download

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.

Better torrent name when dropping a folder

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?

saving the downloaded file

Is there an option to save the downloaded (video) file? I could not find one after downloading mp4 file; only playback option is provided.

Wrong magnet uri

Is always generating magnet:?tr=wss%3A%2F%2Ftracker.webtorrent.io

Switch drag-drop to not use buffer

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.

Trigger.sh is asking for password

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.

Is upload rate correct?

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?

Seed multiple torrents at once

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.

Seeding file from server

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

Add a P2P chat component

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.