]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: config: explain how to deal with "transparent" deprecation
authorWilly Tarreau <w@1wt.eu>
Thu, 26 Jun 2025 12:50:44 +0000 (14:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jun 2025 12:52:07 +0000 (14:52 +0200)
The explanations for the "option transparent" keyword were a bit scarce
regarding deprecation, so let's explain how to replace it with a server
line that does the same.

doc/configuration.txt

index a7621f7b9646f220788a23bd009742c4998b7392..644db57a2462e3676b4af723dc6cff34bd01b018 100644 (file)
@@ -11211,8 +11211,8 @@ option tcplog [clf]
   See also :  "option httplog", and section 8 about logging.
 
 
-option transparent
-no option transparent
+option transparent        (deprecated)
+no option transparent     (deprecated)
   Enable client-side transparent proxying
 
   May be used in the following contexts: tcp, http
@@ -11234,6 +11234,19 @@ no option transparent
   Note that contrary to a common belief, this option does NOT make HAProxy
   present the client's IP to the server when establishing the connection.
 
+  As of 3.3, this option is now deprecated because it used to suffer from a
+  number of internal technical limitations. Using it will emit a warning, which
+  can be avoided if really needed via the "expose-deprecated-directives" global
+  keyword.
+
+  The correct approach is to declare a server on address 0.0.0.0, which will
+  take care of connecting to the expected destination address. A server will
+  also properly handle idle connections to the target servers.
+
+  Example:
+       # option transparent  ## before 3.3
+       server transparent 0.0.0.0
+
   See also: the "usesrc" argument of the "source" keyword, and the
             "transparent" option of the "bind" keyword.