0

I have an HTTPS server made in JavaScript running on port 443 directly (not the best idea, but whatever).

I would like to add an onion domain to this, how should I go about getting the data from the HTTPS server already running through the onion service? The server returns modified versions of HTML pages, so accessing files directly isn't an option.

Running Ubuntu 20.04.

Thanks in advance :)

0

Just like this:

  • Your NodeJS/Javascript site is working on the 127.0.0.2:80 without any SSL/HTTPS
  • Your NGinx is running as a reverse proxy with HTTPS + HTTP/2.0 on 127.0.0.1:443 and tunneling the requests to 127.0.0.2:80 and also NGinx on 127.0.0.1:80 to redirect everything to the same hostname but to HTTPS. The server name in both server {} blocks is your onion address
  • Your local tor instance has a hidden service with ports 80 and 443 tunneled to the 127.0.0.1 port's 80 and 443 respectively - using ports like 8080 and 8443 as some tutorials are suggesting can cause a mess in HTML pipelining

That's it, no rocket science! Make extra sure to bind NGinx to the specific ip+port combo via listen 127.0.0.1:443 directives and there's no default server bindings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.