Setting Squid Poxy Dan Lusca High Performance

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 13 Apr 2012, 07:24

Selamat malam para sesepuh yg ada di sini.....
saya mau tanya tentang setingan saya ...
konfigurasinya seperti berikut
Totologi yang saya gunakan :
Tampilkan
Modem ==>HUB==>>Client
--------------||
------------Router

IP yag saya gunakan
Modem : 192.168.5.1
Router : 192.168.5.32
Client : 192.168.5.33-40

Pembagan Partisi Router
Tampilkan
Hdd yang saya pakai 40gb
1. boot = 1gb
2. swap = 1gb
3. var = 10gb
4. / = 27gb (sisa dari partisi yg di gunakan sebagai cache squid juga di folder /cache)


sedankan settingan squid saya seperti berikut :
Tampilkan
http_port 3128 transparent
#hierarchy_stoplist cgi-bin ? \.js \.jsp \.g \.do \.php \.asp \.cgi \.shtml \.cfm \.cfml \.phtml \.php3
#acl QUERY urlpath_regex cgi-bin \? \.js \.jsp \.g \.do \.php \.asp \.cgi \.shtml \.cfm \.cfml \.phtml \.php3
#no_cache deny QUERY
icp_port 0
cache_mem 8 MB
cache_swap_low 80%
cache_swap_high 85%
maximum_object_size 600 MB
minimum_object_size 0 bytes
maximum_object_size_in_memory 32 kb
ipcache_size 16384
ipcache_low 98
ipcache_high 99

cache_effective_user proxy
cache_effective_group proxy
error_directory /usr/share/squid/errors/English
icon_directory /usr/share/squid/icons

memory_replacement_policy heap LFUDA
cache_replacement_policy heap GDSF

cache_dir aufs /p1 3600 800 100
cache_dir aufs /p2 3600 800 100
cache_dir aufs /p3 3600 800 100

access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
logfile_rotate 1
emulate_httpd_log off
log_ip_on_direct on
client_netmask 255.255.255.255
request_header_max_size 20 kb
request_body_max_size 0 kb
dns_nameservers 202.134.1.10 125.160.4.82 125.160.2.34 202.134.0.155 203.130.196.5 203.130.196.155 202.134.0.61 8.8.8.8 8.8.4.4
uri_whitespace strip

#dns_nameservers 127.0.0.1
hosts_file /etc/hosts
redirector_bypass on
reload_into_ims on
pipeline_prefetch on
vary_ignore_expire on

#fungsi ini masih bingung
acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id)
acl store_rewrite_list urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|rar|mp3)$
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.$
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe$
acl dontrewrite url_regex redbot\.org \.php
acl getmethod method GET

storeurl_access deny dontrewrite
storeurl_access deny !getmethod
storeurl_access allow store_rewrite_list_domain_CDN
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_domain
storeurl_access allow store_rewrite_list_path
#storeurl_access deny all

storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 4
storeurl_rewrite_concurrency 99

refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 180 95% 403200 override-lastmod reload-into-ims
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(doc|docx|xls|xlsx|ppt|pptx|mdb|hqx|pdf|rtf|swf|txt|html|php|asp|aspx)$ 1440 50% 43200
refresh_pattern -i \.(ico|gif|bmp|png|jpg|jpe|jpeg|tiff)$ 14400 100% 86400 override-expire override-lastmod reload-into-ims ignore-re$
refresh_pattern -i \.(rpm|cab|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z)$ 14400 95% 86400 override-lastmod reload-into-ims ignore-no-cache
refresh_pattern -i \.(avi|wav|mid|mpeg|mpg|flv|x-flv|mov|3gp|mp4|wmv)$ 14400 95% 86400 override-expire override-lastmod reload-into-i$
refresh_pattern -i \.(mp3|mid)$ 14400 95% 86400 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache
refresh_pattern -i \.(css|js|axd)$ 14400 100% 86400 override-lastmod reload-into-ims ignore-no-cache
refresh_pattern -i \.(ini)(\?.*)?$ 2 5% 10800 reload-into-ims override-lastmod
refresh_pattern windowsupdate.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims
refresh_pattern download.microsoft.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims
refresh_pattern au.download.windowsupdate.com/.*\.(cab|exe) 4320 100% 43200 reload-into-ims
refresh_pattern guru.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern pupdate-af.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern af.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern upgrade.bitdefender.*/.*\.(gzip) 4320 100% 43200 reload-into-ims
refresh_pattern mbam-cdn.malwarebytes.org/.*\.(exe) 4320 100% 43200 reload-into-ims
refresh_pattern data-cdn.mbamupdates.com/.*\.(ref) 4320 100% 43200 reload-into-ims
refresh_pattern ^http://mail.yahoo.com/.* 720 80% 10080
refresh_pattern ^http://*.yahoo.*/.* 720 80% 7200
refresh_pattern ^http://mail.google.com/.* 720 80% 10080
refresh_pattern ^http://*.google.*/.* 720 80% 7200
refresh_pattern ^http://*.wordpress.com/.* 720 80% 10080
refresh_pattern ^http://*.wp.com/.* 720 80% 10080
refresh_pattern ^http://*.gravatar.com/.* 720 80% 10080
refresh_pattern ^http://*.blogspot.com/.* 720 80% 10080
refresh_pattern ^http://*.msn.*/.* 720 80% 10080
refresh_pattern ^http://*.evony.com/.* 720 80% 10080
refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http://download.windowsupdate.com/msdownload/update/software/updt/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.static.ak.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache i$
refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-a$
refresh_pattern ^http://profile.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignor$
refresh_pattern ^http://*.jobstreet.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache

