Senin, 18 Juni 2018

Load Balanced + Proxy External

Basic configuration :

/ip address
add address=192.168.1.10/24 broadcast=192.168.1.255 comment="" disabled=no interface=ether1-isp1 network=192.168.1.0
add address=10.10.10.10/24 broadcast=10.10.10.255 comment="" disabled=no interface=ether2-lan network=10.10.10.0
add address=11.11.11.1/24 broadcast=11.11.11.255 comment="" disabled=no interface=ether3-Proxy network=11.11.11.0
add address=192.168.2.2/24 broadcast=192.168.2.255 comment="" disabled=no interface=ether5-isp2 network=192.168.2.0

/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=isp1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=isp1 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=isp2 scope=30 target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=isp2 scope=30 target-scope=10
add check-gateway=ping comment="Default 1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=30 target-scope=10
add check-gateway=ping comment="Default 2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=192.168.2.1 scope=30 target-scope=10

/ip firewall address-list
add address=10.10.10.0/24 comment="" disabled=no list=lokalnet
add address=11.11.11.0/24 comment="" disabled=no list=proxynet

/ip dns
set allow-remote-requests=yes cache-size=2048KiB max-udp-packet-size=4096 servers=8.8.8.8 8.8.4.4

/ip firewall nat
add chain=srcnat action=masquerade out-interface=ether1-isp1 comment="ISP1"
add chain=srcnat action=masquerade out-interface=ether5-isp2 comment="ISP2"



/ip firewall nat
add chain=dstnat action=dst-nat to-addresses=208.67.220.220 to-ports=5353 protocol=udp in-interface=ether2-lan dst-port=53 comment="TRANSPARENT DNS"
add chain=dstnat action=dst-nat to-addresses=208.67.220.220 to-ports=5353 protocol=tcp in-interface=ether2-lan dst-port=53
add chain=dstnat action=dst-nat to-addresses=208.67.220.220 to-ports=5353 protocol=udp in-interface=ether3-Proxy dst-port=53
add chain=dstnat action=dst-nat to-addresses=208.67.220.220 to-ports=5353 protocol=tcp in-interface=ether3-Proxy dst-port=53

/ip firewall nat
add chain=dstnat action=dst-nat to-addresses=11.11.11.2 to-ports=3128 protocol=tcp dst-address-list=!proxynet in-interface=ether2-lan \
dst-port=80,8080 comment="PROXY"

Load Balance :
/ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=hit passthrough=no protocol=!icmp dscp=12 comment="hit"

/ip firewall mangle
add chain=input action=mark-connection new-connection-mark=isp1_conn passthrough=yes connection-state=new in-interface=ether1-isp1 comment="isp1_conn"
add chain=input action=mark-connection new-connection-mark=isp2_conn passthrough=yes connection-state=new in-interface=ether5-isp2 comment="isp2_conn"

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=isp1_conn passthrough=yes connection-state=established \
in-interface=ether1-isp1 comment="isp1_conn"
add chain=prerouting action=mark-connection new-connection-mark=isp2_conn passthrough=yes connection-state=established \
in-interface=ether5-isp2 comment="isp2_conn"

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=isp1_conn passthrough=yes connection-state=related in-interface=ether1-isp1 comment="isp1_conn"
add chain=prerouting action=mark-connection new-connection-mark=isp2_conn passthrough=yes connection-state=related in-interface=ether5-isp2 comment="isp2_conn"

/ip firewall mangle
add chain=output action=mark-routing new-routing-mark=isp1 passthrough=no connection-mark=isp1_conn comment="isp1"
add chain=output action=mark-routing new-routing-mark=isp2 passthrough=no connection-mark=isp2_conn comment="isp1"

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp1 passthrough=yes connection-state=new protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/0 comment="pcc proxy_isp1"
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp2 passthrough=yes connection-state=new protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/1 comment="pcc proxy_isp2"
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp1 passthrough=yes connection-state=established protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/0 comment="pcc proxy_isp1"
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp2 passthrough=yes connection-state=established protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/1 comment="pcc proxy_isp2"
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp1 passthrough=yes connection-state=related protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/0 comment="pcc proxy_isp1"
add chain=prerouting action=mark-connection new-connection-mark=proxy_isp2 passthrough=yes connection-state=related protocol=tcp dst-address-type=!local \
in-interface=ether3-Proxy dst-port=80 per-connection-classifier=both-addresses-and-ports:2/1 comment="pcc proxy_isp2"

/ip firewall mangle
add chain=prerouting action=mark-routing new-routing-mark=isp1 passthrough=yes connection-mark=proxy_isp1 comment="mark routing isp1"
add chain=prerouting action=mark-routing new-routing-mark=isp2 passthrough=yes connection-mark=proxy_isp2 comment="mark routing isp2"

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=iix passthrough=yes protocol=!icmp dst-address-list=nice comment"iix"
add chain=prerouting action=mark-packet new-packet-mark=iix passthrough=no connection-mark=iix
add chain=prerouting action=mark-connection new-connection-mark=int passthrough=yes protocol=!icmp dst-address-list=!nice comment="int"
add chain=prerouting action=mark-packet new-packet-mark=int passthrough=no connection-mark=int

Done. All traffic from http-proxy interface will be divided evenly in and out of each interface on the gateway. Furthermore, making the download and upload limit.

INFO SERVICE PROXY SETTING AND MIKROTIK 089637490907 / fathayu@gmail.com / fathayu@yahoo.co.id

Storeurl.pl

#!/usr/bin/perl
# FATHAYU

