Search squid archive

Squid 2.6 STABLE 6 in reverse-proxy mode with http data content dynamic modification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux