a Little Notes

Ikon

TUlisan dan Contekan

install squid 2.7 debian etch

squid2

Langkah-langkah :

  • #apt-get update
  • #apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential libselinux1 libselinux1-dev debhelper linuxdoc-tools libcap-dev

AMBIL SOURCE CODE Squid (Squid 2.7 stable-4)

  • #cd /usr/src
  • #wget -c http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE4.tar.gz
  • #tar zxvf squid-2.7.STABLE4.tar.gz
  • #cd <squid-dir>
  • #./configure –prefix=/usr –exec_prefix=/usr –bindir=/usr/sbin –sbindir=/usr/sbin –libexecdir=/usr/lib/squid –sysconfdir=/etc/squid –localstatedir=/var/spool/squid –datadir=/usr/share/squid –enable-linux-netfilter –enable-storeio=ufs,aufs,diskd,null –enable-arp-acl –enable-removal-policies=lru,heap –enable-snmp –enable-delay-pools –enable-htcp –enable-poll –enable-cache-digests –enable-underscores –enable-referer-log –enable-useragent-log –enable-auth=”basic,digest,ntlm” –enable-carp –enable-large-files
  • #make all
  • #make install

Setelah proses compile selesai kita bisa melakukan konfigurasi squid yang berada di /etc/squid/squid.conf. Sebelum mengedit pastikan anda melakukan hal-hal sebagai berikut ini.

  • #mkdir /var/log/squid
  • #chown -R proxy.proxy /var/log/squid
  • #chown -R proxy.proxy /<cache-dir>
  • ganti http_port 10.10.1.2:8080 transparent >> sesuai dengan IP Linux kearah client

Contoh file Squid.Conf

##SQUID 2.7 Debian Etch #
##HANDRI AGUSTIAN #
##Using Squid 2.7 With Zph #
## #

##PORT
http_port 8080 transparent
icp_port 3130
icp_query_timeout 0
mcast_icp_query_timeout 2000
dead_peer_timeout 10 seconds

#============================================================$
#hierarchy_stoplist cgi-bin ?
#acl QUERY urlpath_regex cgi-bin \?
#cache deny QUERY
#============================================================$

#============================================================$
# LOGFILE PATHNAMES AND CACHE DIRECTORIES
#============================================================$
cache_dir aufs /cache1/ 40000 16 256
cache_dir aufs /cache2/ 40000 16 256
cache_dir aufs /cache3/ 40000 16 256

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /etc/squid/mime.conf
pid_filename /var/run/squid.pid
log_fqdn off
log_mime_hdrs off
log_ip_on_direct off
logfile_rotate 7
debug_options ALL,1
buffered_logs off
emulate_httpd_log off

#============================================================$
# FTP section
#============================================================$
ftp_user anonymous@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on

#============================================================$
# DNS resolution section
#============================================================$
#cache_dns_program /squid/libexec/dnsserver
#dns_children 24
dns_nameservers 202.134.1.10 202.134.2.5 202.134.0.155
#============================================================$

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98
negative_ttl 3 minutes
positive_dns_ttl 53 seconds
negative_dns_ttl 29 seconds
forward_timeout 4 minutes
connect_timeout 2 minutes
peer_connect_timeout 1 minutes
pconn_timeout 120 seconds
shutdown_lifetime 10 seconds
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 1 minute
client_lifetime 60 minutes
half_closed_clients off

##ACL LIST NETWORK

#=================================================================$
#DIRECT IP/DOMAIN LOKAL
#==================================================================$

#acl local-dst dst semuaalamatlokal semuaalamatipygdekat
#acl local-domain dstdomain localhost domain-anda.com isp-anda.com domainku.web.id

#always_direct allow localhost local-dst local-domain
#always_direct deny all

#===================================================================$
#DEFAULT ACL
#===================================================================$
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all

#===================================================================$
#To Mikrotik

#===================================================================$
acl mikrotik src 10.10.1.0/30
http_access allow mikrotik

#=============================================================$
##YOURTUBE + PhotoBucket CACHE
#=============================================================$

