erbbysam / webrtccopy Goto Github PK
View Code? Open in Web Editor NEWA simple file sharing application using webRTC-data.io
A simple file sharing application using webRTC-data.io
Replication: 3 users, 2 attempting to share files, 3rd user tries downloading both, 1 will always fail to start.
Not sure how this wasn't caught before, but it appears that you are limited to 1 download at a time in a multi-user room. This is because it does not look like window.requestFileSystem (in /js/file-io.js) cannot be called multiple times and is required to start a download.
Maybe the amount of space we request can be expanded to get around this?
Chrome Canary(34.0.1766.0) & Firefox Nightly(29.0a1) can communicate. However, compatibility check will say that this will likely not work (it will still let it through though so this isn't preventing connections).
Also, file transfer chunk sizes are different in Chrome & Firefox, need to address this in this fix.
Hi,
I'm experimenting with your software. Thanks for providing it, by the way. Very cool.
However, I'm having trouble getting a second client to connect to a room.
With client1 I create the room and user normally, with otr disabled.
Then the 2nd client types in the same URL, is prompted for a username, and then it shows the room (although it seems empty - ie client 1 is not there). At the bottom, it shows "Please wait a few seconds to connect over webRTC."
Client 1 is still in the room, although it also shows empty for him.
I have tried client2 from different wifi and 3g networks, thinking that maybe this was a NAT or FW problem. Unfortunately client2 is never able to connect and so file transfer and IM can't happen.
Since that didn't work on your site, I installed it on my own server in the cloud. Unfortunately I'm seeing the exact same behavior. Looking at my nginx logs, I don't see any errors.
Any clues?
Thanks
Hi,
I have been exploring further, and have noticed something strange.
When both clients connect behind the same NAT, everything works fine as it should.
However, when one of the clients is coming from a different network, the room states that the other is there, but they can't message nor exchange files.
Naturally this led me to look into Stun and webrtc-internals in Chrome.
My hunch seems correct since the webrtc-internals page appears to show both clients trying to establish a direct connection to each other's private, and not public, IP.
googLocalAddress 192.168.1.7:60791
googRemoteAddress 192.168.0.100:36627
This doesn't make much sense since the same page shows indeed Stun being used
https://my.domain.com/testing/#bbb [stun:stun3.l.google.com:19302] optional: {DtlsSrtpKeyAgreement:true}
You can see I changed the stun server from the default one, but the problem remains with them both.
Why isn't Stun being used and directing media to the public IP instead of the private one?
Where can I look to debug this strange behavior?
Thanks
Need to investigate improving this further as this is used to prevent XSS attacks client side.
see 93b9cb0
Trivial on the apache front - https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-12-04
node.js/express SSL example - http://stackoverflow.com/questions/5998694/how-to-create-an-https-server-in-express-js-node-js
Keep non-ssl support around
You have concluded that the WebRTC Encryption layer is at parity with OTR?
Love the project, but CC-BY-SA is an inappropriate license for a software project. May I suggest the GNU General Public License instead?
So that privacy can be increased?
need the ability to add a password & encrypt all peer-to-peer communication
Please provide latest server.js code in WebRTC copy (for text chat application and file sharing). existing server.js file is same as WebRTC demo(for video confernce and chat).
If existing server .js file is right one then what all changes,I need to do to work.
Regards,
Tushar k.
Hey - there is an open bug on the reliability issues, and perhaps we need to define the issue in different ways.
Can you please come participate at https://code.google.com/p/webrtc/issues/detail?id=2270
I linked back to your project and comments about queue problems (having to wait for response from peer).
I tried this thing and it says signature is not defined and then I found this function you have defined...
send: function(connection, message) {
var channel = rtc.dataChannels[connection];
if (rtc.connection_ok_to_send[connection]) {
if (encryption_type != "NONE") {
otr_send_msg(connection,message);
} else {
channel.send(message);
}
} else {
console.log("unable to send message to " + connection);
}
},
I am not using any encryption, so I am using simple channel.send (rtcChannel.send in my case). So when I remove id from the dataChannelChat.send(id, event.target.result), I get the following error:
Uncaught NetworkError: Failed to execute 'send' on 'RTCDataChannel': Could not send data controllers.js:1029
reader.onload
Can you tell me what is the issue?
We do not save any file or chat information, nor do we have the ability to.
You have the ability. You can create a webrtc peer connection in the server (nothing restricts the server from joining a P2P connection). And since you can send whatever JS code you want to the client. You can get all the shared files.
RTCcopy worked before but it does not work on Firefox mobile now!
I disable all Firefox extensions and restart.
Other users currently in the room are not in user list.
RTCcopy works on Chrome mobile,ย Chrome (desktop), Firefox (desktop).
I love RTCcopy!
RTCcopy helps me to transfer files and share clipboard (message) between computer and mobile phone very easy.
Thank you!
I changed line 32 of script.js to:
var rtccopy_server = "ws:localhost:8000";
For some reason wss didn't work, chrome would give me:
WebSocket connection to 'wss://localhost:8000/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
So, I'm assuming the server is being found but then when I attempt to connect a user to a room I get:
Uncaught TypeError: Cannot read property 'length' of undefined
which refers to rtc.unsernames
in this part of webrtc-data.io.js
rtc.on('get_peers', function(data) {
console.log("get_peers");
console.log(data);
rtc.connections = data.connections;
rtc.usernames = data.usernames;
rtc._me = data.you;
/* we already sanitize everything later, but rather be safe than sorry */
for (var i = 0, len = rtc.usernames.length; i < len; i++) {
rtc.usernames[i] = sanitize(rtc.usernames[i]);
}
What is going wrong?
expand encryption white paper, also detail file transferring limitations on Github page
Add binary transfer support & experiment with buffer sizes with SCTP - see comments - https://news.ycombinator.com/item?id=6288860
node --harmony server.js or node server.js returns with:
Harmony:
class WebSocket extends EventEmitter {
^^^^^
SyntaxError: Unexpected reserved word
...
Normal run:
const WebSocket = require('./lib/websocket');
^^^^^
SyntaxError: Use of const in strict mode.
...
I have tried reinstalling node and npm, updating them to the latest version.
Is there a specific version of nodejs I have to run?
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.