hackney icon indicating copy to clipboard operation
hackney copied to clipboard

Capturing custom headers sent on CONNECT by proxy server when accessing https host

Open youroff opened this issue 8 years ago • 0 comments

I'm trying use this proxy service with hackney: http://docs.proxymesh.com/article/7-request-response-headers#https It reports current IP with custom header. When I call http host, it's appended, but this is obviously not the case when I call https. I managed to connect manually:

    opts = [
      connect_host: 'some_https_host',
      connect_port: 443,
      connect_transport: :hackney_tcp,
      connect_user: "proxy_mesh_user",
      connect_pass: "proxy_mesh_pass"
    ]
    opts1 = [connect_options: opts]
    {:ok, ref} = :hackney_connect.connect(:hackney_http_connect, host, port, opts1, true)

I assume somehow custom header is returned at this point (though it doesn't show in trace), but how do I get it?

youroff avatar Sep 28 '17 00:09 youroff