xref: /aosp_15_r20/external/curl/docs/cmdline-opts/haproxy-clientip.md (revision 6236dae45794135f37c4eb022389c904c8b0090d)
1*6236dae4SAndroid Build Coastguard Worker---
2*6236dae4SAndroid Build Coastguard Workerc: Copyright (C) Daniel Stenberg, <[email protected]>, et al.
3*6236dae4SAndroid Build Coastguard WorkerSPDX-License-Identifier: curl
4*6236dae4SAndroid Build Coastguard WorkerLong: haproxy-clientip
5*6236dae4SAndroid Build Coastguard WorkerArg: <ip>
6*6236dae4SAndroid Build Coastguard WorkerHelp: Set address in HAProxy PROXY
7*6236dae4SAndroid Build Coastguard WorkerProtocols: HTTP
8*6236dae4SAndroid Build Coastguard WorkerAdded: 8.2.0
9*6236dae4SAndroid Build Coastguard WorkerCategory: http proxy
10*6236dae4SAndroid Build Coastguard WorkerMulti: single
11*6236dae4SAndroid Build Coastguard WorkerSee-also:
12*6236dae4SAndroid Build Coastguard Worker  - proxy
13*6236dae4SAndroid Build Coastguard WorkerExample:
14*6236dae4SAndroid Build Coastguard Worker  - --haproxy-clientip $IP
15*6236dae4SAndroid Build Coastguard Worker---
16*6236dae4SAndroid Build Coastguard Worker
17*6236dae4SAndroid Build Coastguard Worker# `--haproxy-clientip`
18*6236dae4SAndroid Build Coastguard Worker
19*6236dae4SAndroid Build Coastguard WorkerSets a client IP in HAProxy PROXY protocol v1 header at the beginning of the
20*6236dae4SAndroid Build Coastguard Workerconnection.
21*6236dae4SAndroid Build Coastguard Worker
22*6236dae4SAndroid Build Coastguard WorkerFor valid requests, IPv4 addresses must be indicated as a series of exactly
23*6236dae4SAndroid Build Coastguard Worker4 integers in the range [0..255] inclusive written in decimal representation
24*6236dae4SAndroid Build Coastguard Workerseparated by exactly one dot between each other. Heading zeroes are not
25*6236dae4SAndroid Build Coastguard Workerpermitted in front of numbers in order to avoid any possible confusion
26*6236dae4SAndroid Build Coastguard Workerwith octal numbers. IPv6 addresses must be indicated as series of 4 hexadecimal
27*6236dae4SAndroid Build Coastguard Workerdigits (upper or lower case) delimited by colons between each other, with the
28*6236dae4SAndroid Build Coastguard Workeracceptance of one double colon sequence to replace the largest acceptable range
29*6236dae4SAndroid Build Coastguard Workerof consecutive zeroes. The total number of decoded bits must exactly be 128.
30*6236dae4SAndroid Build Coastguard Worker
31*6236dae4SAndroid Build Coastguard WorkerOtherwise, any string can be accepted for the client IP and get sent.
32*6236dae4SAndroid Build Coastguard Worker
33*6236dae4SAndroid Build Coastguard WorkerIt replaces --haproxy-protocol if used, it is not necessary to specify both flags.
34