Windows – Connect to an https service using an http-only client

httphttpsPROXYwindows

Is there a simple command line client that would be invoked something like this:

http2https --listen localhost:80 --connect example.com:443

which would then allow me to effectively connect to https://example.com by actually connecting to http://localhost? It would need to work on Windows.

I have tried stunnel, but it doesn't seem to work.

Update:

Here's the output of stunnel.exe -c -r google.com:443 -d 127.0.0.1:8888

No limit detected for the number of clients
stunnel 4.56 on x86-pc-msvc-1500 platform
Compiled/running with OpenSSL 1.0.1e-fips 11 Feb 2013
Threading:WIN32 Sockets:SELECT,IPv6 SSL:ENGINE,OCSP,FIPS
Reading configuration from file -c
Cannot read configuration

Syntax:
stunnel [ [-install | -uninstall] [-quiet] [<filename>] ] | -help | -version | -sockets
    <filename>  - use specified config file
    -install    - install NT service
    -uninstall  - uninstall NT service
    -quiet      - don't display a message box on success
    -help       - get config file help
    -version    - display version and defaults
    -sockets    - display default socket options

Server is down

Best Answer

Paul had it almost right but under Windows you need to add client = yes to the config file since -c is not a command line parameter for windows stunnel.

The following config works for me

[remote]
client = yes
accept = 8888
connect = google.com:443

I ended up using tstunnel.exe rather than stunnel.exe since that is the command line version of stunnel in Windows. Here's the command:

tstunnel remote_stunnel.conf
Related Question