我有一个有趣的要求是通过隧道连接openssl s_client
到https
网站。https
proxy_host.com
我已经设法通过这个代理target_host.com
(
但是,当我尝试发送GET / HTTP/1.1
后跟两个时enter
,什么都没有发送(或者什么都没有到达 target_host.
以下是我目前正在使用的内容:
echo "CONNECT target_host.com:443 HTTP/1.1\r\nHost:proxy_host.com\r\nConnection: Keep-Alive\r\n\r\n" | openssl s_client -ign_eof -connect proxy_host.com:443
我只得到:
HTTP/1.0 200
Connection Established
Proxy-agent: Apache/2.2.15 (Red Hat)
我必须添加 Host 标头,因为这是我的代理的要求。最终,我想向网络服务器发送一个 GET 请求,但我正在使用 nc 来查看正在通过什么。