[stunnel-users] Access an arbitrary https website on http://localhost:3000 via stunnel.

Michal Trojnara Michal.Trojnara at stunnel.org
Thu Jan 14 15:17:00 CET 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 14.01.2016 14:34, Hongyi Zhao wrote:
>> 1- Why must we use the ''-H 'Host: coolaj86.com' '' in this 
>> command for getting the correct result?

https://en.wikipedia.org/wiki/Virtual_hosting#Name-based

>> 2- If I want to use internet explorer, such as firefox/chrome to 
>> open the corresponding url, i.e., http://localhost:3000/, how 
>> should I do?

Here are various ways depending on which parts of your infrastructure
are under your control:

1. Your client machines need to connect (what they believe is)
coolaj86.com to send this specific host name in the headers.  You can
achieve it with DNS or /etc/hosts (or equivalent) file.

2. You can rewrite HTTP headers with another software (stunnel won't
do it for you).

3. You can reconfigure coolaj86.com to accept "localhost" as the host
name for virtual server coolaj86.com.

Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWl63cAAoJEC78f/DUFuAU8+gQALLNIupVbIlEnVpMkCnh7LPB
HuvD9ijblHehqvyDPTo14/M/eAg+VXTMKugsZyt3Q8tYT+vTnMcbU0JNRMDmuVLV
annpjfcS+zzGfvxh40uPrz2x5Mv370fGbR2MAIMuP83g+UBRRxZ7SV67k1gj3Bqt
TxRzWJid36djZqSS+KXPP2SEKD0xe2JqPI5Qx/7Xs3h7V31oFLEpoPMLuQM2Gips
WnNnZnUg/VgBFiaF6glS3PGErR4bcqI7DQiUViML9uc79DVvWGE6Xe200wXoXM0a
iePPSbXTl81uJhvyHqR9BqP0k9rb2gyu2Kn5xLiTDkOrwUffb6pCB/Viru/JjccG
/B3VnmGXwYcglSlswwpulNYBW36c5dqFCzvi6GsVSLw0OBZGPrnYY7Sv8oiYWxwx
dX/nmadV8r0zv6D0Iqc3jDqAIAroHibNFxckihK3TyJ8WIDZBCtWpKhktaAysouN
gjw+qJSEu1E+21HuhIlcH7hsfSRq1mvVzNXDZ+BB+ULArX74eQCAvgIzLYg7o1u+
QG+f3jBelhYvV8eJqkfe8Q/Wj7PKPCYFQ2YX/DnqS4NKAvtRk12wxhAEy2n4/vxh
2+sMkUAi/lU7itT2eVUp4csPBUC6SBCAUXRqVKRuNXERjTaykGK/VZ7sXNSkPIq+
7lxTKCTwCyo/GjyKmMpg
=bF3C
-----END PGP SIGNATURE-----


More information about the stunnel-users mailing list