if(data->set.str[STRING_HAPROXY_CLIENT_IP])
client_ip = data->set.str[STRING_HAPROXY_CLIENT_IP];
else
- client_ip = data->info.conn_primary_ip;
+ client_ip = data->info.conn_local_ip;
result = Curl_dyn_addf(&ctx->data_out, "PROXY %s %s %s %i %i\r\n",
tcp_version,
- data->info.conn_local_ip,
client_ip,
+ data->info.conn_primary_ip,
data->info.conn_local_port,
data->info.conn_primary_port);
# Verify data after the test has been "shot"
<verify>
<strippart>
-s/^PROXY TCP4 %CLIENTIP 192.168.1.1 (\d*) %HTTPPORT/proxy-line/
+s/^PROXY TCP4 192.168.1.1 %HOSTIP (\d*) %HTTPPORT/proxy-line/
</strippart>
<protocol>
proxy-line\r
# Strip off the (random) local port number. This test used to use a fixed
# local port number that frequently causes the test to fail
<strippart>
-s/PROXY TCP6 ::1 2001:db8:: (\d+) (\d+)/PROXY TCP6 ::1 2001:db8:: $2/
+s/^PROXY TCP6 2001:db8:: ::1 (\d*) %HTTP6PORT/proxy-line/
</strippart>
<protocol>
-PROXY TCP6 ::1 2001:db8:: %HTTP6PORT\r
+proxy-line\r
GET /%TESTNUMBER HTTP/1.1\r
Host: %HOST6IP:%HTTP6PORT\r
User-Agent: curl/%VERSION\r