#refresh_pattern ^http://*.detik.com.*/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache
#refresh_pattern ^http://*.detik.*/.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth

#refresh_pattern ^http://*.indowebster.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-n$
#refresh_pattern ^http://*.ziddu.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ig$
#refresh_pattern ^http://*.mediafire.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-$
#refresh_pattern ^http://*.4shared.com.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-ca$
#refresh_pattern ^http://*.21cineplex.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cac$
#refresh_pattern ^http://*.kompas.*/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.blogspot.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache
#refresh_pattern ^http://*.photobucket.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-a$
#refresh_pattern ^http://*.tinypic.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.imageshack.us/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.kaskus.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://www.kaskus.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.kapanlagi.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.okezone.*/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://www.okezone.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://www.inilah.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://www.kapanlagi.com/.* 720 100% 28800 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-a$

#refresh_pattern ^http://*.detiknews.*/*.* 720 50% 2880 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://video.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-$
#refresh_pattern ^http://static.liputan6.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignor$
#refresh_pattern ^http://*.friendster.com/.* 720 100% 10080 override-expire override-lastmod ignore-no-cache ignore-auth
#refresh_pattern ^http://*.twitter.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://profile.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignor$
#refresh_pattern ^http://*.yahoo.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.google.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.forummikrotik.com/.* 720 80% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore$
#refresh_pattern ^http://*.Linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://c1p1.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-$
#refresh_pattern ^http://*.c1p1.wordpress.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignor$
#refresh_pattern ^http://*.Linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://opensuse.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
#refresh_pattern ^http://*.kendari.Linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache igno$
#refresh_pattern ^http://*.opensuse.kendari.Linux.or.id/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-c$

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 localnet src 192.168.10.0/255.255.255.255
acl user src 192.168.11.0/24

#untuk melimit user wereles
acl download url_regex -i \.asf
acl download url_regex -i \.exe
acl download url_regex -i \.mp3
acl download url_regex -i \.vqf
acl download url_regex -i \.tar.gz
acl download url_regex -i \.gz
acl download url_regex -i \.tar
acl download url_regex -i \.zip
acl download url_regex -i \.mp4
acl download url_regex -i \.flv
acl download url_regex -i \.avi
acl download url_regex -i \.mpeg
acl download url_regex -i \.mpe
acl download url_regex -i \.mkv
acl download url_regex -i \.mpg
acl download url_regex -i \.doc
acl download url_regex -i \.docx
acl download url_regex -i \.iso
acl download url_regex -i \.rar
acl download url_regex -i \.wav
acl download url_regex -i \.mov
acl download url_regex -i \.msi
acl download url_regex -i \.raw
acl download url_regex -i \.v13.lscache4.c.youtube.com
acl download url_regex -i \.tc.v15.cache3.c.youtube.com

acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 22 53 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
#acl Safe_ports port 631 # cups
#acl Safe_ports port 666 # cups
#acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
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 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT
acl inputIP url_regex ^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/$

#fungsi ini masih bingung
header_access X-Forwarded-For deny all
header_access Accept-Encoding deny all
client_persistent_connections off
server_persistent_connections on
acl Safe_ports port 777 # multiling http
acl Safe_ports port 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT
acl inputIP url_regex ^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/$

