On 12/21/2015 01:20 AM, Willy Tarreau wrote:
On Sun, Dec 20, 2015 at 09:31:45PM -0500, Brendan Kearney wrote:
On 12/05/2015 03:42 PM, Brendan Kearney wrote:
I am trying to use HAProxy to perform http interception and
transparently proxy outbound http traffic.  i am having a dog of a
time trying to get this working.  I need to rewrite the GET line on a
request so that the request is for the absolute URL, and not the
relative URI.

i found this article:
http://www.haproxy.com/doc/aloha/7.0/haproxy/http_rewriting.html#rewriting-http-urls


and the "Set the URI" section of that page is exactly what i want to
do, but i need to do it in the community version of HAProxy, not Aloha.

i cant seem to get the process down on how to capture or extract the
request URL, and rewrite the GET line to contain that info. Can
someone point me in the right direction on what i  need to do?

thanks in advance,

brendan
no feedback on how to do this?  this would be a really helpful function
to have working.  any help is appreciated.
Did you try what you pointed above ? What you find for ALOHA will most
often work on a recent mainline haproxy since aloha includes haproxy plus
some backports. What version are you using ?

That just makes me realize that if people are linking to ALOHA docs, we
should indicate in the aloha docs what mainline version of haproxy is
included in each aloha version. I'll check this with Baptiste.

Regards,
Willy

rpm -qi haproxy
Name        : haproxy
Version     : 1.5.12
Release     : 1.fc20
Architecture: x86_64

i did try and it seems the version might be at issue..

This config stanza:

backend tproxy
        acl https ssl_fc

http-request set-uri http://%[req.hdr(Host)]%[path]?%[query] unless https

        server proxy1 192.168.88.1:3128 check inter 10000
        server proxy2 192.168.88.2:3128 check inter 10000

results in the below error message:

[ALERT] 354/105146 (26637) : parsing [/etc/haproxy/haproxy.cfg:149]: 'http-request' expects 'allow', 'deny', 'auth', 'redirect', 'tarpit', 'add-header', 'set-header', 'replace-header', 'replace-value', 'set-nice', 'set-tos', 'set-mark', 'set-log-level', 'add-acl', 'del-acl', 'del-map', 'set-map', but got 'set-uri'. [ALERT] 354/105146 (26637) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg

Reply via email to