Hi all,
I'm trying to use squid in reverse-proxy mode with 2 back-end Web
servers (Web Srv 1 and Web Srv 2),
a remote user can request those servers with Squid public FQDNs:
internet lan
user <-------------------> squid <-------------------> Web Server 1
[squid1-pub-fqdn] [websrv1-priv-fqdn]
<-------------------> Web Server 2
[squid2-pub-fqdn] [websrv2-priv-fqdn]
I have installed and configured squid successfully to map the public
FQDN to the private FQDN.
But, after many unsuccessfull google searches, I would like to know if
it's possible to dynamically modify the HTML content of the HTTP response.
example 1:
1) the user sends a GET request to the Squid1 public FQDN :
HTTP 1.1 GET /
2) Squid forwards this request to the WebSrv1
3) the WEB Srv 1 sends a HTML page to Squid :
HTTP 1.1 200 OK
<html>
<body>
<a href=***WebSrv2-priv-fqdn***>
</body>
</html>
4) Squid parse the HTML data to modify
HTTP 1.1 200 OK
<html>
<body>
<a href=***WebSrv2-priv-fqdn***>
</body>
</html>
into
HTTP 1.1 200 OK
<html>
<body>
<a href=***Squid2-pub-fqdn***>
</body>
</html>
and forwards the modified page to the user.
example 2:
1) idem
2) idem
3) the WEB Srv 1 sends a HTTP redirection to the Web Srv 2:
HTTP 1.1 302 move Temporally
Location : ***WebSrv2-priv-fqdn***
4) Squid modify the location header
Location : ***WebSrv2-priv-fqdn*** into
Location : ***Squid2-pub-fqdn***
and forwards the modified redirection to the user.
Is it a Squid possible feature ?
If not, is it possible to dev (Existant API ? ) a module that can parse
the http responses and dynamically modify theirs content ?
Thanks
Sylvain
Received on Tue Apr 22 2008 - 14:49:09 MDT
This archive was generated by hypermail 2.2.0 : Thu May 01 2008 - 12:00:04 MDT