So the issue is that I have quite a few homebrew scripts/web testing programs that only work with HTTP. The problem is that the website only allows HTTPS connections.

Does anyone know of a way to have like a proxy or something maintain the SSL connection while forwarding the HTTP traffic?

I suppose in essence i kind of need a SSL tunnel?

any ideas?

  • If a webpage works on HTTP correctly, it should work just fine with HTTPS as well - HTTPS is just HTTP with an SSL encryption layer. What kind of errors do you get when trying to use the web apps under HTTPS? Jun 24 '11 at 4:30
  • All HTTP is essentially HTTP in an SSL "tunnel." I agree with the earlier comment--you need to clarify what exactly you want to do, and what problems you're having.
    – Flimzy
    Jun 24 '11 at 5:00
  • Not sure the above commenters understand what is being asked. He has programs running on his local machine. These scripts were built without support for HTTPS. HTTPS is indeed "just" HTTP with an SSL layer, but that is a big difference in practice and requires that his programs either be written to handle all SSL handshake and session management, OR to do something like what he is asking for.
    – queso
    Jun 24 '11 at 6:55

Yes. One answer is stunnel. I'll leave it to you to read that guy's nice tutorial, but the gist is that stunnel takes any TCP connection (HTTP on the net uses TCP) and wraps it in an SSL connection, which is exactly what you would need to connect to a sever in the manner you describe.

The linked tutorial is more than you need, but the basics are there for creating a simple single host session.

  • I don't think this will solve the asker's problem. Tools like stunnel work by having an endpoint on both sides of the connection. In other words, if you have control over both the client and the server, you can install stunnel on both sides and it uses a kind of proprietary HTTP encoding to encode the TCP packets into HTTP packets, so the stunnel on the server-side can decode them. In user53654's case, he only has control of the client. The server can receive his packets and can decrypt them, but has no idea how to decode them into the original HTTP packets as stunnel is not installed there.
    – Kidburla
    Jul 18 '19 at 12:24

Nginx with proxy_pass to https. Try adding below configuration to nginx:

server {
    listen 9000;
    server_name localhost;

    location / {
        proxy_pass https://www.example.com/;

And then you can connect via http:// localhost:9000/

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.