Nama saya Falentino Eka Laksana Putra telah menggeluti bidang ICT sejak tahun 1998. Jika Anda tertarik untuk mendirikan rtrwnet/warnet dan setting mikrotik-proxy, silahkan hubungi saya.
Membuat Proxy Squid Lusca Dengan Ubuntu 10.04
Posted by eka
Posted on 15:00
1. Booting Komputer dengan CD
2. Pilih Language English, Enter
3. Pilih Install Ubuntu Server, Enter
4. Tekan Enter pada “Select a Language” English
5. Tekan Enter pada “Select a Language” United States
6. Pilih No pada “Detected Keyboard Layout”
7. Pilih USA pada origin of the keyboard
8. Pilih USA pada keyboard layout
9. Pilih Continue pada “Configure The Network”
10. Pilih “Configure Network Manually”
11. Isi ip address dengan 192.168.*.* pilih “Continue” lalu tekan Enter
12. Netmask 255.255.255.0 pilih “Continue” lalu tekan Enter
13. Pada Gateway 192.168.*.* pilih “Continue” lalu tekan Enter
14. Pada Name Server Address sudah terdapat IP 192.168.*.* pilih “Continue” lalu tekan Enter
15. Hostname isi dengan : server terus pilih “Continue” lalu tekan Enter
16. Domain name kosongkan saja, pilih “Continue” lalu tekan Enter
17. Pada pilihan “Configure The Clock” pilih Select From Wordwide List terus cari Jakarta lalu tekan Enter
18. Pada menu “Partition Disk” pilih Manual
19. Kita hapus partisi lama dulu jika hardisk pernah dipakai :
- Pilih #1 primary …. Yang akan dihapus, tekan Enter dan pilih Delete The Partition
- Ulangi perintah ini untuk semua partisi # yang tersisa
20. Arahkan ke FREESPACE- Pilih Create New Partition Enter
- Isi dengan 256 MB “Continue”
- Primary “Continue”
- Beginning “Continue”
- Use as = Ext4 Journaling file system
- Mount Point = /boot – static files or the boot loader
- Bootable Flag = On
- Pilih Done setting up the partition
21. Arahkan ke FREESPACE- Pilih Create New Partition Enter
- Isi dengan 19GB “Continue”
- Primary “Continue”
- Beginning “Continue”
- Use as = Ext4 Journaling file system
- Mount Point = /
- Mount Options = noatime
- Pilih Done setting up the partition
22. Arahkan ke FREESPACE
- Pilih Create New Partition Enter- Isi dengan 4Gb “Continue” (ini sesuai dengan RAM yg dipakai 2x RAM misal 2Gb berarti 4Gb)
- Primary “Continue”
- Beginning “Continue”
- Use as = swap area
- Pilih Done setting up the partition
23. Arahkan ke FREESPACE- Pilih Create New Partition Enter
- Isi dengan sisa hardisknya “Continue”
- Primary “Continue”
- Use as = ReiserFS untuk 32bit / btrFS untuk 64bit
- Mount Point = Enter manually rubah menjadi /cache
- Mount Options = noatime, naotail
- Pilih Done setting up the partition
24. Pilih Finish Partitioning and Write Changes to Disk, tekan Enter
25. Pada pilihan “Write The Changes Disk” Pilih YES, tekan Enter
26. Full name for the new user isi : server pilih “Continue”, tekan Enter
27. Username for your account : server pilih “Continue”, tekan Enter
28. Choose a password for the new user : 123 pilih “Continue”, tekan Enter
29. Re-enter password to verify : 123 pilih “Continue”, tekan Enter
30. Use weak password pilih “YES” tekan Enter
31. Encrypt your home directory pilih “NO” tekan Enter
32. Pada pilihan HTTP Proxy information dikosongkan saja, pilih “Continue”, tekan Enter
33. Pada saat “Configuration apt tunggu sampai program selesai membaca”
34. Pada saat pilihan updating pilih “No Automatic Update” pilih “Continue”, tekan Enter
35. Pada choose software to install pilih “OpenSSH Server” dengan menekan tombol “SPACE” pada keyboard, selanjutnya pilih “Continue”, tekan Enter
36. Pada pilihan “Install GRUB Loader” pilih “YES” tekan Enter
37. Pada saat “Ejecting CD Ubuntu Server Installer” ambil CD/Flashdisk dan pilih “Continue”, tekan Enter
Dan ini langkah – langkah pengerjaan dalam proses pengerjaan proxy squid/lusca
Pertama-tama saya memasukkan perintah ini dari “file” kambing.doc
kambing.ui.ac.id (UI, Telkom, Indosat, OpenIXP, INHERENT
Lalu saya melakukan perintah selanjutnya dengan memasukkan perintah
¢ apt-get update
¢ apt-get upgrade
¢ apt-get dist-upgrade
¢ apt-get install squid
¢ apt-get install squid squidclient squid-cgi
¢ apt-get install -y gcc
¢ apt-get install build-essential
¢ apt-get install sharutils
¢ apt-get install ccze
¢ apt-get install libzip-dev
¢ apt-get install automake1.9
¢ reboot
Lalu saya melanjutkan keperintah selanjutnya dengan mengetik perintah ini di proxy squid/lusca
¢ cd
¢ mkdir /temp
¢ cd /temp
q tar xzvf LUSCA_HEAD-r14809.tar.gz
q cd LUSCA_HEAD-r14809/
Lalu saya lakukan compile dari file “kambing” dengan cara copy paste yang sebagai berikut
./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-async-io=24 --with-aufs-threads=24 --with-pthreads --enable-storeio=aufs \
--enable-linux-netfilter --enable-arp-acl --enable-epoll --enable-removal-policies=heap,lru --with-aio --with-dl --enable-snmp \
--enable-delay-pools --enable-htcp --enable-cache-digests --disable-unlinkd --enable-large-cache-files --with-large-files \
--enable-err-languages=English --enable-default-err-language=English --with-maxfd=65536
Lalu saya melakukan keperintah selanjutnya dengan mengetik perintah/command sebagai berikut
¢ make
¢ make install
¢ mkdir /var/log/squid
¢ chown proxy:proxy /var/log/squid
¢ mv /etc/squid/squid.conf /etc/squid/squid.conf.1
¢ nano /etc/squid/squid.conf
¢ GANTI SQUID DEFAULTNYA !! (Saya ambil file ini dari file “squid.Conf”)
File saya lampirkan
¢ Simpan dengan CTRL + O ENTER
¢ touch /etc/squid/storeurl.pl
¢ chmod +x /etc/squid/storeurl.pl
¢ GANTI STOREURL.PL (Saya ambil file ini dari file “storeurl”)
File saya lampirkan
¢ nano /etc/squid/storeurl.pl
Lalu saya melakukan langkah-langkah selanjutnya dengan perintah/command sebagai berikut
chown proxy:proxy /cache
chmod -R 777 /cache
squid -z
chmod -R 777 /cache
squid -d1N
ps aux |grep squid
nano/etc/rc.local
squid
Storeurl 2014
Posted by eka
Posted on 14:54
STOREURL.PL 2014 New
#!/usr/bin/perl
$|=1;
while (<>) {
@X = split;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];
# Poto Pesbuk
# acl dontrewrite url_regex -i s\-platform\.ak\.fbcdn\.net
# acl store_rewrite_list url_regex -i fbcdn.*net
# refresh_pattern -i fbcdn.*net 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
# http://external.ak.fbcdn.net/safe_image.php?d=AQDfyygmJfvPVGen&w=154&h=154&url=http%3A%2F%2Fassets.kompas.com%2Fdata%2Fphoto%2F2013%2F04%2F10%2F1054532-jantungserangan-780x390.jpg&cfs=1
# http://static.ak.fbcdn.net/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif
# http://static.ak.fbcdn.net/rsrc.php/v2/y1/r/lBvtSWSBAGQ.png
# http://s-platform.ak.fbcdn.net/www/app_full_proxy.php?app=211923588878449&v=1&size=z&cksum=d06fe084823f168f335a831a949bf61b&src=http%3A%2F%2Fbycdn8-i.akamaihd.net%2Fantwars_id%2Fimages%2Fcontinueslogin.png
# hasil atas http://bycdn8-i.akamaihd.net/antwars_id/images/continueslogin.png
# http://profile.ak.fbcdn.net/hprofile-ak-ash2/274241_1187750150_2088800094_q.jpg
#Facebook
if ($X[1] =~ m/^http\:\/\/[a-zA-Z0-9\-\_\.\%]*fbcdn[a-zA-Z0-9\-\_\.\%]*net\/safe\_image\.php\?(.*)/) {
print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
} elsif ($X[1] =~ m/^http\:\/\/[a-zA-Z0-9\-\_\.\%]*fbcdn[a-zA-Z0-9\-\_\.\%]*net\/rsrc\.php\/(.*)/) {
print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
} elsif ($X[1] =~ m/^http\:\/\/[a-zA-Z0-9\-\_\.\%]*fbcdn[a-zA-Z0-9\-\_\.\%]*net\/[a-zA-Z0-9\-\_\.\%]*\/(.*)/) {
print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
# Aplikasi Android
} elsif ($X[1] =~ m/^http:\/\/android\.clients\.google\.com\/.*packageName\=.*/){
@pkg = m/[\&\?]packageName\=([^\&\s]*)/;
@ver = m/[\&\?]versionCode\=([^\&\s]*)/;
@ch = m/[\&\?]ch\=([^\&\s]*)/;
print $x . "storeurl://android-apps.SQUIDINTERNAL/pkg=@pkg&ver=@ver&ch=@ch\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.android\.clients\.google\.com\/market\/GetBinary\/([^\/]*)\/([^\/]*)\/ch([^\?]*).*/){
print $x . "storeurl://android-apps.SQUIDINTERNAL/pkg=" . $1 . "&ver=" . $2 . "&ch=" . $3 . "\n";
# Survey Google Menggelitik
# acl store_rewrite_list url_regex -i www\.google\-analytics\.com
# refresh_pattern -i google\-analytics\.com.*gif 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
# http://www.google-analytics.com/__utm.gif?utmwv=5.4.3&utms=27&utmn=938635439&utmhn=handphone.tokobagus.com&utmt=event&utme=5(image*browse-photo*26201942)8(5!Detail)9(5!Handphone)&utmcs=UTF-8&utmsr=1366x768&utmvp=1350x641&utmsc=32-bit&utmul=en-us&utmje=1&utmfl=11.2%20r202&utmdt=Sony%20Ericsson%20Xperia%20Arc%20S%20-%20Tokobagus.com&utmhid=1672766072&utmr=0&utmp=%2Fsony-ericsson%2Fsony-ericsson-xperia-arc-s-26201942.html%3Frelated%3D1&utmht=1374079248247&utmac=UA-5908313-1&utmcc=__utma%3D223717764.136894205.1374078869.1374078869.1374078869.1%3B%2B__utmz%3D223717764.1374078869.1.1.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3Dtoko%2520bagus%3B&utmu=6RAAAC%7E
} elsif ($X[1] =~ m/^http:\/\/www\.google-analytics\.com\/__utm.gif\?.*/) {
print $x . "storeurl://analytic.SQUIDINTERNAL/utm.gif\n";
# Gambar Video
# acl store_rewrite_list url_regex -i video\.google\.com\/ThumbnailServer
# refresh_pattern -i video\.google\.com\/ThumbnailServer 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
# http://video.google.com/ThumbnailServer2?app=blogger&contentid=32b710e374d15805&offsetms=5000&itag=w160&sigh=zQUsG2TTuxfG4g4nwoGvWdRMGy8
} elsif ($X[1] =~ m/^http:\/\/video.google.com\/ThumbnailServer.*/) {
@id = m/[&?](contentid=[a-zA-Z0-9\-\_\.\%]*)/;
@itag = m/[&?](itag=[a-zA-Z0-9\-\_\.\%]*)/;
@set = m/[&?](offsetms=[^\&\s]*)/;
print $x . "storeurl://Thumbnail.SQUIDINTERNAL/@id&@itag&@set\n";
# Video Youtube
# acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]*
# acl store_rewrite_list url_regex -i (youtube|google).*(videoplayback|liveplay)
# refresh_pattern -i (youtube|google).*(videoplayback|liveplay) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
} elsif ($X[1] =~ m/^http(|s)\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
$vid = $4 ;
@cpn = m/[&?]cpn\=([^\&\s]*)/;
if (defined($vid )) {
$fn = "/var/log/squid/@cpn";
unless (-e $fn) {
open FH,">".$fn ;
print FH "$vid\n";
close FH;
}
}
print $x . $X[1] . "\n";
} elsif ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
@itag = m/[&?](itag=[0-9]*)/;
@ids = m/[&?]id\=([^\&\s]*)/;
@mime = m/[&?](mime\=[^\&\s]*)/;
@cpn = m/[&?]cpn\=([^\&\s]*)/;
if (defined($cpn[0])) {
$fn = "/var/log/squid/@cpn";
if (-e $fn) {
open FH,"<".$fn ;
$id = <FH>;
chomp $id ;
close FH ;
} else {
$id = $ids[0] ;
}
} else {
$id = $ids[0] ;
}
@range = m/[&?](range=[^\&\s]*)/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range@mime\n";
# Aplikasi Android
# acl dontrewrite url_regex redirector\.c\.android\.clients\.google\.com
# acl store_rewrite_list url_regex -i c\.android\.clients\.google\.com
# refresh_pattern -i c\.android\.clients\.google\.com 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
#http://android.clients.google.com/market/download/Download?packageName=com.android.vending&versionCode=80210006&ch=zen2II1nK1Sx2swLcCn16w&ssl=0&token=AOTCm0RgtgrM6lpRdy7yASnedjpL9BHCO4mYdpfWfe6XifwG17ezhCxOQYadJKIITyEzF6Z-ihOthW61UOjraurXqeyoS2VWd-GU-gWMGBs&downloadId=-6463850153931383785
#http://r3---sn-vgpvopq-jb3e.c.android.clients.google.com/market/GetBinary/com.android.vending/80210006/chzen2II1nK1Sx2swLcCn16w?ms=au&mt=1373980310&mv=m&expire=1374153183&ipbits=0&ip=0.0.0.0&cp=Snp1a2J1Q1g6MjI4MDkyNTE4ODIyNDUwMzUzMjM&sparams=expire,ipbits,ip,q:,cp&signature=BAF0CEF16EFEB23FA2CAB930E5ACDB983270B60D.5EBE4632F00487F6F5E9D7370762434C5AB9782D&key=am2
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.android\.clients\.google\.com\/market\/GetBinary\/([a-zA-Z0-9\-\_\.\%]*)\/([0-9]*)\/.*/){
print $x . "storeurl://android-apps.SQUIDINTERNAL/$1/$2\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.android\.clients\.google\.com\/market\/GetBinary\/([a-zA-Z0-9\-\_\.\%]*)\/([0-9]*)\?.*/){
print $x . "storeurl://android-apps.SQUIDINTERNAL/$1/$2\n";
# APPS APPLE
# http://a1720.phobos.apple.com/us/r1000/085/Purple2/v4/6b/b9/f1/6bb9f130-d560-0b75-f5e5-16e4fdc1a3c0/mzps5959496558908157977.D2.dpkg.ipa
# refresh_pattern -i phobos\.apple\.com.*ipa 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*phobos\.apple\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.ipa)/) {
print $x . "storeurl://apple-apps.SQUIDINTERNAL/$1\n";
#Speedtest
# acl store_rewrite_list url_regex -i \/speedtest\/.*(jpg|txt|png|swf)
# refresh_pattern -i \/speedtest\/.*(jpg|txt|png|swf)) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
} elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/([a-zA-Z0-9\-\_\.\%]*\.(jpg|txt|png|swf))\?.*/) {
print $x . "storeurl://testspeed.SQUIDINTERNAL/" . $1 . "\n";
##################################################################################
## PORN Movies
#http://porn.im.d4628d22.1534715.x.xvideos.com/videos/oldmobile/8/2/b/xvideos.com_82b853581318116942fd41e0e8e4e805.3gp?e=1364299432&ri=1024&rs=85&h=64c9096e902f6a28fbaa18942a4034d4
# acl store_rewrite_list url_regex -i \.xvideos\.com\/.*(3gp|mpg|flv|mp4)
# refresh_pattern -i \.xvideos\.com\/.*(3gp|mpg|flv|mp4) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
} elsif ($X[1] =~ m/^http:\/\/.*\.xvideos\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.(3gp|mpg|flv|mp4))\?.*/){
print $x . "storeurl://xvideos.SQUIDINTERNAL/$1\n";
#http://154.46.32.87/key=5e2qYlZXbj6,end=1364305769/data=18446744072977812770/reftag=5412162/buffer=450K/speed=83200/1/xh/6/1815672_mom_gives_awesome_handjob.flv
# refresh_pattern -i \/xh.*(3gp|mpg|flv|mp4) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
} elsif ($X[1] =~ m/^http:\/\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\/.*\/xh.*\/([a-zA-Z0-9\-\_\.\%]*\.flv)/){
print $x . "storeurl://Xhamster.SQUIDINTERNAL/$1\n";
#http://213.174.156.23/key=kDRhok4XZMk,end=1364295197/reftag=5412166/buffer=1M/speed=170987/2/sp/6/repack117226.flv?start=0
} elsif ($X[1] =~ m/^http:\/\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+.*\/([a-zA-Z0-9\-\_\.\%]*\.flv)\?start=0/){
print $x . "storeurl://Xhamster2.SQUIDINTERNAL/$1\n";
#http://cdn2b.youjizz.com/videos/4/e/7/e/2/4e7e2b0ce3036.mp4?2792b87c889e01ca3b1a331e03d5a0718c4b4e7d777eff211b92848d3a84590620e5
} elsif ($X[1] =~ m/^http:\/\/.*\.youjizz\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp))\?.*/){
print $x . "storeurl://YouJizz.SQUIDINTERNAL/$1\n";
#http://cdn1.public.keezmovies.phncdn.com/200810/30/327964/240P_383K_327964.mp4?sr=6000&int=6000000b&nvb=20130327103508&nva=20130327123508&hash=085da11d99756faa95822
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*\.keezmovies[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
print $x . "storeurl://KeezMovies.SQUIDINTERNAL/$1\n";
#http://cdn1.public.tube8.com/201208/30/5436441/240P_195K_5436441.mp4?sr=3600&int=614400b&nvb=20130327104052&nva=20130327124052&hash=025102b4bdc2b07ec01fd
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*\.tube8[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) {
print $x . "storeurl://Tube8.SQUIDINTERNAL/$1\n";
#http://cdn1b.public.youporn.phncdn.com/200612/02/2865/480p_370k_2865/YouPorn%20-%20very%20good%202Girls%201guy%20hard.mp4?s=1364341242&e=1364427642&ri=600&rs=750&h=fe3d1bfda00e560af0e7fa8cfb60d7b2
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*\.youporn[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
print $x . "storeurl://YouPorn.SQUIDINTERNAL/$1\n";
#http://cdn1.public.spankwire.phncdn.com/201302/02/709578/240P_300K_709578.mp4?nvb=20130327105920&nva=20130327125920&hash=0c73938b11cee1e872048
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*\.spankwire[a-zA-Z0-9\-\_\.\%]*\.com.*\/([a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) {
print $x . "storeurl://SpankWire.SQUIDINTERNAL/$1\n";
#http://cdn1b.embed.pornhub.phncdn.com/videos/201102/17/159492/480P_357K_159492.mp4?rs=150&ri=1000&ip=85.112.95.26&s=1364387220&e=1364389020&h=305f8b4ba7973e62a340a2e61dc10868
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*\.pornhub[a-zA-Z0-9\-\_\.\%]*\.com.*\/([[a-zA-Z0-9\-\_\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
print $x . "storeurl://PornHub.SQUIDINTERNAL/$1\n";
#http://v3-xh.clients.cdn13.com/data/1817003.flv?cdn_hash=22591a4c2c98690574bea214ac95618b&cdn_creation_time=1364375095&cdn_ttl=14400
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%\/]*.*\/([a-zA-Z0-9\-\_\.]+\.(flv|mp3|mp4|3gp|wmv))\?.*cdn\_hash.*/){
print $x . "storeurl://media.SQUIDINTERNAL/$1\n";
###################################################################################
#4shared
} elsif ($X[1] =~ m/^http:\/\/.*dlink__[23]Fdownload_[23]F([\w\d-]+)_3Ftsid.*/) {
$1 =~ s/_5F/_/g;
print $x . "storeurl://4shared.SQUIDINTERNAL/" . $1 . "\n";
} elsif (m/^http\:\/\/.*\.4shared\.com\/download\/(.*)\/.*/) {
print $x . "http://4shared.SQUIDINTERNAL/" . $1 . "\n";
#reverbnation
} elsif ($X[1] =~ m/^http:\/\/c2lo\.reverbnation\.com\/audio_player\/ec_stream_song\/(.*)\?.*/) {
print $x . "storeurl://reverbnation.SQUIDINTERNAL/" . $1 . "\n";
#Steam #dota_2
} elsif ($X[1] =~ m/^http:\/\/valve[\d]*\.cs\.steampowered\.com\/(.*)/) {
print $x . "storeurl://steampowered.SQUIDINTERNAL/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[a-z\d]*\.hsar\.steampowered\.com\.edgesuite\.net\/(.*)/) {
print $x . "storeurl://steampowered.SQUIDINTERNAL/" . $1 . "\n";
## FileHippo
#http://fs40.filehippo.com/7642/72359c8e25864e74b56e0e922850e803/OriginSetup.exe
#http://fs41.filehippo.com/7662/0c4cfb998b66473ba1292d6ed807c818/Firefox%20Setup%2020.0b6.exe
} elsif ($X[1] =~ m/^http:\/\/.*filehippo\.com\/.*\/([0-9a-zA-Z\%\.\_\-]+\.(exe|zip|cab|msi|mru|mri|bz2|gzip|tgz|rar|pdf))/){
$y=$1;
for ($y) {
s/%20//g;
}
print $x . "storeurl://FileHippo.SQUIDINTERNAL/$y\n";
#BLOGSPOT
} elsif ($X[1] =~ m/^http:\/\/[1-4]\.bp\.blogspot\.com\/(.*)/) {
print $x . "storeurl://blogspot.SQUIDINTERNAL/" . $1 . "\n";
#ytimg
} elsif ($X[1] =~ m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
print $x . "storeurl://ytimg.SQUIDINTERNAL" . $1 . "\n";
#AVAST
} elsif ($X[1] =~ m/^http:\/\/download[0-9]{3}\.avast\.com\/(.*)/) {
print $x . "storeurl://avast.SQUIDINTERNAL/" . $1 . "\n";
#KAV
} elsif ($X[1] =~ m/^http:\/\/dnl-[0-9]{2}\.geo\.kaspersky\.com\/(.*)/) {
print $x . "storeurl://kaspersky.SQUIDINTERNAL/" . $1 . "\n";
#maps.google.com
} elsif ($X[1] =~ m/^http:\/\/(cbk|mt|khm|mlt|tbn|mw)[0-9]?\.google\.co(m|\.uk|\.id)\/(.*)/) {
print $x . "storeurl://google.SQUIDINTERNAL/" . $3 . "\n";
#gstatic and/or wikimapia
} elsif ($X[1] =~ m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org)\/(.*)/) {
print $x . "storeurl://wikimapia.SQUIDINTERNAL/" . $3 . "\n";
#Cache High Latency Ads
} elsif ($X[1] =~ 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/;×tamp=[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 . "storeurl://" . $1 . $2 . $y . "\n";
#netmarble
} elsif ($x =~ m/^http:\/\/update[0-9]\.netmarble\.co\.id\/modoo\/(.*)/) {
print $x . "storeurl://netmarble.SQUIDINTERNAL/" . $1 . "\n";
#cache high latency ads
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "storeurl://" . $1 . "/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "storeurl://" . $1 . "\n";
#cdn, varialble 1st path
} elsif (($X[1] =~ /filehippo/) && ($X[1] =~ m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
@y = ($1,$2,$4,$5);
$y[0] =~ s/[a-z0-9]{2,5}/cdn./;
print $x . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
#rapidshare
} elsif (($X[1] =~ /rapidshare/) && ($X[1] =~ m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
print $x . "storeurl://cdn." . $3 . "/SQUIDINTERNAL/" . $5 . "\n";
} elsif (($X[1] =~ /maxporn/) && ($X[1] =~ m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
print $x . "storeurl://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";
#domain/path/.*/path/filename
} elsif (($X[1] =~ /fucktube/) && ($X[1] =~ m/^http:\/\/(.*?)(\.[^\.\-]*?[^\/]*\/[^\/]*)\/(.*)\/([^\/]*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
@y = ($1,$2,$4,$5,$6);
$y[0] =~ s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
print $x . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "/" . $y[3] . "." . $y[4] . "\n";
#like porn hub variables url and center part of the path, filename etention 3 or 4 with or without ? at the end
} elsif (($X[1] =~ /tube8|pornhub|xvideos/) && ($X[1] =~ m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
print $x . "storeurl://cdn." . $4 . $6 . "\n";
#general purpose for cdn servers. add above your specific servers.
} elsif ($X[1] =~ m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
print $x . "storeurl://squid-cdn-url/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)(\.[^\.\-]*?\..*?)\/([^\?\&\=]*)\.([\w\d]{2,4})\??.*$/) {
@y = ($1,$2,$3,$4);
$y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
print $x . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# all that ends with ;
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "storeurl://" . $1 . "/" . $2 . "\n";
} else {
print $x . $X[1] . "\n";
}
# end
}