#fungsi ini masih bingung
header_access X-Forwarded-For deny all
header_access Accept-Encoding deny all
client_persistent_connections off
server_persistent_connections on
half_closed_clients off
strip_query_terms off
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
vary_ignore_expire on
reload_into_ims on
pipeline_prefetch on
#range_offset_limit 50 KB
#read_timeout 30 minutes
#client_lifetime 6 hours
negative_ttl 30 seconds
positive_dns_ttl 6 hours
negative_dns_ttl 60 seconds
pconn_timeout 15 seconds
request_timeout 1 minute
store_avg_object_size 13 KB
log_icp_queries off
ipcache_size 16384
ipcache_low 98
ipcache_high 99
log_fqdn off
fqdncache_size 16384
memory_pools off
forwarded_for on
prefer_direct on

#fungsi ini masih bingung
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136

#cachemgr_passwd none info
cachemgr_passwd none all
client_db on
max_filedescriptors 8192

######### for Lusca Only #############
n_aiops_threads 24
load_check_stopen on
load_check_stcreate on
download_fastest_client_speed on

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
cache_mgr muammalhamidy@gmail.com
visible_hostname bagian_umum/umum.net
unique_hostname KOMANDANSIPELAUT
hostname_aliases umum.net

#fungsi melimit user wereles dari acl atas#
delay_pools 1
delay_class 1 2
delay_parameters 1 100/10000 100/100000
delay_access 1 allow user download
delay_access 1 deny ALL


