1

我使用标准 httpd BusyBox 作为在 localhost:80 上运行的网络服务器。httpd 不支持 https。

为了在某​​些客户端和我的 httpd 服务器之间建立连接,我使用以下配置文件构建并运行 stunnel:

setuid = www-data
setgid = www-data

debug = 7

output = /var/log/stunnel.log

cert = /etc/stunnel/cert/stunnel.pem
;key = /etc/stunnel/cert/serverkey.pem

sslVersion = all

pid = /tmp/stunnel.pid

socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

;CAfile = /etc/stunnel/cert/servercert.pem
;verify = 0

;options = NO_SSLv2


[https]
accept = 443
connect = 80
TIMEOUTclose = 0

它运行成功,但是当我尝试使用浏览器连接到服务器时,我不能这样做。

Log is following:
1970.01.01 03:04:58 LOG7[main]: Service [https] accepted (FD=19) from 192.168.0.5:48730
1970.01.01 03:04:58 LOG7[11]: Service [https] started
1970.01.01 03:04:58 LOG5[11]: Service [https] accepted connection from 192.168.0.5:48730
1970.01.01 03:04:58 LOG7[11]: SSL state (accept): before/accept initialization
1970.01.01 03:04:59 LOG7[11]: SNI: no virtual services defined
1970.01.01 03:04:59 LOG7[11]: SSL state (accept): SSLv3 read client hello A
1970.01.01 03:04:59 LOG7[main]: Service [https] accepted (FD=20) from 192.168.0.5:48734
1970.01.01 03:04:59 LOG7[11]: SSL state (accept): SSLv3 write server hello A
1970.01.01 03:04:59 LOG7[12]: Service [https] started
1970.01.01 03:04:59 LOG7[11]: SSL state (accept): SSLv3 write certificate A
1970.01.01 03:05:00 LOG5[12]: Service [https] accepted connection from 192.168.0.5:48734
1970.01.01 03:05:00 LOG7[12]: SSL state (accept): before/accept initialization
1970.01.01 03:05:00 LOG7[12]: SNI: no virtual services defined
1970.01.01 03:05:00 LOG7[12]: SSL state (accept): SSLv3 read client hello A
1970.01.01 03:05:01 LOG7[12]: SSL state (accept): SSLv3 write server hello A
1970.01.01 03:05:01 LOG7[12]: SSL state (accept): SSLv3 write certificate A
1970.01.01 03:05:33 LOG7[main]: Service [https] accepted (FD=21) from 192.168.0.5:48738
1970.01.01 03:05:33 LOG7[13]: Service [https] started
1970.01.01 03:05:33 LOG5[13]: Service [https] accepted connection from 192.168.0.5:48738
1970.01.01 03:05:33 LOG7[13]: SSL state (accept): before/accept initialization
1970.01.01 03:05:34 LOG7[13]: SNI: no virtual services defined
1970.01.01 03:05:34 LOG7[13]: SSL state (accept): SSLv3 read client hello A
1970.01.01 03:05:34 LOG7[13]: SSL state (accept): SSLv3 write server hello A
1970.01.01 03:05:35 LOG7[13]: SSL state (accept): SSLv3 write certificate A

有什么问题吗?是否可以仅在服务器端使用 stunnel 而不在客户端运行它?

4

0 回答 0