Comments (16)
I am also getting error but it is slightly different
It is saying me
Could not get an ID from the server. If you passed in a path
to your self-hosted PeerServer, you'll also need to pass in that same path when creating a new Peer.
here is my configuration
var peer = new Peer(id,{host: '111.118.237.23', port: 9009,secure:true});
I am using a custom node server
var fs =require('fs');
var PeerServer = require('peer').PeerServer;
var server = new PeerServer({host:'111.118.237.23',port: 9009,
ssl: {
key: fs.readFileSync('/etc/ssl/certs/server.key'),
certificate: fs.readFileSync('/etc/ssl/certs/server.crt')
}
});
and self signed certificate
please help me in my scenario I cant use this product unsecured without ssl
from peerjs-server.
Are you getting something like Error: DEPTH_ZERO_SELF_SIGNED_CERT
? How is it failing?
from peerjs-server.
I solved this problem by opening the URL which the app makes a request to in a new tab, then confirm the security exception thrown by Chrome (since the certificate is self-signed, Chrome wont recognise it).
After adding the exception, the app worked fine.
from peerjs-server.
@michelle I was not getting any errors from the server, and chrome wasn't giving me any errors either. I did try what @inian suggests too, but couldn't get the browser to detect the certificate as it wasn't an http request
from peerjs-server.
Yes, try enabling XMLHTTPRequests in the Chrome dev tools console and then you would be able to see the requests being made.
from peerjs-server.
@sameer293 Did you manage this problem?
from peerjs-server.
@luongnv89 not yet.
from peerjs-server.
@redannick @michelle @sameer293 @luongnv89 This problem is still happening in 2017 :(
from peerjs-server.
@clarencechen I follow the tutorial in this: https://www.npmjs.com/package/peer, and it works for me.
This is how I did it:
var app = express()
var ExpressPeerServer = require('peer').ExpressPeerServer
var peerjs_options = {
debug: true
}
var ssl_options ={
key:fs.readFileSync('./certificate/myserver.key'),
ca:fs.readFileSync('./certificate/GandiStandardSSLCA2.pem'),
cert:fs.readFileSync('./certificate/certificate.crt'),
honorCipherOrder: true,
ciphers: 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:HIGH:!RC4:!MD5:!aNULL:!EDH'
}
var server = https.createServer(ssl_options,app)
var peerServer = ExpressPeerServer(server, peerjs_options)
... set your app ...
app.use('/myapp', peerServer)
server.listen(443)
Hope this help
from peerjs-server.
Are there any files or strings I should obtain?
Thanks so much in advance
from peerjs-server.
@SameerRathod
Sameer, were you able to get over this issue ?
from peerjs-server.
Use lets encrypt to obtain cert and key, then use it for reverse proxy or pass in options
node ./src/index.js --sslCertPath /path/to/cert.pem --sslKeyPath /path/to/key.key
from peerjs-server.
@afrokick does this help with local https development?
from peerjs-server.
@afrokick does this help with local https development?
Sorry, i don't know. I test it on local http and it works perfectly.
from peerjs-server.
I only mention it as I believe this was what I was doing in the first place. I was testing something that required https so expected a self cert to work. I suppose you could spoof a domain in your hosts file perhaps to use a let's encrypt certificate locally or put it on a temporary domain and this was my original workaround, but really, shouldn't a self cert work in the first place?
from peerjs-server.
I suppose you could spoof a domain in your hosts file... shouldn't a self cert work in the first place?
I do this in my project, and document how to "get started" here. The steps aren't specific to PeerJS, but you should be able to understand how mkcert
works and generate your own selfsigned key/cert and update your hosts file for peerjs-server from that doc.
from peerjs-server.
Related Issues (20)
- migrate from localhost to shared hosting
- Combine a peer server with nestjs application
- Back4App - Was Working - Now Stopped HOT 1
- Unnecessary high CPU impact due to low default check interval of broken connections HOT 1
- cannot start server on ubuntu vm
- ssl failed HOT 1
- TypeError: (0 , $cl6Iw$ws.WebSocketServer) is not a constructor HOT 3
- Error: unexpected token . HOT 3
- RedisClient error: ConnectionTimeoutError: Connection timeout
- custom domain in local dev with https enable
- Deploying peerjs server HOT 4
- TURN servers down? HOT 3
- connection.on('dataChunk',(dataChunk)=>{})
- Status page is not working HOT 1
- Client-Initiated SSL Renegotiation Permitted HOT 4
- TURN servers unavailable?? HOT 3
- New maintainer(s) wanted!
- Google App Engine Deployment in Readme is not Right: HOT 1
- Dependency Dashboard
- Support multiple Docker image architectures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peerjs-server.