peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.48k stars 1.43k forks source link

Being served over HTTP causes issues on HTTPS sites #413

Closed JGames101 closed 6 years ago

JGames101 commented 6 years ago

When attempting to use PeerJS from a site that is served over HTTP, this error appears in the console: Blocked loading mixed active content “http://0.peerjs.com:9000/lwjd5qra8257b9/id?ts=15151778159410.6040248252280473”

Because the site for peerJS is served over HTTP, it is considered dangerous for the script to be loaded from there.

2n2n commented 6 years ago

use a custom peerjs-server for this and host it to your vps

Bohmaster commented 6 years ago

@2n2n Can u please give a example or documentation how to do that? I have the exact same problem.

I'm using this: repo

Can I use my own peerjs-server?

kidandcat commented 6 years ago

I will be adding SSL to the open server this week

hevyhomie commented 6 years ago

Any updates on this?

kidandcat commented 6 years ago

The official PeerServer accepts WSS. Please read the PeerServer section on the website. You must NOT add the key option.

If it says an error of not able to use WSS, please use latest version from master branch.

https://raw.githubusercontent.com/peers/peerjs/master/dist/peer.min.js

kidandcat commented 6 years ago

Update your peerjs version and it will work. (Even with key option, although it's useless)