Be able to access proxy client IP (including Lua)
Summary: Pass TransportInfo object through connection setup. This allows us to pass along additional info from the setup if necessary. Test Plan: Run proxygen on my devserver listening on ipv4 and ipv6 for ports 80 and 443. Configure it to run a lua request rule with the following lines: io.stderr:write("jonlog: proxy " .. conn:getClientAddrOriginal() .. "\n") io.stderr:write("jonlog: client " .. request:getClientIPStr() .. "\n") Run haproxy also on my devserver, listening on ports 8555-8558, with each forwarding to one of the four pairs (ipv4-localhost/ipv6-localhost, 80/443) From my laptop, run curls against each of these four endpoints and make sure that we print out "127.0.0.1" as the proxy IP, and my laptop's IP as the client IP. Reviewed By: cgheorghe@fb.com Subscribers: jsedgwick, yfeldblum, trunkagent, ruibalp, bmatheny, folly-diffs@, dsp, nbm FB internal diff: D1746590 Tasks: 5688127 Signature: t1:1746590:1423695880:f647964d95636a69a00304e144aef71ee0213d28
Showing
Please register or sign in to comment