Supported in default-server: No
+check-send-proxy
+ This option forces emission of a PROXY protocol line with outgoing health
+ checks, regardless of whether the server uses send-proxy or not for the
+ normal traffic. By default, the PROXY protocol is enabled for health checks
+ if it is already enabled for normal traffic and if no "port" nor "addr"
+ directive is present. However, if such a directive is present, the
+ "check-send-proxy" option needs to be used to force the use of the
+ protocol. See also the "send-proxy" option for more information.
+
+ Supported in default-server: No
+
check-ssl
This option forces encryption of all health checks over SSL, regardless of
whether the server uses SSL or not for the normal traffic. This is generally
are supported. Other families such as Unix sockets, will report an UNKNOWN
family. Servers using this option can fully be chained to another instance of
haproxy listening with an "accept-proxy" setting. This setting must not be
- used if the server isn't aware of the protocol. See also the "accept-proxy"
- option of the "bind" keyword.
+ used if the server isn't aware of the protocol. When health checks are sent
+ to the server, the PROXY protocol is automatically used when this option is
+ set, unless there is an explicit "port" or "addr" directive, in which case an
+ explicit "check-send-proxy" directive would also be needed to use the PROXY
+ protocol. See also the "accept-proxy" option of the "bind" keyword.
Supported in default-server: No
short status, code; /* check result, check code */
char desc[HCHK_DESC_LEN]; /* health check descritpion */
int use_ssl; /* use SSL for health checks */
+ int send_proxy; /* send a PROXY protocol header with checks */
} check;
#ifdef USE_OPENSSL
newsrv->state |= SRV_SEND_PROXY;
cur_arg ++;
}
+ else if (!defsrv && !strcmp(args[cur_arg], "check-send-proxy")) {
+ newsrv->check.send_proxy = 1;
+ cur_arg ++;
+ }
else if (!strcmp(args[cur_arg], "weight")) {
int w;
w = atol(args[cur_arg + 1]);
* same as for the production traffic. Otherwise we use raw_sock by
* default, unless one is specified.
*/
- if (!newsrv->check.port && !is_addr(&newsrv->check.addr))
+ if (!newsrv->check.port && !is_addr(&newsrv->check.addr)) {
newsrv->check.use_ssl |= newsrv->use_ssl;
+ newsrv->check.send_proxy |= (newsrv->state & SRV_SEND_PROXY);
+ }
/* try to get the port from check.addr if check.port not set */
if (!newsrv->check.port)