在polipo http代理之前使用HAproxy(SSL)

时间:2018-07-25 19:11:42

标签: ssl haproxy polipo

im目前正在尝试为自己构建一个应用程序,该应用程序能够平衡我的polipo进程之间的流量。带有http的所有东西都可以找到,但是一旦我转到https,haproxy就会简单地显示“ 400错误”,请问为什么?

这是我的will;)设置:

                                                <-> Polipo 1 (http) 
Client <----> (https) HAproxy <----> (http)     <-> Polipo 2 (http)
                                                <-> Polipo 3 (http)

这是我的HAproxy配置:

global
  maxconn 4096 
  daemon
  tune.ssl.default-dh-param 2048
  ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
  ssl-default-bind-options no-sslv3
  pidfile <%= pid_file %>

defaults
  mode http
  maxconn 4096
  option  httplog
  option  dontlognull
  option forwardfor
  option http-server-close
  retries 3
  timeout connect 5s
  timeout client 60s
  timeout server 60s




frontend rotating_proxies
  bind *:<%= port %> ssl crt /etc/ssl/private/mydomain.pem
  reqadd X-Forwarded-Proto:\ https
  default_backend polipo
  option http_proxy


backend polipo
  option http_proxy
  http-response replace-value Location ^http://(.*)$ https://\1
  redirect scheme https if !{ ssl_fc }
  balance leastconn



  <% backends.each do |b| %>
  server <%= b[:name] %><%= b[:port] %> <%= b[:addr] %>:<%= b[:port] %> check maxconn 4096
  <% end %>

我不是100%关于

  

http响应替换值位置^ http://(。*)$ https:// \ 1

这到底是什么意思? polipo仅在讲http(未加密)。 HAproxy应该只进行ssl卸载。

谢谢。

0 个答案:

没有答案
相关问题