Hi.
------ Originalnachricht ------
Von: "Moemen MHEDHBI" <mmhed...@haproxy.com>
An: "Gbg" <garb...@gmx.de>; haproxy@formilux.org
Gesendet: 11.12.2017 18:45:16
Betreff: Re: Use haproxy 1.8.x to balance web applications only
reachable through Internet proxy
On 11/12/2017 17:21, Gbg wrote:
Hello Moemen,
unless I got this wrong this isn't the setup I search for. I
don't need haproxy to *be* a proxy but rather *use* a proxy while
serving content over http as a reverse proxy
Perhaps I should have given the thread this name
I get your point, HAProxy does not support using a "http/socks
proxy".
HAProxy intends to be "an HTTP reverse-proxy" retrieving resources
from backend servers and the requests sent to a server are different
from the ones sent to a "forward proxy".
That being said HAProxy can still "pass" proxy requests to
http/socks proxies if the client is configured to use a proxy.
How about to use delegate ( http://delegate.org/documents/ ) for this,
just as an idea.
haproxy -> delegate FORWARD=... CONNECT=proxy:<your-proxy>
http://delegate.org/delegate/Manual.shtml?FORWARD
http://delegate.org/delegate/Manual.shtml?CONNECT
I know it's not that elegant but it could work.
++
Am 11. Dezember 2017 16:56:12 MEZ schrieb Moemen MHEDHBI
<mmhed...@haproxy.com> <mailto:mmhed...@haproxy.com>:
On 11/12/2017 15:02, Gbg wrote:
I need to contact applications through a socks or http proxy.
My current setup looks like this but only works when the Computer
haproxy runs on has direct Internet connection (which is not the case
in our datacenter, I tried this at home)
frontend main
bind *:8000
acl is_extweb1 path_beg -i /policies
acl is_extweb2 path_beg -i /produkte
use_backend externalweb1 if is_extweb1
use_backend externalweb2 if is_extweb2
backend externalweb1
server static www.google.com:80 check
backend externalweb2
server static www.gmx.net:80 check
There is an SO post which addresses the same question and provides
some more details:
https://stackoverflow.com/questions/47605766/use-haproxy-as-an-reverse-proxy-with-an-application-behind-internet-proxy
Hi Gbg,
For this to work you need the client (browser for example) to be aware
of the forward proxy.
So first you need to configure the client to use HAProxy as a forward
proxy, then in the HAProxy conf you need to use the forward proxy in the
backend and the configuration may look like this:
frontend main
bind *:8000
acl is_extweb path_beg -i /policies /produkte
use_backend forward_proxy if is_extweb
default_backend another_backend
backend forward_proxy
server static < IP-of-the-forward-proxy > : < Port > check
++
Moemen MHEDHBI
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail
gesendet.
--
Moemen MHEDHBI