$|=1;
while (<>) {
@X = split;
        $x = $X[0] . " ";
# ==========================================================================
# YOUTUBE
# ==========================================================================
if ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
@itag = m/[&?](itag=[0-9]*)/;
@CPN = m/[&?]cpn\=([a-zA-Z0-9\-\_]*)/;
        @IDS = m/[&?]id\=([a-zA-Z0-9\-\_]*)/;
        $id = &GetID($CPN[0], $IDS[0]);
        @range = m/[&?](range=[^\&\s]*)/;
        print $x . "http://fathayu/" . $id . "&@itag@range\n";
#} elsif ($X[1] =~ m/(youtube|google).*videoplayback\?/ ){
# @itag = m/[&?](itag=[0-9]*)/;
#        @id = m/[&?](id=[^\&]*)/;
#        @redirect = m/[&?](redirect_counter=[^\&]*)/;
#        print $x . "http://fathayu/";
# ==========================================================================
# DAILYMOTION
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/proxy-\d*\.sg1\.dailymotion\.com\/(.*)\/(.*)\/video\/\d*\/\d*\/.*/) {
print $x . "http://fathayu/" . $1 . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/proxy-\d*\.dailymotion\.com\/(.*)\/(.*)\/video\/\d*\/\d*\/.*/) {
print $x . "http://fathayu/" . $1 . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/vid2\.ak\.dmcdn\.net\/(.*)\/(.*)\/video\/\d*\/\d*\/.*/) {
print $x . "http://fathayu/" . $1 . $2 . "\n";
# ==========================================================================
# VIMEO
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/av\.vimeo\.com\/\d*\/\d*\/(.*)\?/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/pdl\.vimeocdn\.com\/\d*\/\d*\/(.*)\?/) {
print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
# GAME ONLINE
# ==========================================================================
#Chagu chagu
} elsif ($X[1] =~ m/^http:\/\/update2\.netmarble\.co\.id\/Chagu\/REAL_Server_Patch\/(.*)\?/) {
  print $x . "http://fathayu/" . $1 . "\n";
#Tales Hero Update
} elsif ($X[1] =~ m/^http:\/\/patch\.gemscool\.com\/th\/patch\/.*\/(.*.pkg)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/patch\.gemscool\.com\/th\/patch\/.*\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
#Dragonnest
} elsif ($X[1] =~ m/^http:\/\/patch\.gemscool\.com\/dragonnest\/live\/\d*\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
#Fifa-Online
} elsif ($X[1] =~ m/^http:\/\/202\.158\.252\.194\/(.*.(erl|exe|des|daf|))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Modoo-Marble
} elsif ($X[1] =~ m/^http:\/\/update1\.netmarble\.co\.id\/modoo\/patch\/ModooMarble\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
#Atlantic Pacth
} elsif ($X[1] =~ m/^http:\/\/.*\.atlantica\.gemscool\.com\/(.*.(exe|dll|cab|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Freestyle
} elsif ($X[1] =~ m/^http:\/\/file\.fs\.gemscool\.com\/JCE\/(.*.(exe|dll|cab|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#GrandChase Pacth
} elsif ($X[1] =~ m/^http:\/\/122\.102\.49\.202\/cp\/(.*.(exe|dll|cab|dat|zip|kom|stg|xt))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Warrock Pacth
} elsif ($X[1] =~ m/^http:\/\/122\.102\.49\.175\/(.*.(exe|dll|cab|dat|zip|nzp|lst))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Xshot online
} elsif ($X[1] =~ m/^http:\/\/.*\.winnerinter\.co\.id\/(.*.zip)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/patchverxshot\.winnerinter\.co\.id\/new_autopatch\/(.*.exe)/) {
print $x . "http://fathayu/" . $1 . "\n";
#DriftCity Pacth
} elsif ($X[1] =~ m/^http:\/\/202\.78\.197\.88\/(.*.(exe|dll|cab|dat|zip|bin|part))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Ayodance Pacth
} elsif ($X[1] =~ m/^http:\/\/122\.102\.49\.132\/(.*.(exe|dll|cab|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Grand Fantasia Online
} elsif ($X[1] =~ m/^http:\/\/patch\.gfo\.web\.id\/ELF\/(.*.(exe|dll|cab|lst|bz2|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Rom Pacth
} elsif ($X[1] =~ m/^http:\/\/rom-patch\.romonline\.web\.id\/patch\/(.*.(exe|dll|cab|dat|zip|pkg))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Sealindo Pacth
} elsif ($X[1] =~ m/^http:\/\/.*\.sealindo\.com\/patch\/(.*.(htm|ini|exe|dll|cab|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Idol-street Patch
} elsif ($X[1] =~ m/^http:\/\/202\.93\.17\.199\/(.*.(exe|dll|cab|dat|zip|pkg|pck))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Rohan Patch
} elsif ($X[1] =~ m/^http:\/\/patch\.rohan\.web\.id\/idpatch\/bitmaps\/interface4\/.*\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
#Perfectworld Patch
} elsif ($X[1] =~ m/^http:\/\/.*\.patch3\.perfectworld\.web\/.id\/(.*.(exe|dll|cab|dat|zip|lst|pkg|pck))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Luna Patch
} elsif ($X[1] =~ m/^http:\/\/patch3\.luna\.web\.id\/(.*.(exe|dll|cab|dat|zip|lst|pkg|pck))/) {
print $x . "http://fathayu/" . $1 . "\n";
#3kingdoms Patch
} elsif ($X[1] =~ m/^http:\/\/.*\.3kingdom\.net\/(.*.(exe|dll|cab|dat|zip|lst|pkg|pck))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Emil chronicle online Patch
} elsif ($X[1] =~ m/^http:\/\/.*\.patch\.econline\.web\/id\/eco\/patch\/(.*.(exe|dll|cab|dat|zip|lst|pkg|pck))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Xen online Patch  gogame
} elsif ($X[1] =~ m/^http:\/\/download\.gogame\.co\.id\/dnc\/(.*.(xz|dll|cab|dat|zip|lst|pkg))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Cabal Online Patch
} elsif ($X[1] =~ m/^http:\/\/.*\.cabalonline\.co\.id\/(.*.(cab|zip|exe|rar|dat))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Fly for fun Flyff
} elsif ($X[1] =~ m/^http:\/\/202\.59\.255\.20\.Neurospace\.ResClient\/(.*.(gz|dll|cab|dat|zip|exe|))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Micro Volts Indonesia
} elsif ($X[1] =~ m/^http:\/\/.*\.microvolts\.web\.id\/(.*.(cab|zip|exe|rar))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Cross file
} elsif ($X[1] =~ m/^http:\/\/patch\.crossfire\.web\.id\/download\/.*\/(.*.(exe|rar|cab|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Avalon
} elsif ($X[1] =~ m/^http:\/\/.*\.lytogame\.com\/(.*.(RTP|apf|zip|nzp|txt|dat|exe|vpu))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Dragonica
} elsif ($X[1] =~ m/^http:\/\/202\.158\.252\.67:6345\/(.*.(dat|exe|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#sc qeon
} elsif ($X[1] =~ m/^http:\/\/patch\.sc\.qeon\.co\/.id\/.*\/(.*.(exe|dll|cab|dat|zip))/) {
print $x . "http://fathayu/" . $1 . "\n";
#GameCoId
} elsif ($X[1] =~ m/^http:\/\/.*\.agame\.com\/(.*.(swf|dcr))/) {
print $x . "http://fathayu/" . $1 . "\n";
#Divine Soul
} elsif ($X[1] =~ m/^http:\/\/.*\.outspark\.com\/divinesouls\/(.*.(exe|rtp|dll|dfp))/) {
print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
# METRO TV
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/cdn\.metrotvnews\.com\/videos\/\d{4}\/\d{2}\/\d{2}\/\d*\/(.*.mp4)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   YIMG
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*yimg.com)\/\/(.*)\/([^\/\?\&]*\/[^\/\?\&]*\.[^\/\?\&]{3,4})(\?.*)?$/) {
        print $x . "http://fathayu/" . $3 . "\n";
# ==========================================================================
#   YIMG DOUBLE
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\.yimg\.com\/(.*?)\.yimg\.com\/(.*?)\?(.*)/) {
        print $x . "http://fathayu/" . $3 . "\n";
# ==========================================================================
# YTIMG
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
# ==========================================================================
#   PORN Movies
# ==========================================================================
} elsif (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
        print $x . "http://fathayu/" . $1 . "/" . $3 . "\n";
} elsif (($X[1] =~ /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://fathayu/" . $4 . $6 . "\n";
} elsif (($u =~ /tube8|redtube|hardcore-teen|pornhub|tubegalore|xvideos|hostedtube|pornotube|redtubefiles/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
        print $x . "http://fathayu/" . $4 . $6 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.xvideos\.com\/.*\/([\w\d\-\.\%]*\.(3gp|mpg|flv|mp4))\?.*/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/porn\.im\.\w*\.\d*\.x\.xvideos\.com\/videos\/flv\/([a-z]|[0-9])\/([a-z]|[0-9])\/([a-z]|[0-9])\/(.*.flv)\?/){
        print $x . "http://fathayu/" . $4 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\d]+\.[\d]+\.[\d]+\.[\d]+\/.*\/xh.*\/([\w\d\-\.\%]*\.flv)/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\d]+\.[\d]+\.[\d]+\.[\d]+.*\/([\w\d\-\.\%]*\.flv)\?start=0/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.youjizz\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp))\?.*/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.keezmovies[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
        print $x . "http://fathayu/" . $1 . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.tube8[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.youporn[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.spankwire[\w\d\-\.\%]*\.com.*\/([\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*\.pornhub[\w\d\-\.\%]*\.com.*\/([[\w\d\-\.\%]*\.(mp4|flv|3gp|mpg|wmv))\?.*/){
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   4shared
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/dc\d*\.4shared\.com\/download\/.*\/(.*)\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[a-z]{2}\d{3}\.4shared\.com\/img\/(.*)\/(.*)\/dlink__2Fdownload_2F(.*)_3Ftsid_3D(.*)-[0-9]+-\w+_(.*)_3D1000_26sbsr_3D\w+\/preview.mp3/) {
        print $x . "http://fathayu/" . $2 . "\n";
# ==========================================================================
#   Game FB
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/cityvillefb[0-3]?(.static.zgncdn.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/playerstatics[1-9]?(.poker.static.zynga.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/zynga[1-9]?-a(.akamaihd.net.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/s[1-9]?(.ninja.game321.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
# ==========================================================================
# GOOGLE
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/redirector\.gvt1\.com\/edgedl\/chrome\/win\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.gvt1\.com\/edgedl\/chrome\/win\/(.*)\?/) {
print $x . "http://fathayu/" . $1 . "\n";

} elsif ($X[1] =~ m/^http:\/\/.*\.c\.pack\.google\.com\/edgedl\/chrome\/win\/(.*)\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*\.google\.com)\/(edgedl\/[^\?\&\=]*\.[a-z]{3,4})(\?.*)?$/) {
        print $x . "http://fathayu/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(cbk|mt|khm|mlt|tbn)[0-9]?(.google\.co(m|\.uk|\.id).*)/) {
        print $x . "http://fathayu/" . $1 . $2 . "\n";
} elsif (($X[1] =~ /(khm|khms|cbk|cbks|mt|mw|mlt|mts)[0-9]\.(google|googleapis)\.co(m|\.uk|\.id)/) && (m/^http:\/\/([^\/]*?)\/(.*)/)) {
        print $x . "http://fathayu/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(kh|mt|khm|cbk|t)[0-9]?(.google\.co(m|\.id).*)/) {
        print $x . "http://fathayu/" . $1  . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(khm|mt)[0-9]?(.google.com.*)/) {
        print $x . "http://fathayu/" . $1  . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.[a-z][0-9]\.(tiles\.virtualearth\.net)\/(.*\&n=z)/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/imgv2-[0-9](\.scribdassets\.com.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
        print $x . "http://fathayu/" . $1  . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/([a-z])[\d]{1,2}?(.gstatic\.com.*|\.wikimapia\.org.*)/) {
        print $x . "http://fathayu/" . $1 . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/t[1-9]?(.gstatic.com.*)/) {
        print $x . "http://fathayu/" . $1  .  "\n";
} elsif ($X[1] =~ m/^http\:\/\/.*(pack.google.com.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";

} elsif ($X[1] =~ m/^http:\/\/cache\.pack\.google\.com\/crx\/blobs\/.*\/(.*)\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.pack\.google\.com\/crx\/blobs\/.*\/(.*)\?\?/) {
        print $x . "http://fathayu/" . $1 . "\n";

} elsif ($X[1] =~ m/^http:\/\/video.google.com\/ThumbnailServer.*/) {
        @id = m/[&?](contentid=[\w\d\-\.\%]*)/;
        @itag = m/[&?](itag=[\w\d\-\.\%]*)/;
        @set = m/[&?](offsetms=[^\&\s]*)/;
        print $x . "http://fathayu/";
} 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 . "http://fathayu/";
} elsif ($X[1] =~ m/^http:\/\/lh[3-6]?(.googleusercontent.com.*)/) {
        print $x . "http://fathayu/" . $1  .  "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.pack\.google\.com\/edgedl\/drive\/(.*)\/gsync.msi\?/) {
        print $x . "http://fathayu/" . $1  .  "\n";
# ==========================================================================
#   Ubuntu Update
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(ubuntu\/[a-zA-Z].*\/os\/.*)/) {
        print $x . "http://fathayu/" . $2 . "\n";
# ==========================================================================
#   photobucket
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/i[1-9]{3}(.photobucket.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/i[1-9]{4}(.photobucket.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
# ==========================================================================
#   Game Garenanow
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/dl\.garenanow.com\/hon\/patcher\/(.*\.(exe|zip))\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/cdn\.id\.garenanow\.com\/games\/fo3id\/patcher\/(.*.exe)\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/garena\.edge\.cdn\.starhub\.com\/garenaid\/fo3id\/patcher\/(.*.exe)\?/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Steam Dota2
# ==========================================================================
} elsif ($X[1] =~ m/^http\:\/\/valve[0-9]*\.cs\.steampowered\.com\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   acl store_rewrite_list url_regex -i \.edgesuite\.net/(.*)
# ==========================================================================
} elsif ($X[1] =~ m/^http\:\/\/[a-z0-9]*\.hsar\.steampowered\.com\.edgesuite\.net\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Firefox Checked
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/.*?firefox\/releases\/(.*?)\/(firefox.*(mar|exe)?$)/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "\n";
# ==========================================================================
#   Mozilla Update Partial
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(firefox\/releases)\/(.*?[a-z]{3})$/) {
        print $x . "http://fathayu/" . $2 . "/" . $3  . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.cdn\.mozilla\.net\/pub\/firefox\/releases\/.*\/update\/win32\/en-US\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Mozilla update
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(firefox\/releases\/.*)/) {
        print $x . "http://fathayu/" . $2 . "\n";
# ==========================================================================
#   Windows Update
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/i[1-9]{3}(.windowsupdate.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/au\.download\.windowsupdate\.com\/msdownload\/update\/software\/.*\/\d*\/\d*\/(.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.windowsupdate\.com\/.*\/msdownload\/update\/software\/defu\/\d{4}\/\d{2}\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Blogpost Checked
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/[0-9]?.bp.blogspot\.com\/(.*)\/s.*?\/(.*(jpg|png|gif)?$)/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/[1-4]\.bp\.(blogspot\.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
# ==========================================================================
#   ggpht.com
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/lh[0-9]?.ggpht.com\/(.*?)\/(.*?)\/(.*?)\/(.*)\/(.*)?$/) {
        print $x . "http://fathayu/"  . $1 . "/" .  $2 . "/" . $4 .  "/" .  $5 . "\n";
# ==========================================================================
#   twimg.com
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/a[0-5]?(.twimg.com.*)/) {
        print $x . "http://fathayu/" . $1  .  "\n";
# ==========================================================================
#   AVAST
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
        print $x . "http://fathayu/" . $1  .  "\n";
# ==========================================================================
#   KAV
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
        print $x . "http://fathayu/" . $1  .  "\n";
# ==========================================================================
#   AVG
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/update.avg.com/) {
        print $x . "http://fathayu/" . $1  .  "\n";
# ==========================================================================
#   Aplikasi Android
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*\.android\.clients\.google\.com)\/(market\/[^\?\&\=]*)(\?.*)?$/) {
        print $x . "http://fathayu/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.android\.clients\.google\.com\/market\/GetBinary\/([a-zA-Z0-9\-\_\.\%]*)\/([0-9]*)\/.*/){
        print $x . "http://fathayu/" . $1 . "/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.android\.clients\.google\.com\/market\/GetBinary\/([a-zA-Z0-9\-\_\.\%]*)\/([0-9]*)\?.*/){
        print $x . "http://fathayu/" . $1 . "/" . $2 . "\n";
# ==========================================================================
#   APPS APPLE
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/[a-zA-Z0-9\-\_\.\%]*phobos\.apple\.com\/.*\/([a-zA-Z0-9\-\_\.\%]*\.ipa)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Sourceforge mirror download
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*\.dl\.sourceforge\.net)\/(.*)/) {
        print $x . "http://fathayu/" . $2 . "\n";
# ==========================================================================
#   Speedtest
# ==========================================================================
} elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/([a-zA-Z0-9\-\_\.\%]*\.(jpg|txt|png|swf))\?.*/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http\:\/\/.*\/speedtest\/(.*\.(jpg|txt)).*/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Mediafire
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/199\.91\.15\d\.\d*\/\w{12}\/(\w*)\/(.*)/) {
        print $x . "http://fathayu/" . $1 ."/" . $2 . "\n";
} elsif ($X[1] =~ m/^http:\/\/199\.91\.15\d\.\d*\/(.*)\/(\w*)\/(.*)/) {
        print $x . "http://fathayu/" . $2 . "/" . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/205\.196\.12\d\.\d*\/(.*)\/(\w*)\/(.*)/) {
        print $x . "http://fathayu/" . $2 . "/" . $3 . "\n";
# ==========================================================================
#   IPV4
# ==========================================================================
} elsif (($X[1] =~ /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/) && (m/^http:\/\/([^\/]*?)\/(thumbs|flv|key=|content).*?\/([^\/\?\&]*\.[\w\d]{3})\??.*$/)) {
        print $x . "http://fathayu/" . $3 . "\n";
} elsif (($X[1] =~ /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/) && (m/^http:\/\/([^\/]*?)\/remote_control.php.*?(file=.*)/)) {
        print $x . "http://fathayu/" . $2 . "\n";
} elsif (($X[1] =~ /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/) && (m/^http:\/\/([^\/]*?)\/(.*\/[a-z]*\/thumbs.*)/)) {
        print $x . "http://fathayu/" . $2 . "\n";
} elsif (($X[1] =~ /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/) && (m/^http:\/\/([^\/]*?)\/(.*\/t\/([^\?\&\=]*\.[a-z]{3}))$/)) {
        print $x . "http://fathayu/" . $2 . "\n";
# ==========================================================================
#   ziddu
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*?)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Fileserve
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "./" . $2 . "\n";
# ==========================================================================
#   Filesonic
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   Rapidshare
# ==========================================================================
} elsif (($X[1] =~ /rapidshare/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?)([a-z]*\.[^\/]{3}\/[a-z]*\/[0-9]*)\/(.*?)\/([^\/\?\&]{4,})$/)) {
        print $x . "http://fathayu/" . $3 . "/" . $5 . "\n";
# ==========================================================================
#   Tusfiles
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/.*\.tusfiles\.net\/d\/(.*)\/.*/) {
print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   NINITE
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/get\.geo\.opera\.com\/pub\/opera\/desktop\/.*\/win\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.oracle\.com\/otn-pub\/java\/jdk\/.*\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.cdn\.mozilla\.net\/pub\/firefox\/releases\/.*\/update\/.*\/.*\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(softlayer|heanet)\.dl\.sourceforge\.net\/project\/(winscp|infrarecorder)\/(WinSCP|InfraRecorder)\/.*\/(.*)/) {
print $x . "http://fathayu/" . $4 . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.tuxfamily\.org\/notepadplus\/.*\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/fpdownload\.macromedia\.com\/get\/shockwave\/default\/\w\/.*\/latest\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*\.c\.pack\.google\.com\/edgedl\/chrome\/win\/.*\/(.*)\?/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/cdn02\.foxitsoftware\.com\/pub\/foxit\/reader\/desktop\/win\/.*\/.*\/en_us\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
} elsif ($X[1] =~ m/^http:\/\/download\.skype\.com\/msi\/(.*)/) {
print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   ORACLE
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/javadl\.oracle\.com\/webapps\/download\/GetFile\/.*\/windows-i586\/(.*)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   General purpose for cdn servers. add above your specific servers.
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/([0-9.]*?)\/\/(.*?)\.(.*)\?(.*?)/) {
        print $x . "http://fathayu/" . $2 . "." . $3 . "\n";
# ==========================================================================
#   YIMG WITH &sig=
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\.yimg\.com\/(.*)/) {
        @y = ($1,$2);
        $y[0] =~ s/[a-z]+[0-9]+/cdn/;
        $y[1] =~ s/&sig=.*//;
        print $x . "http://fathayu/" . $y[0] . ".yimg.com/" . $y[1] . "\n";
# ==========================================================================
#   Generic http://variable.domain.com/path/filename."ex" "ext" or "exte" with or withour "? or %"
# ==========================================================================
} elsif ($X[1] =~ 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://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[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|kkcdn|fck)[-\w]*)|([a-zA-Z]+-?[0-9]+(-[a-zA-Z]*)?)|([0-9]{1,2})/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)(\.[^\.\-]*?\..*?)\/([^\?\&\=]*)\??.*$/) {
        @y = ($1,$2,$3);
        $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn|kkcdn|fck)[-\w]*)|([a-zA-Z]+-?[0-9]+(-[a-zA-Z]*)?)|([0-9]{1,2})/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "\n";
} elsif ($X[1] =~ m/^http:\/\/[\w\d\-\_\.\%\/]*.*\/([\w\d\-\_\.]+\.(flv|mp3|mp4|3gp|wmv))\?.*cdn\_hash.*/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
        print $x . "http://fathayu/" . $1 . "/" . $3 . "\n";
} elsif (($X[1] =~ /fucktube/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?[^\/]*\/[^\/]*)\/(.*)\/([^\/]*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
        @y = ($1,$2,$4,$5,$6);
        $y[0] =~ s/(([a-zA-Z]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "/" . $y[3] . "." . $y[4] . "\n";
} elsif (($X[1] =~ /media[0-9]{1,5}\.youjizz/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?\.[^\/]*)\/(.*)\/([^\/\?\&]*)\.([^\/\?\&]{3,4})(\?.*?)$/)) {
        @y = ($1,$2,$4,$5);
        $y[0] =~ s/(([a-zA-Z]+[0-9]+(-[a-zA-Z])?$)|([^\.]*cdn[^\.]*)|([^\.]*cache[^\.]*))/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
#   Filehippo
# ==========================================================================
} elsif (($X[1] =~ /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://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
} elsif (($X[1] =~ /filehippo/) && (m/^http:\/\/(.*?)(\.[^\/]*?)\/(.*?)\/([^\?\&\=]*)\.([\w\d]{2,4})\??.*$/)) {
        @y = ($1,$2,$4,$5);
        $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-Z]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
} elsif ($X[1] =~ m/^http:\/\/.*filehippo\.com\/.*\/([\d\w\%\.\_\-]+\.(exe|zip|cab|msi|mru|mri|bz2|gzip|tgz|rar|pdf))/){
        $y=$1;
        for ($y) {
        s/%20//g;
        }
        print $x . "http://fathayu//" . $y . "\n";
} elsif ($X[1] =~ m/^http:\/\/\w*\d*\.filehippo\.com\/\d*\/.*\/(.*.exe)/){
        print $x . "http://fathayu/" . $1 . "\n";
} elsif (($X[1] =~ /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://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
} elsif (m/^http:\/\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|pak|MD5|zip|on2|mar|swf|js|css).*?/) {
        @y = ($1,$2);
        $y[0] =~ s/((cache|cdn)[-\d]*)|([a-zA-A]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
        print $x . "http://fathayu/" . $y[0] . "." . $y[1] . "\n";
} elsif (($X[1] =~ /mediafire/) && (m/^http:\/\/(.*?)\.(.*?)\/(.*?)\/(.*)\.([a-z0-9]{3,4})(\?.*)?/)) {
        @y = ($1,$2,$4,$5);
        $y[0] =~ s/[a-z0-9]{2,5}/cdn./;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
} elsif ($X[1] =~ m/^http:\/\/kixeye[0-3]?(.cdn.kixeye.com.*)/) {
        print $x . "http://fathayu/" . $1  . "\n";
# ==========================================================================
#   domain/path/.*/filename."ex", "ext" or "exte"
# ==========================================================================
} elsif (($X[1] =~ /sharebeast/) && (m/^http:\/\/(.*?)(\.[^\.\-]*?[^\/]*\/[^\/]*)\/(.*?)\/([^\?\&\=]*)\.([\w\d]{2,4})\??.*$/)) {
        @y = ($1,$2,$4,$5);
        $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-Z]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
#   indowebster
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)(\.jkt\.3d\.x\.indowebster.com)\/(.*?)\/([^\/\?\&]*)\.([^\/\?\&]{2,4})(\?.*?)$/) {
        @y = ($1,$2,$4,$5);
        $y[0] =~ s/([a-z][0-9][a-z]dlod[\d]{3})|((cache|cdn)[-\d]*)|([a-zA-Z]+-?[0-9]+(-[a-zA-Z]*)?)/cdn/;
        print $x . "http://fathayu/" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";
# ==========================================================================
#   DAP
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/download\.speedbit\.com\/(.*.exe)/) {
        print $x . "http://fathayu/" . $1 . "\n";
# ==========================================================================
#   specific extention
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|rar|cab|amf|swf|x-flv|xml|ttf)(.*)/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\.(htm|html|mhtml|css|js)\?/) {
        print $x . "http://fathayu/" . $1 . "/" . $2 . "." . $3 . "\n";
# ==========================================================================
#   all that ends with ;
# ==========================================================================
} elsif ($X[1] =~ m/^http:\/\/(.*?)\/(.*?)\;(.*)/) {
        print $x . "http://fathayu/" . $1 . "/" . $2  . "\n";
} else {
        print $x . $X[1] . "\n";
}
}

sub GetID
{
$id = "";
use File::ReadBackwards;
my $lim = 200 ;
my $ref_log = File::ReadBackwards->new('/var/log/squid/referer.log');
while (defined($line = $ref_log->readline))
{
if ($line =~ m/.*youtube.*\/watch\?.*v=([a-zA-Z0-9\-\_]*).*\s.*id=$IDS[0].*/){
$id = $1;
last;
}
if ($line =~ m/.*youtube.*\/.*cpn=$CPN[0].*[&](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*/){
$id = $2;
last;
}
if ($line =~ m/.*youtube.*\/.*[&?](video_id|docid|v)=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
$id = $2;
last;
}
last if --$lim <= 0;
}
if ($id eq ""){
$id = $IDS[0];
}
$ref_log->close();
return $id;
}

Squid Configuration

#=============================================
# SQUID - FATHAYU
#=============================================
http_port 3128 transparent
server_http11 on

pid_filename /var/run/squid.pid
coredump_dir /var/spool/squid/
error_directory /usr/share/squid/errors/English
icon_directory /usr/share/squid/icons
mime_table /etc/squid/mime.conf

cache_mem 512 MB
maximum_object_size_in_memory 0 bytes
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

minimum_object_size 0 KB
maximum_object_size 1024 MB
cache_swap_low 97
cache_swap_high 99

#=============================================
# Cache Directory
#=============================================
cache_dir aufs /cache1 30000 16 256
cache_dir aufs /cache2 30000 16 256
cache_dir aufs /cache3 24000 16 256

#=============================================
# Lusca Log Options
#=============================================
access_log daemon:/var/log/squid/access.log squid
cache_log none
referer_log /var/log/squid/referer.log
cache_store_log none
store_dir_select_algorithm  round-robin
logfile_daemon /usr/lib/squid/logfile-daemon
logfile_rotate 1

#=============================================
# ACL Access Control
#=============================================
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 10.0.0.0/8            # RFC1918 possible internal network
acl localnet src 172.16.0.0/12        # RFC1918 possible internal network
acl localnet src 192.168.0.0/16        # RFC1918 possible internal network
acl localnet src 125.165.92.1        # RFC1918 possible internal network

acl SSL_ports port 443
acl Safe_ports port 80                # http
acl Safe_ports port 21                # ftp
acl Safe_ports port 443                # https
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 CONNECT method CONNECT
acl purge method PURGE
acl snmppublic snmp_community public

uri_whitespace strip

#=============================================
# Range HIT Soultions
#=============================================
range_offset_limit 1 KB

#=============================================
#    Rules to block few Advertising sites
#=============================================
acl ads url_regex -i .youtube\.com\/ad_frame?
acl ads url_regex -i .(s|s[0-90-9])\.youtube\.com
acl ads url_regex -i .googlesyndication\.com
acl ads url_regex -i .doubleclick\.net
acl ads url_regex -i ^http:\/\/googleads\.*
acl ads url_regex -i ^http:\/\/(ad|ads|ads[0-90-9]|ads\d|kad|a[b|d]|ad\d|adserver|adsbox)\.[a-z0-9]*\.[a-z][a-z]*
acl ads url_regex -i ^http:\/\/openx\.[a-z0-9]*\.[a-z][a-z]*
acl ads url_regex -i ^http:\/\/[a-z0-9]*\.openx\.net\/
acl ads url_regex -i ^http:\/\/[a-z0-9]*\.u-ad\.info\/
acl ads url_regex -i ^http:\/\/adserver\.bs\/
acl ads url_regex -i !^http:\/\/adf\.ly
acl ads url_regex -i .yimg|adbrite|adclick|adfarm|adrevolver|adserver|adtech|advert|atdmt|atwola|banner|bizrate|blogads|bluestreak|burstnet|casalemedia|coremetrics|doubleclick|falkag|fastclick|feedstermedia|googlesyndication|hitbox|httpads|imiclk|intellitxt|js\.overture|kanoodle|kontera|mediaplex|nextag|pointroll|qksrv|rightmedia|speedera|statcounter|tribalfusion|webtrends\/
http_access deny ads
http_reply_access deny ads
#deny_info http://yoursite/yourad,htm ads

#=============================================
# Query Youtube
#=============================================
strip_query_terms off
acl yutub url_regex -i .*youtube\.com\/.*$
acl yutub url_regex -i .*youtu\.be\/.*$
logformat squid1 %{Referer}>h %ru
access_log /var/log/squid/yt.log squid1 yutub

#=============================================
# Custom Option REWRITE
#=============================================
acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id)

acl store_rewrite_list urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)\?
acl store_rewrite_list urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)\?
acl store_rewrite_list urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)\?
acl store_rewrite_list urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)\?
acl store_rewrite_list urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)\?
acl store_rewrite_list urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)\?
acl store_rewrite_list urlpath_regex \.(htm|html|mhtml|css|js)\?

acl store_rewrite_list_web url_regex ^http:\/\/([A-Za-z-]+[0-9]+)*\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_web_CDN url_regex ^http:\/\/[a-z]+[0-9]\.google\.com doubleclick\.net

acl store_rewrite_list_path urlpath_regex \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)$
acl store_rewrite_list_path urlpath_regex \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)$
acl store_rewrite_list_path urlpath_regex \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)$
acl store_rewrite_list_path urlpath_regex \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)$
acl store_rewrite_list_path urlpath_regex \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt)$
acl store_rewrite_list_path urlpath_regex \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)$
acl store_rewrite_list_path urlpath_regex \.(htm|html|mhtml|css|js)$

acl getmethod method GET

storeurl_access deny !getmethod
#this is not related to youtube video its only for CDN pictures
storeurl_access allow store_rewrite_list_web_CDN
storeurl_access allow store_rewrite_list_web store_rewrite_list_path
storeurl_access allow store_rewrite_list
storeurl_access deny all
#file location storeurl.pl script
storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 4
storeurl_rewrite_concurrency 10
#=============================================
# Custom Option REFRESH PATTERN
#=============================================
# Youtube
refresh_pattern -i (get_video\?|videoplayback\?|videodownload\?) 525600 99% 99999 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
# Extension
refresh_pattern -i \.(mp2|mp3|mid|midi|mp[234]|wav|ram|ra|rm|au|3gp|m4r|m4a)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
refresh_pattern -i \.(mpg|mpeg|mp4|m4v|mov|avi|asf|wmv|wma|dat|flv|swf)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
refresh_pattern -i \.(jpeg|jpg|jpe|jp2|gif|tiff?|pcx|png|bmp|pic|ico)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
refresh_pattern -i \.(chm|dll|doc|docx|xls|xlsx|ppt|pptx|pps|ppsx|mdb|mdbx)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
refresh_pattern -i \.(txt|conf|cfm|psd|wmf|emf|vsd|pdf|rtf|odt|dat)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
refresh_pattern -i \.(class|jar|exe|gz|bz|bz2|tar|tgz|zip|gzip|arj|ace|bin|cab|msi|rar)(\?.*|$) 4320 100% 43200 ignore-no-cache ignore-private override-expire override-lastmod reload-into-ims ignore-stale-while-revalidate ignore-auth negative-ttl=0
# Web Page
refresh_pattern -i \.(htm|html|mhtml|css|js)(\?.*|$) 1440 90% 86400 reload-into-ims
# General
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

#=============================================
# http_access
#=============================================
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow all
http_access deny all

icp_access allow localnet
icp_access deny all
icp_port 0

buffered_logs on

acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

forwarded_for off

#=============================================
# Header Access Control
#=============================================
header_access From deny all
header_access Server deny all
header_access Link deny all
header_access Via deny all
header_access X-Forwarded-For deny all

httpd_suppress_version_string on

shutdown_lifetime 10 seconds

snmp_port 3401
snmp_access allow snmppublic all
dns_timeout 1 minutes

#=============================================
# DNS
#=============================================
dns_nameservers 8.8.8.8 8.8.4.4

#=============================================
# Accelerator
#=============================================
fqdncache_size 16384
ipcache_size 16384
ipcache_low 97
ipcache_high 99
log_fqdn off
memory_pools off

maximum_single_addr_tries 2
retry_on_error on

icp_hit_stale on

strip_query_terms on

query_icmp on
reload_into_ims on
emulate_httpd_log off
negative_ttl 0 seconds
pipeline_prefetch on
vary_ignore_expire on
half_closed_clients off
high_page_fault_warning 2
nonhierarchical_direct on
prefer_direct off
client_db on
max_filedescriptors 8192

#=============================================
# Administrative Parameters
#=============================================
cache_mgr fathayu@gmail.com
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.fathayu.com
unique_hostname fathayu.com
cachemgr_passwd none all

#=============================================
# ZPH Option
#=============================================
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136

Squid StartUp

#! /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

NAME=squid
DAEMON=/usr/sbin/squid
LIB=/usr/lib/squid
PIDFILE=/var/run/$NAME.pid
SQUID_ARGS="-D -YC"

[ ! -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
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`
ctp=`grepconf cache_dir ufs`

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" ] || [ "$ctp" = "coss" -a ! -w "$cdr" ]
then
log_warning_msg "Creating squid cache structure"
$DAEMON $SQUID_ARGS -z
fi

if [ "$CHUID" = "" ]; then
CHUID=root
fi

maxfds
umask 027
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 $?
else
log_end_msg $?
fi
;;
    stop)
log_daemon_msg "Stopping Squid HTTP proxy" "squid"
if stop ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
    reload|force-reload)
log_action_msg "Reloading Squid configuration files"
$DAEMON -k reconfigure
log_action_end_msg 0
;;
    restart)
log_daemon_msg "Restarting Squid HTTP proxy" "squid"
stop
if start ; then
log_end_msg $?
else
log_end_msg $?
fi
;;
    status)
status_of_proc -p "$PIDFILE" "$DAEMON" squid && exit 0 || exit $?
;;
    *)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}"
exit 3
;;
esac

exit 0

Installasi Squid 2.7 Stable9

pico /etc/apt/sources.list
deb http://id.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://id.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://id.archive.ubuntu.com/ubuntu/ xenial universe
deb http://id.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://id.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://id.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://id.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse

deb http://kambing.ui.ac.id/ubuntu/ precise-proposed main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise-updates main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ precise main restricted universe multiverse

apt-get update &&
apt-get install gcc -y &&
apt-get install build-essential -y &&
apt-get install libstdc++6 -y &&
apt-get install unzip -y &&
apt-get install bzip2 -y &&
apt-get install sharutils -y &&
apt-get install ccze -y &&
apt-get install libzip-dev -y &&
apt-get install automake1.9 -y &&
apt-get install acpid -y &&
apt-get install libfile-readbackwards-perl -y &&
apt-get install dnsmasq -y &&
cd /tmp &&
wget -c http://www.squid-cache.org/Versions/v2/2.7/squid-2.7.STABLE9.tar.gz &&
tar -xvzf squid-2.7.STABLE9.tar.gz &&
cd squid-2.7.STABLE9 &&
./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 \
--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 \
--enable-referer-log \
--enable-icap-client \
--enable-http-violations \
--enable-useragent-log \
--with-maxfd=65536 &&
make &&
make install

mkdir /var/log/squid &&
chown proxy:proxy /var/log/squid

rm /etc/squid/squid.conf &&
cd /etc/squid/

wget -c http://download1506.mediafire.com/4dr2i82s89og/1a4cvy4363ahwhb/squid.conf &&
wget -c http://download1499.mediafire.com/kgpl0qlkmhcg/95zvs7l4742bkb9/storeurl.pl &&

chmod +x /etc/squid/storeurl.pl &&
chown proxy:proxy /cache1 &&
chown proxy:proxy /cache2 &&
chown proxy:proxy /cache3 &&
chmod -R  777 /cache1 &&
chmod -R  777 /cache2 &&
chmod -R  777 /cache3 &&
squid -z &&
cd /etc/init.d/

wget -c http://download1649.mediafire.com/bbo3iqw5610g/qhz55hcbhhj4f9b/squid &&

chmod +x /etc/init.d/squid &&
reboot

/etc/init.d/squid restart &&
update-rc.d squid defaults

squid -NdD1

tail -f /var/log/squid/access.log | ccze

Load Balanced

/interface ethernet
set [ find default-name=ether1 ] name=ether1-sinar-mas
set [ find default-name=ether2 ] name=ether2-r3
set [ find default-name=ether3 ] disabled=yes name=ether3-telkom6.1
set [ find default-name=ether4 ] loop-protect=on name=ether4-telkom4.1
set [ find default-name=ether5 ] disabled=yes loop-protect=on name=\
    ether5-telkom2.1
set [ find default-name=ether9 ] name=ether9-monitoring
set [ find default-name=ether10 ] name=ether10-client
/interface list
add name=wan
add name=lan
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.222.1-192.168.222.253
add name=pool1 ranges=10.1.1.2-10.1.1.250
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether9-monitoring name=\
    dhcp1
/ppp profile
add change-tcp-mss=yes dns-server=8.8.8.8 local-address=10.1.1.1 name=test \
    remote-address=pool1 use-encryption=yes
/queue type
set 5 pcq-classifier=src-address,src-port
set 6 pcq-classifier=dst-address,dst-port
/queue tree
add name=all-browsing-down parent=global queue=pcq-download-default
add name=browsing-down-sinar-mas packet-mark=browsing-down-sinar-mas parent=\
    all-browsing-down queue=pcq-download-default
add burst-limit=40M burst-threshold=35M burst-time=10s limit-at=25M \
    max-limit=30M name=browsing-down-r3 packet-mark=browsing-down-r3 parent=\
    all-browsing-down queue=pcq-download-default
add name=all-browsing-up parent=global queue=pcq-upload-default
add name=browsing-up-sinar-mas packet-mark=browsing-up-sinar-mas parent=\
    all-browsing-up queue=pcq-upload-default
add name=browsing-up-r3 packet-mark=browsing-up-r3 parent=all-browsing-up \
    queue=pcq-upload-default
add name=all-non-browsing-down parent=global priority=1 queue=\
    pcq-download-default
add name=non-browsing-down-sinar-mas packet-mark=non-browsing-down-sinar-mas \
    parent=all-non-browsing-down priority=1 queue=pcq-download-default
add name=non-browsing-down-r3 packet-mark=non-browsing-down-r3 parent=\
    all-non-browsing-down priority=1 queue=pcq-download-default
add name=all-non-browsing-up parent=global priority=1 queue=\
    pcq-upload-default
add name=non-browsing-up-sinar-mas packet-mark=non-browsing-up-sinar-mas \
    parent=all-non-browsing-up priority=1 queue=pcq-upload-default
add name=non-browsing-up-r3 packet-mark=non-browsing-up-r3 parent=\
    all-non-browsing-up priority=1 queue=pcq-upload-default
add name=browsing-down-telkom6.1 packet-mark=browsing-down-telkom6.1 parent=\
    all-browsing-down queue=pcq-download-default
add name=browsing-up-telkom6.1 packet-mark=browsing-up-telkom6.1 parent=\
    all-browsing-up queue=pcq-upload-default
add name=non-browsing-down-telkom6.1 packet-mark=non-browsing-down-telkom6.1 \
    parent=all-non-browsing-down priority=1 queue=pcq-download-default
add name=non-browsing-up-telkom6.1 packet-mark=non-browsing-up-telkom6.1 \
    parent=all-non-browsing-up priority=1 queue=pcq-upload-default
add name=browsing-down-telkom4.1 packet-mark=browsing-down-telkom4.1 parent=\
    all-browsing-down queue=pcq-download-default
add name=browsing-down-telkom2.1 packet-mark=browsing-down-telkom2.1 parent=\
    all-browsing-down queue=pcq-download-default
add name=browsing-up-telkom4.1 packet-mark=browsing-up-telkom4.1 parent=\
    all-browsing-up queue=pcq-upload-default
add name=browsing-up-telkom2.1 packet-mark=browsing-up-telkom2.1 parent=\
    all-browsing-up queue=pcq-upload-default
add name=non-browsing-down-telkom4.1 packet-mark=non-browsing-down-telkom4.1 \
    parent=all-non-browsing-down priority=1 queue=pcq-download-default
add name=non-browsing-down-telkom2.1 packet-mark=non-browsing-down-telkom2.1 \
    parent=all-non-browsing-down priority=1 queue=pcq-download-default
add name=non-browsing-up-telkom4.1 packet-mark=non-browsing-up-telkom4.1 \
    parent=all-non-browsing-up priority=1 queue=pcq-upload-default
add name=non-browsing-up-telkom2.1 packet-mark=non-browsing-up-telkom2.1 \
    parent=all-non-browsing-up priority=1 queue=pcq-upload-default
/interface list member
add interface=ether1-sinar-mas list=wan
add interface=ether2-r3 list=wan
add interface=ether9-monitoring list=lan
add interface=ether10-client list=lan
/interface pptp-server server
set authentication=pap,chap default-profile=test enabled=yes
/ip address
add address=192.168.110.2/24 interface=ether1-sinar-mas network=192.168.110.0
add address=103.254.126.202/30 interface=ether2-r3 network=103.254.126.200
add address=192.168.222.254/24 interface=ether9-monitoring network=\
    192.168.222.0
add address=192.168.111.254/24 interface=ether10-client network=192.168.111.0
add address=192.168.205.53/29 interface=ether2-r3 network=192.168.205.48
add address=192.168.6.2/24 interface=ether3-telkom6.1 network=192.168.6.0
add address=192.168.4.2/24 interface=ether4-telkom4.1 network=192.168.4.0
add address=192.168.2.3/24 interface=ether5-telkom2.1 network=192.168.2.0
/ip dhcp-server network
add address=192.168.222.0/24 gateway=192.168.222.254
/ip dns
set allow-remote-requests=yes cache-size=4096KiB servers=\
    8.8.8.8,8.8.4.4,103.254.126.18,208.67.220.220,208.67.222.222
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall address-list
add address=www.speedtest.net list=to-data
add address=speedtest.cbn.net.id list=to-data
add address=whatismyipaddress.com list=to-data
add address=www.facebook.com list=to-sinar-mas
add address=www.youtube.com list=to-sinar-mas
add address=www.instagram.com list=to-sinar-mas
add address=www.whatsapp.com list=to-sinar-mas
add address=play.google.com list=to-sinar-mas
add address=www.google.com list=to-sinar-mas
add address=www.google.co.id list=to-sinar-mas
add address=www.twitter.com list=to-sinar-mas
add address=www.path.com list=to-sinar-mas
add address=www.blogspot.com list=to-sinar-mas
add address=www.yahoo.com list=to-sinar-mas
add address=www.kaskus.co.id list=to-sinar-mas
add address=www.wordpress.com list=to-sinar-mas
add address=www.detik.com list=to-sinar-mas
add address=www.ask.com list=to-sinar-mas
add address=www.mediafire.com list=to-sinar-mas
add address=www.debian.org list=to-sinar-mas
add address=gensho.ftp.acc.umu.se list=to-sinar-mas
add address=kambing.ui.ac.id list=to-sinar-mas
add address=sourceforge.net list=to-sinar-mas
add address=amazonaws.com list=to-sinar-mas
add address=unetbootin.org list=to-sinar-mas
/ip firewall filter
add action=drop chain=input in-interface=ether2-r3 src-address=192.168.5.1
add action=drop chain=input comment="drop ftp brute forcers" dst-port=21 \
    protocol=tcp src-address-list=ftp_blacklist
add action=accept chain=output content="530 Login incorrect" dst-limit=\
    1/1m,9,dst-address/1m protocol=tcp
add action=add-dst-to-address-list address-list=ftp_blacklist \
    address-list-timeout=3h chain=output content="530 Login incorrect" \
    protocol=tcp
add action=drop chain=input comment="drop ssh brute forcers" dst-port=22-23 \
    protocol=tcp src-address-list=ssh_blacklist
add action=add-src-to-address-list address-list=ssh_blacklist \
    address-list-timeout=1w3d chain=input connection-state=new dst-port=22-23 \
    protocol=tcp src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 \
    address-list-timeout=1m chain=input connection-state=new dst-port=22-23 \
    protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 \
    address-list-timeout=1m chain=input connection-state=new dst-port=22-23 \
    protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 \
    address-list-timeout=1m chain=input connection-state=new dst-port=22-23 \
    protocol=tcp
add action=drop chain=forward comment="drop ssh brute downstream" dst-port=\
    22-23 protocol=tcp src-address-list=ssh_blacklist
add action=drop chain=input dst-port=53 in-interface=ether1-sinar-mas \
    protocol=udp
add action=drop chain=input dst-port=53 in-interface=ether2-r3 protocol=udp
add action=drop chain=input dst-port=53 in-interface=ether3-telkom6.1 \
    protocol=udp
add action=drop chain=input dst-port=53 in-interface=ether4-telkom4.1 \
    protocol=udp
add action=drop chain=input dst-port=53 in-interface=ether5-telkom2.1 \
    protocol=udp
/ip firewall mangle
add action=accept chain=prerouting dst-address=192.168.110.0/24 in-interface=\
    ether1-sinar-mas
add action=accept chain=prerouting dst-address=103.254.126.0/24 in-interface=\
    ether2-r3
add action=accept chain=prerouting dst-address=192.168.205.0/24 in-interface=\
    ether2-r3
add action=accept chain=prerouting dst-address=192.168.6.0/24 in-interface=\
    ether3-telkom6.1
add action=accept chain=prerouting dst-address=192.168.4.0/24 in-interface=\
    ether4-telkom4.1
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=\
    ether5-telkom2.1
add action=mark-connection chain=input comment=\
    "input-output interface yang sama" connection-state=new in-interface=\
    ether1-sinar-mas new-connection-mark=conn-wan1 passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=\
    ether2-r3 new-connection-mark=conn-wan2 passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=\
    ether3-telkom6.1 new-connection-mark=conn-wan3 passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=\
    ether4-telkom4.1 new-connection-mark=conn-wan4 passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=\
    ether5-telkom2.1 new-connection-mark=conn-wan5 passthrough=yes
add action=mark-connection chain=prerouting connection-state=established \
    in-interface=ether1-sinar-mas new-connection-mark=conn-wan1 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=established \
    in-interface=ether2-r3 new-connection-mark=conn-wan2 passthrough=yes
add action=mark-connection chain=prerouting connection-state=established \
    in-interface=ether3-telkom6.1 new-connection-mark=conn-wan3 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=established \
    in-interface=ether4-telkom4.1 new-connection-mark=conn-wan4 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=established \
    in-interface=ether5-telkom2.1 new-connection-mark=conn-wan5 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=related \
    in-interface=ether1-sinar-mas new-connection-mark=conn-wan1 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=related \
    in-interface=ether2-r3 new-connection-mark=conn-wan2 passthrough=yes
add action=mark-connection chain=prerouting connection-state=related \
    in-interface=ether3-telkom6.1 new-connection-mark=conn-wan3 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=related \
    in-interface=ether4-telkom4.1 new-connection-mark=conn-wan4 passthrough=\
    yes
add action=mark-connection chain=prerouting connection-state=related \
    in-interface=ether5-telkom2.1 new-connection-mark=conn-wan5 passthrough=\
    yes
add action=mark-routing chain=output connection-mark=conn-wan1 \
    new-routing-mark=to-wan1 passthrough=no
add action=mark-routing chain=output connection-mark=conn-wan2 \
    new-routing-mark=to-wan2 passthrough=no
add action=mark-routing chain=output connection-mark=conn-wan3 \
    new-routing-mark=to-wan3 passthrough=no
add action=mark-routing chain=output connection-mark=conn-wan4 \
    new-routing-mark=to-wan4 passthrough=no
add action=mark-routing chain=output connection-mark=conn-wan5 \
    new-routing-mark=to-wan5 passthrough=no
add action=mark-connection chain=prerouting comment=speedtest \
    dst-address-list=to-data in-interface=ether10-client new-connection-mark=\
    conn-speedtest passthrough=yes
add action=mark-routing chain=prerouting connection-mark=conn-speedtest \
    in-interface=ether10-client new-routing-mark=to-wan2 passthrough=no
add action=mark-connection chain=prerouting comment=non-browsing dst-port=\
    !80,443 in-interface=ether10-client new-connection-mark=conn-non-browsing \
    passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting dst-port=!80,443 in-interface=\
    ether10-client new-connection-mark=conn-non-browsing passthrough=yes \
    protocol=udp
add action=mark-routing chain=prerouting connection-mark=conn-non-browsing \
    in-interface=ether10-client new-routing-mark=to-non-browsing passthrough=\
    no
add action=mark-packet chain=forward comment="mangle queue tree" \
    in-interface=ether1-sinar-mas new-packet-mark=non-browsing-down-sinar-mas \
    passthrough=no protocol=tcp src-port=!80,443
add action=mark-packet chain=forward in-interface=ether1-sinar-mas \
    new-packet-mark=non-browsing-down-sinar-mas passthrough=no protocol=udp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether2-r3 new-packet-mark=\
    non-browsing-down-r3 passthrough=no protocol=tcp src-port=!80,443
add action=mark-packet chain=forward in-interface=ether2-r3 new-packet-mark=\
    non-browsing-down-r3 passthrough=no protocol=udp src-port=!80,443
add action=mark-packet chain=forward in-interface=ether3-telkom6.1 \
    new-packet-mark=non-browsing-down-telkom6.1 passthrough=no protocol=tcp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether3-telkom6.1 \
    new-packet-mark=non-browsing-down-telkom6.1 passthrough=no protocol=udp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether4-telkom4.1 \
    new-packet-mark=non-browsing-down-telkom4.1 passthrough=no protocol=tcp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether4-telkom4.1 \
    new-packet-mark=non-browsing-down-telkom4.1 passthrough=no protocol=udp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether5-telkom2.1 \
    new-packet-mark=non-browsing-down-telkom2.1 passthrough=no protocol=tcp \
    src-port=!80,443
add action=mark-packet chain=forward in-interface=ether5-telkom2.1 \
    new-packet-mark=non-browsing-down-telkom2.1 passthrough=no protocol=udp \
    src-port=!80,443
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-sinar-mas out-interface=ether1-sinar-mas passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-sinar-mas out-interface=ether1-sinar-mas passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-r3 out-interface=ether2-r3 passthrough=no protocol=tcp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-r3 out-interface=ether2-r3 passthrough=no protocol=udp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom6.1 out-interface=ether3-telkom6.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom6.1 out-interface=ether3-telkom6.1 passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom4.1 out-interface=ether4-telkom4.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom4.1 out-interface=ether4-telkom4.1 passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom2.1 out-interface=ether5-telkom2.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=!80,443 new-packet-mark=\
    non-browsing-up-telkom2.1 out-interface=ether5-telkom2.1 passthrough=no \
    protocol=udp
add action=mark-packet chain=forward in-interface=ether1-sinar-mas \
    new-packet-mark=browsing-down-sinar-mas passthrough=no protocol=tcp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether1-sinar-mas \
    new-packet-mark=browsing-down-sinar-mas passthrough=no protocol=udp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether2-r3 new-packet-mark=\
    browsing-down-r3 passthrough=no protocol=tcp src-port=80,443
add action=mark-packet chain=forward in-interface=ether2-r3 new-packet-mark=\
    browsing-down-r3 passthrough=no protocol=udp src-port=80,443
add action=mark-packet chain=forward in-interface=ether3-telkom6.1 \
    new-packet-mark=browsing-down-telkom6.1 passthrough=no protocol=tcp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether3-telkom6.1 \
    new-packet-mark=browsing-down-telkom6.1 passthrough=no protocol=udp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether4-telkom4.1 \
    new-packet-mark=browsing-down-telkom4.1 passthrough=no protocol=tcp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether4-telkom4.1 \
    new-packet-mark=browsing-down-telkom4.1 passthrough=no protocol=udp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether5-telkom2.1 \
    new-packet-mark=browsing-down-telkom2.1 passthrough=no protocol=tcp \
    src-port=80,443
add action=mark-packet chain=forward in-interface=ether5-telkom2.1 \
    new-packet-mark=browsing-down-telkom2.1 passthrough=no protocol=udp \
    src-port=80,443
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-sinar-mas out-interface=ether1-sinar-mas passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-sinar-mas out-interface=ether1-sinar-mas passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-r3 out-interface=ether2-r3 passthrough=no protocol=tcp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-r3 out-interface=ether2-r3 passthrough=no protocol=udp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom6.1 out-interface=ether3-telkom6.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom6.1 out-interface=ether3-telkom6.1 passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom4.1 out-interface=ether4-telkom4.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom4.1 out-interface=ether4-telkom4.1 passthrough=no \
    protocol=udp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom2.1 out-interface=ether5-telkom2.1 passthrough=no \
    protocol=tcp
add action=mark-packet chain=forward dst-port=80,443 new-packet-mark=\
    browsing-up-telkom2.1 out-interface=ether5-telkom2.1 passthrough=no \
    protocol=udp
/ip firewall nat
add action=redirect chain=dstnat dst-port=53 protocol=tcp to-ports=53
add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53
add action=masquerade chain=srcnat out-interface=ether1-sinar-mas \
    to-addresses=192.168.4.1
add action=masquerade chain=srcnat out-interface=ether2-r3 to-addresses=\
    192.168.5.1
add action=masquerade chain=srcnat out-interface=ether3-telkom6.1 \
    to-addresses=192.168.5.1
add action=masquerade chain=srcnat out-interface=ether4-telkom4.1 \
    to-addresses=192.168.5.1
add action=masquerade chain=srcnat out-interface=ether5-telkom2.1 \
    to-addresses=192.168.5.1
add action=masquerade chain=srcnat
/ip route
add check-gateway=ping distance=1 gateway=192.168.110.1 routing-mark=to-wan1
add check-gateway=ping distance=1 gateway=103.254.126.201 routing-mark=\
    to-wan2
add check-gateway=ping distance=1 gateway=192.168.6.1 routing-mark=to-wan3
add check-gateway=ping distance=1 gateway=192.168.4.1 routing-mark=to-wan4
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to-wan5
add check-gateway=ping distance=1 gateway=103.254.126.201 routing-mark=\
    to-non-browsing
add check-gateway=ping distance=2 gateway=192.168.110.1 routing-mark=\
    to-non-browsing
add check-gateway=ping distance=3 gateway=192.168.6.1 routing-mark=\
    to-non-browsing
add check-gateway=ping distance=4 gateway=192.168.4.1 routing-mark=\
    to-non-browsing
add check-gateway=ping distance=5 gateway=192.168.2.1 routing-mark=\
    to-non-browsing
add check-gateway=ping distance=1 gateway=\
    192.168.110.1,103.254.126.201,192.168.4.1,192.168.2.1,192.168.6.1
/ppp aaa
set interim-update=1m use-circuit-id-in-nas-port-id=yes use-radius=yes
/radius
add address=47.75.230.175 secret=test service=ppp
/radius incoming
set accept=yes
/system clock
set time-zone-name=Asia/Jakarta
/system identity
set name=test
/system note
set note="Using nice.rsc from www.mikrotik.co.id, 25 April 2018 13:14:12 WIB, \
    2394 lines."
/system scheduler
add interval=30m name=a on-event=ip policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-time=startup
/system script
add name=ip owner=fathayu policy=\
    reboot,read,write,policy,test,password,sniff,sensitive source="{/tool fetc\
    h url=(\"http://www.boss-ip.com/Core/Update.ashx\\\?key=85454d8bb84998fa&a\
    ction=upload&sncode=B70DF530B466DA11401E79BF0E241048&dynamic=static\")}"
/tool netwatch
add host=192.168.4.1 interval=1s timeout=50ms
add host=192.168.2.1 interval=1s timeout=50ms
add host=192.168.6.1 interval=1s timeout=50ms
add host=192.168.110.1 interval=1s timeout=50ms
add host=103.254.126.201 interval=1s timeout=50ms
add host=192.168.205.50 interval=1s timeout=50ms
add host=192.168.205.51 interval=1s timeout=50ms
add host=192.168.110.21 interval=1s timeout=50ms
add host=192.168.110.22 interval=1s timeout=50ms
add host=8.8.8.8 interval=1s timeout=50ms
add host=8.8.4.4 interval=1s timeout=50ms
add host=208.67.220.220 interval=1s timeout=50ms
add host=208.67.222.222 interval=1s timeout=50ms
add host=192.168.110.23 interval=1s timeout=50ms

Load Balanced + Proxy External

Basic configuration : /ip address add address=192.168.1.10/24 broadcast=192.168.1.255 comment="" disabled=no interface=ether1-...