HTTP Proxy
约 1 分钟阅读
- HTTP CONNECT 方法
- 只能 HTTP 1.1
CONNECT github.com:443 HTTP/1.1
Host: github.com:443
User-Agent: curl/7.64.1
Proxy-Connection: Keep-AliveHTTP/1.1 200 Connection Established
Proxy-agent: nginx
X-Proxy-Connected-Addr: 13.229.188.59:443HAProxy
- Upstream
- haproxy/haproxy#1542GitHub Issuehaproxy/haproxy#1542
- 2.2
http-tunnel- HN #23817444Hacker NewsHacker News #23817444Hacker News
Nginx
- chobits/ngx_http_proxy_connect_moduleGitHubchobits/ngx_http_proxy_connect_module
- 支持 HTTP CONNECT
nginx -V | grep http_proxy_connect_moduleserver {
listen 443;
# dns resolver used by forward proxying
resolver 114.114.114.114;
# forward proxy for CONNECT request
proxy_connect;
proxy_connect_allow 443;
proxy_connect_connect_timeout 10s;
proxy_connect_read_timeout 10s;
proxy_connect_send_timeout 10s;
# forward proxy for non-CONNECT request
location / {
proxy_pass http://$host;
proxy_set_header Host $host;
}
}关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub2 条
- chobits/ngx_http_proxy_connect_modulegithub.com/chobits/ngx_http_proxy_connect_module
- haproxy/haproxy#1542github.com/haproxy/haproxy/issues/1542
Hacker News1 条
- Hacker News #23817444HN #23817444