acl store_rewrite_list url_regex ^http://(.*?)/get_video\?
acl store_rewrite_list url_regex ^http://(.*?)/videodownload\?
acl store_rewrite_list url_regex ^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\?
acl store_rewrite_list url_regex ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\?

cache allow store_rewrite_list
cache allow all

storeurl_access allow store_rewrite_list
storeurl_access deny all
storeurl_rewrite_program /usr/local/bin/store_url_rewrite

#============================================================$
# Parameter Administratif $
#============================================================$
cache_mgr idolanetwork@gmail.com
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.provider.net
unique_hostname support@provider.net

#=============================================================$
#TRANSPARENT PROXY MODE 4 Ver 2.6
#=============================================================$
http_port 10.10.1.2:8080 transparent
httpd_accel_no_pmtu_disc on
half_closed_clients off
header_access From deny all
header_access Referer deny all
header_access Server deny all
header_access WWW-Authenticate deny all
header_access Link deny all
header_access Via deny all
header_access X-Forwarded-For deny all
header_access Accept-Encoding deny all
header_access User-Agent deny all
header_replace User-Agent Mozilla/5.0 (compatible; MSIE 6.0)
header_access Accept deny all
header_replace Accept */*
header_access Accept-Language deny all
header_replace Accept-Language id, en

#============================================================$
# ACCELERATOR
#============================================================$

memory_pools off
forwarded_for off
log_icp_queries off
icp_hit_stale on
minimum_direct_hops 4
minimum_direct_rtt 400
store_avg_object_size 13 KB
store_objects_per_bucket 20
client_db on
netdb_low 9900
netdb_high 10000
netdb_ping_period 30 seconds
query_icmp off
pipeline_prefetch on
reload_into_ims on
vary_ignore_expire on
max_open_disk_fds 100
nonhierarchical_direct on
prefer_direct off

#============================================================$
# OPTIONS WHICH AFFECT THE CACHE SIZE
#============================================================$
cache_mem 6 MB
maximum_object_size 250 MB
maximum_object_size_in_memory 32 KB
cache_swap_low 98%
cache_swap_high 99%
store_dir_select_algorithm round-robin
ipcache_size 2048
ipcache_low 98
ipcache_high 99
fqdncache_size 2048
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

#============================================================$
# SNMP
#============================================================$
acl snmpcommunity snmp_community public
snmp_port 3401
snmp_access allow snmpcommunity localhost
snmp_access deny all

#=============================================================$
#Block Iklan menggunakan Adzapper
#=============================================================$
#url_rewrite_program /usr/bin/adzapper

#============================================================$
#ZPH
#============================================================$
#tcp_outgoing_tos 0x30 localnet
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136

#============================================================$
# Refresh Rate
#============================================================$
#Youtube
refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videodownload\? 10080 90% 999999 override-expire ignore-no-cache ignore-private

#Photo Bucket
refresh_pattern ^http://i(.*?).photobucket.com/albums/(.*?)/(.*?)/(.*?)\? 43200 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://vid(.*?).photobucket.com/albums/(.*?)/(.*?)\? 43200 90% 999999 override-expire ignore-no-cache ignore-private

#=============================================================$
#image
#=============================================================$
refresh_pattern -i \.(swf|png|jpg|jpeg|bmp|tiff|png|gif) 43200 75% 129600 override-expire override-lastmod ignore-reload reload-into-ims

#=============================================================$
#dokumen
#=============================================================$
refresh_pattern -i \.(doc|xls|ppt|ods|odt|odp|pdf) 43200 75% 129600 override-expire override-lastmod ignore-reload reload-into-ims
#=============================================================$
#multimedia
#=============================================================$
refresh_pattern -i \.(mov|mpg|mpeg|flv|avi|mp3|3gp|sis|wma|3gp|mp4) 43200 75% 129600 override-expire override-lastmod ignore-reload reload-into-ims
#=============================================================$
#compression
#=============================================================$
refresh_pattern -i \.(zip|rar|ace|bz|bz2|tar|gz|exe|rpm|deb|bin|cab) 43200 75% 129600 override-expire override-lastmod ignore-reload reload-into-ims
#=============================================================$
#web default eks
#=============================================================$
refresh_pattern -i (.*html$|.*htm|.*shtml|.*aspx|.*asp|.*php) 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
#=============================================================$
#situs internet validasi 24 jam – lama penyimpanan 7 hari
#=============================================================$
refresh_pattern ^http://*.google.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.google.co.id/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.wordpress.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.youtube.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.blogger.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.wikipedia.*/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.facebook.*/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.wikimapia.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.astaga.*/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*korea.*/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.akamai.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.windowsmedia.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.googlesyndication.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.plasa.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.telkom.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.friendster.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.detiksport.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.kompas.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.detiknews.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.photobucket.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.detikhot.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.kapanlagi.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.okezone.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.indowebster.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.telkomspeedy.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.imagevenue.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.flickr.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.imageshack.us/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.usercash.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.googlesyndication.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.co.cc/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.21cineplex.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.saatchi-gallery.co.uk/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.onemanga.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.jobsdb.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.imeem.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.download.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.amazon.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.friendster-layouts.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.geocities.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.redtube.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.files.wordpress.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://indonetwork.co.id/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://gudanglagu.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://megaupload.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.karir.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.myspace.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.multiply.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.rapidshare.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.4shared.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.ziddu.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.kaskus.com/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.kaskus.us/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://www.friendster.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://mail.yahoo.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://login.yahoo.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://mail.yahoo.co.id/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://mail.google.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.yahoo.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.yahoo.com/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.yahoo.co.id/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.akamai.net/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.yimg.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.gmail.*/.* 180 100% 4320 override-expire override-lastmod ignore-reload reload-into-ims
refresh_pattern ^http://*.detik.*/.* 180 35% 4320 override-expire override-lastmod ignore-reload reload-into-ims

