Revision [3879]
Last edited on 2010-11-03 01:16:58 by KenFongAdditions:
===Squid web cache and proxy===
Revision [3878]
Edited on 2010-11-03 01:14:56 by KenFongAdditions:
Install on Ubuntu-9.10 - yea I hate IPv6, or any other half-ass bullshit.
--sysconfdir=/etc/squid3 --localstatedir=/var --disable-ipv6
--sysconfdir=/etc/squid3 --localstatedir=/var --disable-ipv6
Deletions:
--sysconfdir=/etc/squid3 --localstatedir=/var
Revision [3669]
Edited on 2010-03-12 08:03:53 by KenFongAdditions:
===Squid-3.0===
Install on Ubuntu-9.10
./configure --with-aio --with-openssl=/usr --with-large-files \
--enable-stacktraces --enable-linux-netfilter --enable-ssl \
--enable-kill-parent-hack --enable-delay-pools \
--enable-storeio=ufs,aufs --enable-icmp \
--sysconfdir=/etc/squid3 --localstatedir=/var
Install on Ubuntu-9.10
./configure --with-aio --with-openssl=/usr --with-large-files \
--enable-stacktraces --enable-linux-netfilter --enable-ssl \
--enable-kill-parent-hack --enable-delay-pools \
--enable-storeio=ufs,aufs --enable-icmp \
--sysconfdir=/etc/squid3 --localstatedir=/var
Revision [3581]
Edited on 2009-11-20 09:33:34 by WikiAdminAdditions:
===cache_peer===
One can configure squid to pass request to another squid based on the dst domain:
# define cache_peer
cache_peer 10.8.0.6 parent 3128 3130 proxy-only name=xxx-squid
# define list of domains
acl dp-domains dstdomain .xxx.net
acl dp-domains dstdomain .xxx.com
# tell squid to use xxx-squid for xxx-domains
cache_peer_access xxx-squid allow xxx-domains
# Stop squid from trying to DIRECT ssl requests for xxx-domains
never_direct allow xxx-domains
One can configure squid to pass request to another squid based on the dst domain:
# define cache_peer
cache_peer 10.8.0.6 parent 3128 3130 proxy-only name=xxx-squid
# define list of domains
acl dp-domains dstdomain .xxx.net
acl dp-domains dstdomain .xxx.com
# tell squid to use xxx-squid for xxx-domains
cache_peer_access xxx-squid allow xxx-domains
# Stop squid from trying to DIRECT ssl requests for xxx-domains
never_direct allow xxx-domains
Revision [1961]
Edited on 2008-09-19 21:30:10 by WikiAdminAdditions:
Then just create the passwd file with **htpasswd**
Revision [1960]
Edited on 2008-09-19 21:26:11 by WikiAdminAdditions:
tcp_outgoing_address 1.2.3.4 # if you want to mask your outgoing address
Revision [1959]
Edited on 2008-09-19 20:41:52 by WikiAdminAdditions:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm My Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive on
auth_param basic children 5
auth_param basic realm My Proxy Server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive on
Deletions:
authenticate_program /usr/lib/squid/ncsa_auth /etc/squid/passwd
Revision [1958]
Edited on 2008-09-19 20:38:55 by WikiAdminAdditions:
===Squid authentication (for forward proxies)===
From squid's source
cd helpers/basic_auth/NCSA/
make
make install
Then add these into squid.conf
proxy_auth_realm My Proxy Server
acl authusers proxy_auth REQUIRED
http_access allow authusers
authenticate_program /usr/lib/squid/ncsa_auth /etc/squid/passwd
From squid's source
cd helpers/basic_auth/NCSA/
make
make install
Then add these into squid.conf
proxy_auth_realm My Proxy Server
acl authusers proxy_auth REQUIRED
http_access allow authusers
authenticate_program /usr/lib/squid/ncsa_auth /etc/squid/passwd
Revision [1957]
Edited on 2008-09-19 20:26:45 by WikiAdminAdditions:
""""
Deletions:
Revision [1956]
Edited on 2008-09-19 20:26:13 by WikiAdminAdditions:
==Squid Redhat init script==
''''
''''
Revision [1955]
Edited on 2008-09-19 20:24:51 by WikiAdminAdditions:
./configure \
--localstatedir=/var \
--sysconfdir=/etc/squid \
--enable-icmp \
--enable-ssl \
--enable-large-cache-files \
--enable-storeio=ufs,aufs
--localstatedir=/var \
--sysconfdir=/etc/squid \
--enable-icmp \
--enable-ssl \
--enable-large-cache-files \
--enable-storeio=ufs,aufs
Deletions:
Revision [1944]
Edited on 2008-09-11 09:06:06 by WikiAdminAdditions:
httpd_accel_uses_host_header on
Revision [1924]
Edited on 2008-09-03 20:28:52 by WikiAdminAdditions:
===Squid2.7===
My install on FreeBSD:
./configure --enable-icmp --enable-ssl --enable-large-cache-files --enable-storeio=ufs,aufs
My install on FreeBSD:
./configure --enable-icmp --enable-ssl --enable-large-cache-files --enable-storeio=ufs,aufs
Revision [1875]
Edited on 2008-08-07 01:54:50 by WikiAdminAdditions:
==Squid URL acl==
Set up the acl the http_access list
acl whitelist_domains dstdomain "/etc/squid/whitelist.domains"
acl blacklist_domains dstdomain "/etc/squid/blacklist.domains"
http_access deny blacklist_domains
http_access allow trusted_net whitelist_domains
Then create the .domains files
.blah.com
.foo.com
Set up the acl the http_access list
acl whitelist_domains dstdomain "/etc/squid/whitelist.domains"
acl blacklist_domains dstdomain "/etc/squid/blacklist.domains"
http_access deny blacklist_domains
http_access allow trusted_net whitelist_domains
Then create the .domains files
.blah.com
.foo.com
Revision [1608]
Edited on 2008-04-07 03:56:43 by WikiAdminAdditions:
Read: Squid-2.6 configuration manual http://www.visolve.com/squid/squid26/contents.php
Deletions:
Revision [1607]
Edited on 2008-04-07 03:22:01 by WikiAdminNo differences.
Revision [1606]
Edited on 2008-04-07 03:21:36 by WikiAdminAdditions:
===Setting up squid-2.6 as reverse proxy===
I'm not gonna bore you with the details. Just add these in additional to the stock config file.
http_port SQUID_EXTERNAL_IP:80 vhost vport
cache_peer REAL_WEB_IP parent 80 0 originserver default
acl valid_dst dstdomain .accelerated.com
http_access allow valid_dst
===Setting up Squid 2.4/2.5 as reversed proxy===
I'm not gonna bore you with the details. Just add these in additional to the stock config file.
http_port SQUID_EXTERNAL_IP:80 vhost vport
cache_peer REAL_WEB_IP parent 80 0 originserver default
acl valid_dst dstdomain .accelerated.com
http_access allow valid_dst
===Setting up Squid 2.4/2.5 as reversed proxy===
Deletions:
Revision [1497]
Edited on 2008-03-16 21:21:01 by WikiAdminAdditions:
===Squid logs in UTC===
Easy.
%%(perl;convert_utc.pl)
#! /usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;
Easy.
%%(perl;convert_utc.pl)
#! /usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;
Revision [1142]
Edited on 2007-11-10 20:37:39 by disabled (unregistered user)Additions:
oracel