Closed ViGeng closed 6 months ago
The documentation I wrote uses nginx to handle tls termination, that's why wss is not enabled in the janus configuration. You can indeed expose janus directly and enable wss in the config file, but even the janus-gateway team doesn't recommend it, and advice to use tls termination in some other front server, be it apache, nginx, or traefik or whatever you use on aws for https I'm not familiar with. Be aware that the current janus docker image is not up to date with latest openssl fixes and enabled ciphers, so you may be exposed to security vulnerabilities from 2022 and 2023 if you use my current docker image with wss enabled in janus config. I plan to update it to ubuntu 22.04 and latest janus-gateway and dependencies that has changes to use OpenSSL 3.0 api only in the near future.
If you want to use it locally, I recently added the proxy configuration in webpack config so that you can use the self-signed certificate that webpack-dev-server creates. Just run npm start
and configure the url to be wss://ip:8080/janus
Be sure to go to the same url https://ip:8080/ (and not localhost) so you accept the certificate.
If wss://MYDOMAIN:8080/janus is working, it means you ran npm start
on your server. You don't need to run that on production, just serve the static folder that have your index.html via nginx, and forward the traffic to janus on port 8188 of the docker image.
If you have access to 8080 port, that also means you didn't properly set your firewall, security group or whatever ec2 instance is using. Be sure to accept only 80 and 443. Ports like 8080 or 8188 shouldn't be accessible from your domain.
Hello!
I am new to NAF and Janus SFU. I try to setup a naf-janus-sfu for my research. I did the following steps:
serverURL
in the index.html withwss://MYDOMAIN:8080/janus
.The question is: why does it work since I found the
janus.transport.websockets.jcfg
in docker container setwss
tofalse
! I checked thedocker logs -f janus
and it shows that the wss has not started.I have also tested this way in my LAN, and changed the domain by local private IP accordingly. But I found it does not work at all. I found the browser(chrome) alerts:
WebSocket connection to 'wss://IP_or_LocalDomain:8080/janus' failed:
. Both Mac(ARM) and WSL2 failed in this test.To check whether my local environment(WSL) has any problems, I deployed a Janus-Gateway with self-assigned SSL certificates, and the demos seem to work well.
Could anyone please give any clue on these two problems? Let me know if I missed any additional information.
Thanks for your kind help!!!