refresh_pattern cgi-bin 0 0% 0
refresh_pattern \? 0 0% 0
refresh_pattern . 0 20% 4320

refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern ^ftp: 129600 90% 259200 reload-into-ims override-expire

—–LanjUt—–

Buat Startup Scripts :

  • #touch /etc/init.d/squid
  • #chmod +x /etc/init.d/squid

Contoh :

#! /bin/sh
#
# squid Startup script for the SQUID HTTP proxy-cache.
#
# Version: @(#)squid.rc 2.20 01-Oct-2001 miquels@cistron.nl
#
### BEGIN INIT INFO
# Provides: squid
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Squid HTTP Proxy
### END INIT INFO

# suffield: jhealy: All local modifications commented with “suffield”

NAME=squid
DAEMON=/usr/sbin/squid
LIB=/usr/lib/squid
PIDFILE=/var/run/$NAME.pid
# suffield: jhealy: added -F to wait for full rebuild before serving requests
SQUID_ARGS=”-D -sYCF”

[ ! -f /etc/default/squid ] || . /etc/default/squid

. /lib/lsb/init-functions

PATH=/bin:/usr/bin:/sbin:/usr/sbin

[ -x $DAEMON ] || exit 0

grepconf () {
w=” ” # space tab
sq=/etc/squid/squid.conf
# sed is cool.
res=`sed -ne ‘
s/^’$1′[‘”$w”‘]\+\([^'”$w”‘]\+\).*$/\1/p;
t end;
d;
:end q’ < $sq`
[ -n “$res” ] || res=$2
echo “$res”
}

grepconf2 () {
w=” ” # space tab
sq=/etc/squid/$NAME.conf
# sed is cool.
res=`sed -ne ‘
s/^’$1′[‘”$w”‘]\+[^'”$w”‘]\+[‘”$w”‘]\+\([^'”$w”‘]\+\).*$/\1/p;
t end;
d;
:end q’ < $sq`
[ -n “$res” ] || res=$2
echo “$res”
}

