我有stunnel监听端口80和作为一个客户端连接到端口443监听Apache。configuration如下。 我发现如果我尝试连接到本地主机:80连接是好的,但如果我连接到127.0.0.1:80
当我检查Apache的日志时,它表示stunnel同时使用localhost作为SNI,但是HTTP请求列出了localhost,一个是127.0.0.1,另一个是127.0.0.1。 是否有可能告诉stunnel使用HTTP请求中的任何内容,或者以某种方式configuration两个客户端,每个客户端具有不同的SNI值?
stunnel.conf:
debug = 7 options = NO_SSLv2 [xmlrpc-httpd] client = yes accept = 80 connect = 443
Apache error.log:
[error] Hostname localhost provided via SNI and hostname 127.0.0.1 provided via HTTP are different
Apache access.log:
"GET / HTTP/1.1" 200 2138 "-" "Wget/1.13.4 (linux-gnu)" "GET / HTTP/1.1" 400 743 "-" "Wget/1.13.4 (linux-gnu)"
wget的:
$wget -d localhost ---request begin--- GET / HTTP/1.1 User-Agent: Wget/1.13.4 (linux-gnu) Accept: */* Host: localhost Connection: Keep-Alive ---request end--- $wget -d 127.0.0.1 ---request begin--- GET / HTTP/1.1 User-Agent: Wget/1.13.4 (linux-gnu) Accept: */* Host: 127.0.0.1 Connection: Keep-Alive ---request end---
编辑:
Apacheconfiguration
没有什么不寻常的,它只是一个听取443的虚拟主机
<VirtualHost *:443>
它看起来像你可以强制这与客户端configuration项目:
sni = server_name
http://www.stunnel.org/static/stunnel.html – searchSNI