Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to do this:

HTTP client -> [proxy] -> HTTPS server. Possible?

But I want it as a command line program that turns a port on localhost into an HTTP listener for a remote HTTPS server, so some dumb software I have can talk to localhost on HTTP.

I don't want Apache, nginx if I can avoid it, I want something like

sproxy -p 8080 --force-cert https://remote.host/

where --force-cert ignores an invalid cert. The above would make 127.0.0.1:8080 accessible to software that can only talk HTTP so that it can talk to https://remote.host/.

Does anything like this exist?

Edit: major, major bonus if it can handle HTTP AUTH, as well. Our sysadmin is really paranoid. :|

share|improve this question
    
Stunnel should do that (excerpt from man) : "The stunnel program is designed to work as SSL encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-SSL aware daemons running on your system you can easily set them up to communicate with clients over secure SSL channels." So it's able to act as SSL client and listen on some local port. Try stunnel.org –  wojciechz Aug 22 '12 at 0:31
    
Weird, I thought of stunnel before anything else but didn't see a way to use it like I wanted. I'll try again. –  taiganaut Aug 22 '12 at 0:33
    
Not sure if it's exactly what you wanted but look for example here http://www.thegoldfish.org/2010/01/stunnel-in-client-mode/ –  wojciechz Aug 22 '12 at 0:47
    
If you're going to accept HTTP on the proxy why bother with HTTPS on the back end? –  John Gardeniers Aug 22 '12 at 2:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.