dan settingan Storeurl.pl saya sebagai berikut :
Tampilkan
#!/usr/bin/perl
# Writen by chudy_fernandez@yahoo.com
# Email: Syed Jahanzaib / aacable@hotmail.com
# http://aacable.wordpress.com
$|=1;
while () {
@X = split;
# $X[1] =~ s/&sig=.*//;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];

#speedtest
if (m/^http:\/\/(.*)\/speedtest\/(.*\.(jpg|txt))\?(.*)/) {
print $x . "http://www.speedtest.net.SQUIDINTERNAL/speedtest/" . $2 . "\n";

#mediafire
}elsif (m/^http:\/\/199\.91\.15\d\.\d*\/\w{12}\/(\w*)\/(.*)/) {
print $x . "http://www.mediafire.com.SQUIDINTERNAL/" . $1 ."/" . $2 . "\n";

#fileserve
}elsif (m/^http:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/) {
print $x . "http://www.fileserve.com.SQUIDINTERNAL/" . $1 . "./" . $2 . "\n";

#filesonic
}elsif (m/^http:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/) {
print $x . "http://www.filesonic.com.SQUIDINTERNAL/" . $1 . "\n";

#4shared
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/download\/(.*)\/(.*\..*)\?.*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/download/$2\/$3\n";

#4shared preview
}elsif (m/^http:\/\/[a-zA-Z]{2}\d*\.4shared\.com(:8080|)\/img\/(\d*)\/\w*\/dlink__2Fdownload_2F(\w*)_3Ftsid_3D[\w-]*\/preview\.mp3\?sId=\w*/) {
print $x . "http://www.4shared.com.SQUIDINTERNAL/$2\n";

#photos-X.ak.fbcdn.net where X a-z
}elsif (m/^http:\/\/photos-[a-z](\.ak\.fbcdn\.net)(\/.*\/)(.*\.jpg)/) {
print $x . "http://photos" . $1 . "/" . $2 . $3 . "\n";

#YX.sphotos.ak.fbcdn.net where X 1-9, Y a-z
} elsif (m/^http:\/\/[a-z][0-9]\.sphotos\.ak\.fbcdn\.net\/(.*)\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 ."/". $2 . "\n";

#maps.google.com
} elsif (m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
print $x . "http://" . $1 . $2 . "\n";

# compatibility for old cached get_video?video_id
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?(videoplayback\?id=.*?|video_id=.*?)\&(.*?)/) {
$z = $2; $z =~ s/video_id=/get_video?video_id=/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $z . "\n";

# youtube fix
} elsif (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com)\/videoplayback\?(.*)/) {
$p_str = $2;
$tag = "";
$alg = "";
$id = "";
$range = "";
if ($p_str =~ m/(itag=[0-9]*)/){$tag = "&".$1}
if ($p_str =~ m/(algorithm=[a-z]*\-[a-z]*)/){$alg = "&".$1}
if ($p_str =~ m/(id=[a-zA-Z0-9]*)/){$id = "&".$1}
if ($p_str =~ m/(range=[0-9\-]*)/){$range = "&".$1; $range =~ s/-//; $range =~ s/range=//; }
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $tag . "&" . $alg . "&" . $id . "&" . $range . "\n";

} elsif (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
print $x . "http://www.google-analytics.com/__utm.gif\n";

#Cache High Latency Ads
} elsif (m/^http:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinteractive)(.*)/) {
$y = $3;$z = $2;
for ($y) {
s/pixel;.*/pixel/;
s/activity;.*/activity/;
s/(imgad[^&]*).*/\1/;
s/;ord=[?0-9]*//;
s/;&timestamp=[0-9]*//;
s/[&?]correlator=[0-9]*//;
s/&cookie=[^&]*//;
s/&ga_hid=[^&]*//;
s/&ga_vid=[^&]*//;
s/&ga_sid=[^&]*//;
# s/&prev_slotnames=[^&]*//
# s/&u_his=[^&]*//;
s/&dt=[^&]*//;
s/&dtd=[^&]*//;
s/&lmt=[^&]*//;
s/(&alternate_ad_url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&url=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&ref=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/(&cookie=http%3A%2F%2F[^(%2F)]*)[^&]*/\1/;
s/[;&?]ord=[?0-9]*//;
s/[;&]mpvid=[^&;]*//;
s/&xpc=[^&]*//;
# yieldmanager
s/\?clickTag=[^&]*//;
s/&u=[^&]*//;
s/&slotname=[^&]*//;
s/&page_slots=[^&]*//;
}
print $x . "http://" . $1 . $2 . $y . "\n";

#cache high latency ads
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

# spicific servers starts here....
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "http://" . $1 . "\n";

#cdn, varialble 1st path
} elsif (($u =~ /filehippo/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#rapidshare
} elsif (($u =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
print $x . "http://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n";

} elsif (($u =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

#like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end
} elsif (($u =~ /tube8|pornhub|xvideos/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . "http://cdn." . $4 . $6 . "\n";
#...spicific servers end here.

#photos-X.ak.fbcdn.net where X a-z
} elsif (m/^http:\/\/photos-[a-z].ak.fbcdn.net\/(.*)/) {
print $x . "http://photos.ak.fbcdn.net/" . $1 . "\n";

#for yimg.com video
} elsif (m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
print $x . "http://cdn.yimg.com//" . $3 . "\n";

#for yimg.com doubled
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
print $x . "http://cdn.yimg.com/" . $3 . "\n";

#for yimg.com with &sig=
} elsif (m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) {
@y = ($1,$2);
$y[0] =~ s/[a-z]+[0-9]+/cdn/;
$y[1] =~ s/&sig=.*//;
print $x . "http://" . $y[0] . ".yimg.com/" . $y[1] . "\n";

#youjizz. We use only domain and filename
} elsif (($u =~ /media[0-9]{2,5}\.youjizz/) && (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})((\?|\%).*)?$/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

#general purpose for cdn servers. add above your specific servers.
} elsif (m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . "http://squid-cdn-url//" . $2 . "." . $3 . "\n";

#generic http://variable.domain.com/path/filename. "ext" or "exte" with or withour "? or %"
} elsif (m/^http:\/\/(.*)(\.[^\.\-]*?\..*?)\/(.*)\.([^\/\?\&]{2,4})((\?|\%).*)?$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|(.*cdn.*)|(.*cache.*))/cdn/;
print $x . "http://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

# generic http://variable.domain.com/...
} elsif (m/^http:\/\/(([A-Za-z]+[0-9-]+)*?|.*cdn.*|.*cache.*)\.(.*?)\.(.*?)\/(.*)$/) {
print $x . "http://cdn." . $3 . "." . $4 . "/" . $5 . "\n";

# spicific extention that ends with ?
} elsif (m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|on2)(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "." . $3 . "\n";

# all that ends with ;
} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "http://" . $1 . "/" . $2 . "\n";

} else {
print $x . $_ . "sucks\n";
}
}


Nah masalah yg saya adapin sekarang,data atau web yang sudah saya akses tidak dapat ter HIT oleh proxy,untuk client ping ke google.com lancar,tapi ping ke router RTO....
dan koneksinya tidak lancar...
mohon penjelasannya dari sesepuh yg sudah berhasil mengoprek settingannya...
User avatar
TVONE
Posts: 21
Joined: 11 Apr 2012, 20:30
Contact:

Re: Setting Squid Poxy Dan Lusca High Performance

Postby TVONE » 13 Apr 2012, 15:24

mantap gan,, semoga bIsa bermanfaat bagi yang lain ...!!!!

http://issinternetserversolution.blogspot.com/
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 14 Apr 2012, 09:54

TVONE wrote:mantap gan,, semoga bIsa bermanfaat bagi yang lain ...!!!!

http://issinternetserversolution.blogspot.com/


Sudah saya coba master...tapi masih belum bisa....
thx...
User avatar
TVONE
Posts: 21
Joined: 11 Apr 2012, 20:30
Contact:

Re: Setting Squid Poxy Dan Lusca High Performance

Postby TVONE » 14 Apr 2012, 12:01

belum bisanya dmnAa .......
User avatar
iwantoyanto
Posts: 7
Joined: 13 Apr 2012, 20:01
Location: surabaya

Re: Setting Squid Poxy Dan Lusca High Performance

Postby iwantoyanto » 14 Apr 2012, 13:39

proxyku@proxyku:~$ sudo squid -k parse
FATAL: storeUfsDirParse: invalid size value
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 4576 KB
Page faults with physical i/o: 0
tampil pesan spt i tu gan...
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 14 Apr 2012, 13:43

iwantoyanto wrote:proxyku@proxyku:~$ sudo squid -k parse
FATAL: storeUfsDirParse: invalid size value
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 4576 KB
Page faults with physical i/o: 0
tampil pesan spt i tu gan...


Cek Settingan Squid nya gan,,,atau replace dengan squid di atas.....


TVONE wrote:belum bisanya dmnAa .......

Proxy belum ter HIT...
dan cache youtube tidak bisa.....
speedtest tambah lambat mastannn
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 14 Apr 2012, 15:04

(Stripping trailing CRs from patch.)
patching file src/cache_cf.c
Reversed (or previously applied) patch detected! Assume -R? [n]

klu ada kendala seperti ini gmn mas bro saat pact
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 14 Apr 2012, 18:52

TVONE wrote:lihat blogku ////
http://issinternetserversolution.blogspot.com/
cara instal perhatikan / mau di ajarin lewat yahoo + sediakan webcam siap membantu anda ....!!!

[img:center]http://2.bp.blogspot.com/-f6m1cMXGqHY/Tp0MXM0fmuI/AAAAAAAADU0/iLhE0i5dhpE/s320/animasi+bergerak-1.gif[/img] _____ISS + INTERNET SERVER SOLUTION


wah boleh tuh gan....
add PM min YM nya dah gan,,,nanti ane chaat,,,
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 15 Apr 2012, 00:32

rimakasih mastah...telah mengajari ku sampai Proxy ku bisa....
mastah TVONE mantap dah...
User avatar
iwantoyanto
Posts: 7
Joined: 13 Apr 2012, 20:01
Location: surabaya

Re: Setting Squid Poxy Dan Lusca High Performance

Postby iwantoyanto » 15 Apr 2012, 11:40

tanks... :) mas proxy dah jalan tinggal setting mikrotiknya bisa dibantu aku mas,aku pakai versi 29.27 mas...apa perlu di apgrade..mas
User avatar
azuracy
Posts: 17
Joined: 21 Jan 2011, 14:34

