installation serveur : SQUID

apt-get install squid

mode autoriser ip:
emacs /etc/squid/squid.conf
Pour autoriser une ip, avant cette ligne : http_access deny all
mettre :
acl allowed_ips src 82.224.239.198
http_access allow allowed_ips

mode accès user:
htpasswd -cb /etc/squid/htpasswd raf XXXXXX
chmod o+r /etc/squid/htpasswd

emacs /etc/squid/squid.conf
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpass\
wd
auth_param basic children 5 startup=5 idle=1
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users

service squid restart

anonyme :
forwarded_for = delete
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all

# PROXY.PAC
emacs .htaccess
AddType application/x-ns-proxy-autoconfig pac

emacs proxy.pac
function FindProxyForURL(url, host) {
if ((shExpMatch(host, "localhost")) ||
(shExpMatch(host, "*.local")) ||
(host == "127.0.0.1")) {
return "DIRECT";
}

if (isInNet(host, "127.0.0.1", "255.255.255.0"))
{
return "DIRECT";
}

return "PROXY 46.105.126.96:3128";
}

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.