Be able to access proxy client IP (including Lua)
[folly.git] / folly / wangle / acceptor / TransportInfo.h
index c02bac42fbbc5c22f1c062e459641af6507ee4b0..a3b99ca1a08558e39df1667ef3b56f6d5e5cf0f3 100644 (file)
@@ -123,6 +123,12 @@ struct TransportInfo {
    */
   int64_t totalBytes{0};
 
+  /**
+   * If the client passed through one of our L4 proxies (using PROXY Protocol),
+   * then this will contain the IP address of the proxy host.
+   */
+  std::shared_ptr<folly::SocketAddress> clientAddrOriginal;
+
   /**
    * header bytes read
    */