tagyoureit / nodejs-Pentair

An application to read/write to Pentair pool controllers.
14 stars 6 forks source link

Provide external http/https access (from Internet) #24

Closed arrmo closed 7 years ago

tagyoureit commented 7 years ago

I'm not even sure where to get started with this. Need some guidance.

arrmo commented 7 years ago

Yep, I figured I'd try to take care of this one - just wanted to make sure it was captured.

arrmo commented 7 years ago

OK, a bit of digging here - and a stumbling block I think ... :(. I did get https redirect working (to http for now), using the information here: http://stackoverflow.com/questions/8541182/apache-redirect-to-another-port

And then, we can set up https pretty easily, info here (and matches to express API docs): http://stackoverflow.com/questions/11744975/enabling-https-on-express-js#comment41236410_11744975

BUT (there's always a but(t) ... ;)) - the socket.io traffic is all over port 3000, no matter what, right? So that kinda defeats the purpose of https, right? I admit, trying to allow access out of networks that only pass 80 or 443 ... but seems that may not be an option? Rather, just open another port on the firewall, and forget getting out of restrictive networks (given socket.io traffic)?

Thoughts?

arrmo commented 7 years ago

First step with PR #41 - password authentication (disabled by default). Perhaps add to the documentation how to create the file (htpasswd)?

arrmo commented 7 years ago

Addressed with PR #42 (and router port forwarding of course).

And for reference info (documentation?) - here is how I created the self-signed certificates, that work fine with Express, http://www.akadia.com/services/ssh_test_certificate.html

Test it out, close if it works?

arrmo commented 7 years ago

Closed - verified by @leftyfl1p (working for this individual as well). Provides http/https, and also authentication (if desired, configure in config.json).