cracker0dks / Accelerator

Online Conference and Collaboration Tool
GNU General Public License v3.0
65 stars 25 forks source link

Possibility to run without HTTPS #5

Closed link2xt closed 4 years ago

link2xt commented 4 years ago

When running behind reverse proxy, there is no need to have HTTPS.

Also, maybe just remove this feature completely for simplicity, so TLS is always handled by the web server? What is the current best practice for node applications?

cracker0dks commented 4 years ago

there was a point chrome and ff would block mic/cam access on http even on localhost... so debugging was not really possible without this solution. I will check and remove https if this has changed.

link2xt commented 4 years ago

From https://blog.mozilla.org/webrtc/camera-microphone-require-https-in-firefox-68/: "Some good news for web developers is that camera and microphone will continue to work from http://localhost! This is thanks to the modern definition of secure context, which defines local sources as secure."

So, HTTPS does not seem to be needed. Hopefully Firefox works as that blog says and chrome/chromium does the same.

cracker0dks commented 4 years ago

checked it and seems to work on chrome and ff with http on localhost. But if we remove this you always need a reverse proxy to host it, don't know if people like this if they just want to spinup a test server?

link2xt commented 4 years ago

IMO it is easier to install apache2+certbot and have a correct Let's encrypt certificate than getting let's encrypt certificate into node app or dealing with self-signed certificates, even for a test server. Maybe add some links and example configuration for apache/nginx + certbot to README instead?

cracker0dks commented 4 years ago

Ok, removed it and put it on the dev branch for now, maybe it has some side effects u never know :) Not using apache so can you post the reverse proxy config part for it please?

link2xt commented 4 years ago

Not using apache so can you post the reverse proxy config part for it please?

Yes, going to try it and post apache config when I get it working with my setup.

cracker0dks commented 4 years ago

you'll need to change the https to http in the config file if you already have one

link2xt commented 4 years ago

Not using apache so can you post the reverse proxy config part for it please?

Here is how my config looks like:

<VirtualHost example.org:443>
...
# Proxy /accelerator/ to accelerator container
ProxyPass "/accelerator/" "http://127.0.0.1:8080/"
ProxyPassReverse "/accelerator/" "http://127.0.0.1:8080/"

# Redirect /accelerator to /accelerator/, happens when user exits the room
Redirect "/accelerator" "/accelerator/"
...
# Optional authentication
<Location /accelerator>
AuthType Basic
AuthName "Accelerator authentication"
AuthUserFile "/etc/apache2/accelerator.htpasswd"
Require valid-user
</Location>
...
</VirtualHost>
cracker0dks commented 4 years ago

thanks added the part the the readme and also fixed the "user exits the room" bug.

taufiqridha commented 2 years ago

Hai @cracker0dks this is awesome project. thanks for initiate. To add some small info for anyone might want, for local test only or intranet. if using chrome, and don't wanna go over https i added host on "Insecure origins treated as secure" in chrome://flags to allow me testing without https