haproxy 代理 baidu 报错

查看 64|回复 2
作者:dunhanson   
为什么代理百度?哈哈测试而已,真实肯定不会代理百度。
1 、运行
docker run -d \
-v /etc/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg \
--sysctl net.ipv4.ip_unprivileged_port_start=0 \
--name haproxy haproxy:2.8.0-alpine3.18
2 、配置
frontend https_frontend
  bind *:443
  mode tcp
  timeout client 120s
  timeout connect 120s
  timeout server 120s
  tcp-request inspect-delay 5s
  tcp-request content accept if { req_ssl_hello_type 1 }
  use_backend baidu_backend if { req_ssl_sni -i www.baidu.com }
backend baidu_backend
  mode tcp
  timeout client 120s
  timeout connect 120s
  timeout server 120s
  server baidu www.baidu.com:443 send-proxy-v2 check ssl verify none
3 、报错信息

timeout, haproxy, Server, 报错

dunhanson
OP
  
curl https://www.baidu.com
目前可以了,但是本地测试报错
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
dunhanson
OP
  
haproxy 程序日志是正常的
--------
[email protected]:/etc/haproxy# docker logs haproxy
[NOTICE] (1) : New worker (8) forked
[NOTICE] (1) : Loading success.
您需要登录后才可以回帖 登录 | 立即注册

返回顶部