Sunteți pe pagina 1din 4

PFsense Storeurl.

PL newServer's

Home

About

Contact

My blog

Published by Khalid Daud // On 04:26 // 0 comments

Submit

Jaime

/usr/local/etc/squid/storeurl.pl

#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
#

Youtube

updates

at

http://wiki.squid-

cache.org/ConfigExamples/DynamicContent/YouTube/Discussion
$|=1;
while (<>) {
@X = split;
$x = $X[0] . " ";
$_ = $X[1];
$u = $X[1];
#profile.ak.fbcdn.net/hprofile-ak-xxx/xxx.jpg
if (m/^http:\/\/profile.ak.fbcdn.net\/hprofile-ak-[a-z]{3}[0-9]\/(.*)/) {
print $x . "http://profile.ak.fbcdn.net/hprofile-ak-cdn/" . $1 . "\n";
#speedtest
} elsif (m/^http:\/\/(.*)\/speedtest\/(.*\.(jpg|txt))\?(.*)/) {
print $x . "http://www.speedtest.net.SQUIDINTERNAL/speedtest/" . $2 . "\n";
#(xx.sphotos|photos-x).ak.fbcdn.net/hphotos-ak-xxx/
}

elsif

(m/^http:\/\/.*?([a-z]{4,}).*?.ak.fbcdn.net\/([a-z]*)-ak-[a-z]{3}[0-9]\/([^&?

]*)/) {

PFsense Refresh.Conf

print $x . "http://$1.ak.fbcdn.net/$2-ak-cdn/$3\n";

/ usr/local/etc/squid/refresh.conf #
$Rev$ # chudy fernandez@yahoo.com #

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

Mikrotik 2.9.27 Web-Proxy Cache


Full

#youtube/google video with range

# CAche Full Mikrotik / ip firewall mangle


add chain=output protocol=tcp src-

} elsif ($X[1] =~ /(youtube|google).*(videoplayback|liveplay)\?/){

Limit Youtube Video streaming on


MikroTik

@itag = m/[&?](itag=[0-9]*)/;
@id = m/[&?](id=[^\&]*)/;

/ip firewall layer7-protocol add


name=http-video

@range = m/[&?](range=[^\&]*)/;
print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/@id&@itag@range\n";
} elsif (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
print $x . "http://STOREURL.www.google-analytics.com/__utm.gif\n";
#metacafe/mccont video with range
@itag = m/[&?](itag=[0-9]*)/;
@range = m/[&?](range=[^\&]*)/;
print $x . "http://video-srv.metacafe.com.SQUIDINTERNAL/@id&@itag@range\n";

#metacafe 1024p HD itag=37, 720p HD itag=22


(m/^http:\/\/([0-

9.]{4}|.*\.metacafe\.com|.*\.mccont\.com|.*\.video\.mccont\.com).*?
\&(itag=37|itag=22).*?\&(id=[a-zA-Z0-9]*)/) {
print $x . "http://video-srv.metacafe.com.SQUIDINTERNAL/" . $2 . "&" . $3 . "\n";
#metacafe 360p itag=34 ,480p itag=35 and others

http://khaliddaud1.blogspot.com/2014/04/pfsense-storeurlpl-new.html[16/12/2014 2:10:16 PM]

Installasi LUSCA_HEADr14809-YOUTUBE.PACTH

Video Cache server for Squid


cache

@id = m/[&?](id=[^\&]*)/;

elsif

/usr/local/etc/squid/storeurl.pl
#!/usr/bin/perl # $Rev$ # by

# This is The List deb


http://kambing.ui.ac.id/ubuntu/

} elsif ($X[1] =~ /(metacafe|mccont).*(videoplayback|liveplay)\?/){

PFsense Storeurl.PL new

1. Requires =========== a. squid


>= 2.6 b. python >= 2.4 c. python-

Squid Conf (New)Scripts


# SQUID 2.7/ LUSCA TEST CONFIG FILE
# Email: khaliddaud007@gmail.com #

PFsense include.conf new


/usr/local/etc/squid/include.conf # $Rev$
acl store rewrite list urlpath regex

PFsense Storeurl.PL newServer's

elsif

(m/^http:\/\/([0-

9.]{4}|.*\.metacafe\.com|.*\.mccont\.com|.*\.video\.mccont\.com).*?\&(itag=[09]*).*?\&(id=[a-zA-Z0-9]*)/) {

PFsense Include Conf


/usr/local/etc/squid/include.conf # $Rev$
acl store rewrite list urlpath regex

print $x . "http://video-srv.metacafe.com.SQUIDINTERNAL/" . $3 . "\n";

MIKROTIK 2X WAN LoadBalancing


PCC Method

#Cache High Latency Ads

/ip address add address=192.168.0.1/24


network=192.168.0.0

elsif

(m/^http:\/\/([a-z0-

9.]*)(\.doubleclick\.net|\.quantserve\.com|\.googlesyndication\.com|yieldmanager|cpxinte
ractive)(.*)/) {
$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://STOREURL." . $1 . $2 . $y . "\n";
#cache high latency ads
} elsif (m/^http:\/\/(.*?)\/(ads)\?(.*?)/) {
print $x . "http://STOREURL." . $1 . "/" . $2 . "\n";
} elsif (m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
print $x . "http://STOREURL." . $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://STOREURL." . $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";
#domain/path/.*/path/filename
}

elsif

(($u

=~

/fucktube/)

&&

(m/^http:\/\/(.*?)(\.[^\.\-]*?

http://khaliddaud1.blogspot.com/2014/04/pfsense-storeurlpl-new.html[16/12/2014 2:10:16 PM]

2014 (58)
April (58)
PFsense Refresh.Conf
PFsense Storeurl.PL new
PFsense include.conf new
Proxy Server
Mikrotik 2.9.27 Web-Proxy Cache
Full
4X WAN Load Balancing PCC method
MIKROTIK 2X WAN LoadBalancing
PCC Method
2 WAN loadbalancing nth method
StoreURL
squid conf for youtube caching
Nginx Conf(Updated)
Nginx Rb(Updated)
cmand
Internet sharing
Internet sharing scripts
Nginx Rb scripts
StoreURL.Scripts
Squid Conf (New)Scripts
Commands for new proxy Scripts
Email Auto backup mikrotik
mikrotik hotspot 5.20
mikrotik pppoe 5.20
DDNS Script for(changeip.com)
Mikrotik.
Bridge Filter - Blocking DHCP Traffic
Bridge mode Bandwidth Shaping in
Bruteforce login prevention using
Mikrotik
Mikrotik PPPoE Server with User
Manager Pre Paid B...
MikroTik Web Proxy Setup Guide
Load Balancing Speedy 4 Line +
mikrotik system
Setup mangle
Mikrotik Mangle Bandwidth
Mikrotik RouterOS in VirtualBox
Mikrotik Seting
MIKROTIK Load Blancer 10 Wan 1
Lan
Limit Youtube Video streaming on

PFsense Storeurl.PL newServer's

[^\/]*\/[^\/]*)\/(.*)\/([^\/]*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
@y = ($1,$2,$4,$5,$6);

$y[0]

=~

s/(([a-zA-A]+[0-9]+(-[a-zA-Z])?

$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
print $x . "http://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 (($u =~ /tube8|pornhub|xvideos|hardsextube/) && (#m/^http:\/\/(([A-Zaz]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?
(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
# print $x . "http://cdn." . $4 . $6 . "\n";
}

elsif

(m/^http:\/\/[^\/]*(tube8|pornhub|xvideos|hardsextube)[^\/]*\/(.*)\/([^\/]*)\.([^\/.?
&_;]{2,4}).*$/) {
print $x . "http://cdn.$1/$3.$4\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\/(.*)/) {

MikroTik
Limit download with IDM in Mikrotik
mikrotik how to bloch facebook and
youtube....
PCC load balancing for equal WANs
Mikrotik Pyment Reminder
Pfsense Load Balancing
PFsense Storeurl PL
PFsense Include Conf
Configuration and installation on
Ubuntu server li...
Installasi Webmin on Ubuntu
Installasi Graph Monitoring Squid
Installasi LUSCA_HEAD-r14809YOUTUBE.PACTH
Mikrotik2.9.27 Simple Address
Modem Username Password and ip
Simple firewall
sample junpier j2300 with firewall
filter
Command Filter Firewall Juniper
2300
Configure sFlow - Fortinet /
FortiGate
How to configure a Fortinet firewall
for Foticlien...
How-To create a basic configuration
on a Fortinet ...
HUAWEI
MA5680T configuration (OLT)
Mikrotik 2.9.27 Simple Firewall
Mangle
Video Cache server for Squid cache

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

Home

#youjizz. We use only domain and filename


}

elsif

(($u

=~

/media[0-9]{1,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://STOREURL." . $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";
# spicific extention
#

elsif

(m/^http:\/\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?

|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|swf).*?/) {
# @y = ($1,$2);
# $y[0] =~ s/((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
# print $x . "http://" . $y[0] . "." . $y[1] . "\n";
#generic http://variable.domain.com/path/filename."ex", "ext" or
"exte"
#http://cdn1-28.projectplaylist.com
#http://s1sdlod041.bcst.cdn.s1s.yimg.com
} elsif (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 . "http://STOREURL.$y[0]$y[1]/$y[2].$y[3]\n";

http://khaliddaud1.blogspot.com/2014/04/pfsense-storeurlpl-new.html[16/12/2014 2:10:16 PM]

Geo Computers. Powered by Blogger.

PFsense Storeurl.PL newServer's

# all that ends with ;


} elsif (m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
print $x . "http://STOREURL." . $1 . "/" . $2 . "\n";
} else {
print $x . $_ . "\n";
}
}

About the Author


I'm Hung Duy, the founder of Xml Blogger Templates (XBT). I'm a
freelance writer on topics related to Website Optimization (SEO),
blogger customizations and making money online. I'm blogging since
2006 and I'm currently a guest blogger on Blogging With Success.
Follow Me on Twitter or On Facebook
Visit xmlbloggertemplates.com for more Blogger Templates

Comment as:

Publish

Newer Post

Preview

Notify me

Home

http://khaliddaud1.blogspot.com/2014/04/pfsense-storeurlpl-new.html[16/12/2014 2:10:16 PM]

Older Post

S-ar putea să vă placă și