#
# Try to increase the # of filedescriptors we can open.
#
maxfds () {
[ -n “$SQUID_MAXFD” ] || return
[ -f /proc/sys/fs/file-max ] || return 0
[ $SQUID_MAXFD -le 4096 ] || SQUID_MAXFD=4096
global_file_max=`cat /proc/sys/fs/file-max`
minimal_file_max=$(($SQUID_MAXFD + 4096))
if [ “$global_file_max” -lt $minimal_file_max ]
then
echo $minimal_file_max > /proc/sys/fs/file-max
fi
ulimit -n $SQUID_MAXFD
}

start () {
cdr=`grepconf2 cache_dir /var/spool/$NAME`

case “$cdr” in
[0-9]*)
log_failure_msg “squid: squid.conf contains 2.2.5 syntax – not starting!”
log_end_msg 1
exit 1
;;
esac

#
# Create spool dirs if they don’t exist.
#
if [ -d “$cdr” -a ! -d “$cdr/00” ]
then
log_warning_msg “Creating squid spool directory structure”
$DAEMON -z
fi

if [ “$CHUID” = “” ]; then
CHUID=root
fi

maxfds
umask 027
cd $cdr
start-stop-daemon –quiet –start \
–pidfile $PIDFILE \
–chuid $CHUID \
–exec $DAEMON — $SQUID_ARGS < /dev/null
return $?
}

stop () {
PID=`cat $PIDFILE 2>/dev/null`
start-stop-daemon –stop –quiet –pidfile $PIDFILE –name squid
#
# Now we have to wait until squid has _really_ stopped.
#
sleep 2
if test -n “$PID” && kill -0 $PID 2>/dev/null
then
log_action_begin_msg ” Waiting”
cnt=0
while kill -0 $PID 2>/dev/null
do
cnt=`expr $cnt + 1`
if [ $cnt -gt 24 ]
then
log_action_end_msg 1
return 1
fi
sleep 5
log_action_cont_msg “”
done
log_action_end_msg 0
return 0
else
return 0
fi
}

case “$1” in
start)
log_daemon_msg “Starting Squid HTTP proxy” “squid”
if start ; then
log_end_msg $?
# suffield: jhealy: enable interception via tproxy
#/usr/local/bin/squid-watcher start
else
log_end_msg $?
fi
;;
stop)
log_daemon_msg “Stopping Squid HTTP proxy” “squid”
# suffield: jhealy: disable interception via tproxy
#/usr/local/bin/squid-watcher stop
if stop ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
reload|force-reload)
log_action_msg “Reloading Squid configuration files”
start-stop-daemon –stop –signal 1 \
–pidfile $PIDFILE –quiet –exec $DAEMON
log_action_end_msg 0
;;
restart)
log_daemon_msg “Restarting Squid HTTP proxy” “squid”
stop
if start ; then
log_end_msg $?
# suffield: jhealy: enable interception via tproxy
#/usr/local/bin/squid-watcher start
else
log_end_msg $?
fi
;;
*)
echo “Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart}”
exit 3
;;
esac

exit 0

—–LanjUt—–

Untuk mencache youtube dab photobucket

  • #touch /usr/local/bin/store_url_rewrite
  • #vim /usr/local/bin/store_url_rewrite

#!/usr/bin/perl
$|=1;
while (<>) {
@X = split;
$url = $X[0];
$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)&.*@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/get_video\?(.*)video_id=(.*?)$@squid://videos.youtube.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videodownload\?(.*)docid=(.*?)$@squid://videos.google.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/videodownload\?(.*)docid=(.*?)&.*@squid://videos.google.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/albums\?&.*@squid://images.photobucket.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/albums\?$@squid://images.photobucket.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/albums\?&.*@squid://videos.photobucket.INTERNAL/ID=$3@;
$url =~s@^http://(.*?)/albums\?$@squid://videos.photobucket.INTERNAL/ID=$3@;
print “$url\n”; }

  • #chmod 755 /usr/local/bin/store_url_rewrite

—–LanjUt—–

  • #update-rc.d squid defaults
Iklan

Filed under: debian, Squid

One Response - Comments are closed.

  1. […] ae o para quem quiser usar o debian: install squid 2.7 debian etch « a Brain TrasH […]

%d blogger menyukai ini: