El Blog de Sepa Informatica Squid – Proxy Transparente – C/ certificado

Squid – Proxy Transparente – C/ certificado

| | 0 Comments| 16:41


Al fin entendi!!! jejej si si, medio duro para entender las cosas.

Squid.conf:

https_port 443 cert=[path_certificado] key=[path_key] protocol=http vhost defaultsite=[algun_default_site]

cache_peer [sitio_de_intranet] parent 80 0 originserver

url_rewrite_program [path]/url_rewriter.php

acl [nombre] urlgroup [nombre]

cache_peer_access [sitio_de_intranet] allow [nombre]

url_rewriter.php:

#!/usr/bin/php -q
< ? define('STDIN', fopen("php://stdin", "r")); while($line = fgets(STDIN, 256)){ $input = preg_split("/\s+/", $line); $url = parse_url($input[0]); $newpath = preg_replace("/\/\w+(.*)/", "$1", $url[path]); #print "$url[host]\n"; #print "$url[scheme]\n"; #print "$url[path]\n"; #print "$newpath\n"; if(preg_match("/\/[nombre].*/", $url[path]) > 0){
print "![nombre]!http://[url_completa_del_sitio_de_intranet]$newpath\n";
}
}

fclose(STDIN);
exit(0);

?>

Agradesco la ayuda de Diego Woitasen

Leave a Reply

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Post