Re: Setting Squid Poxy Dan Lusca High Performance

Postby azuracy » 15 Apr 2012, 16:18

untuk settingan mikrotik nya banyak yg leih ahi mas bro....
silahkan di cek di sub forum...banyak sekali tutorial untuk seetingan mikrotik...
User avatar
iwansupriyanto
Posts: 1
Joined: 13 Mar 2012, 00:05
Location: surabaya
Contact:

Re: Setting Squid Poxy Dan Lusca High Performance

Postby iwansupriyanto » 16 Apr 2012, 21:10

menuju tkp gan
User avatar
rockafello
Posts: 48
Joined: 23 Jan 2012, 14:21
Location: bekasi
Contact:

Re: Setting Squid Poxy Dan Lusca High Performance

Postby rockafello » 05 May 2012, 03:00

mantap nih nubie ijin simak sepuh
User avatar
DedMax
Posts: 5
Joined: 27 Dec 2011, 14:12

Re: Setting Squid Poxy Dan Lusca High Performance

Postby DedMax » 09 May 2012, 16:33

ikut nyimak gan, maklum ane super nubie... barang kali ada mastah turun gunung... ngasih ilmu santetnya... eh ilmu squidnya ampe salah ketik :)
User avatar
Lskilobyte
Posts: 31
Joined: 25 Nov 2010, 01:27

Re: Setting Squid Poxy Dan Lusca High Performance

Postby Lskilobyte » 09 May 2012, 23:57

ikut nyimak aja gan, kalo mau belajar server trustix ke mana ya gan

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 10 guests