[HOT POOLLING]Apakah Youtube Error Lagi ?

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
Post Reply
User avatar
bayuubuntu
Posts: 14
Joined: 28 Mar 2013, 12:38
Location: Bandung, Indonesia

Re: [HOT POOLLING]Apakah Youtube Error Lagi ?

Post by bayuubuntu » 29 Mar 2013, 19:38

@zero44, klo saya pakai server ubuntu 10.10, coba aja dulu ganti.. :grin:


User avatar
zero44
Posts: 30
Joined: 29 Mar 2013, 09:12

Post by zero44 » 29 Mar 2013, 20:33

mas bayu & Mas pangola_pati bisa beri link refrensi instal squid di ubuntu mas.., soalnya untuk memastikan saja, siapa tau cara saya selama ini salah mas...,soalnya di search gak ketemu tutornya di forum ini..,
makasih atas bantuan nya mas


User avatar
Aira
Posts: 70
Joined: 22 Mar 2012, 21:20

Post by Aira » 29 Mar 2013, 21:31

Pragola_Pati wrote:@Aira
Aira wrote:Tolong dunk mas Pragola kenapa ya yang sya jadi tidak mau hit lagi youtubenya padahal kemarin2 sudah lancar tapi sekarang ga mau tercahce... Minta tolong koreksi acl saya dan kalo ada yang mau berbagi tentang aclnya dan refresh_patern nya terimakasih.
Aneh .... masak cuman one-day trial ? :)
Aira wrote:Tanya lagi dah biar ga tambah mumet...
Kenapa youtube kalo depannya ada https tidak mau tercache...?
Kalo youtube tidak ada https bisa tercace...?
Proxy hanya mampu mencache http bukan htpps
Ya mas saya juga bingung kok bisa begitu padahal saya sudah coba berkali2 config tetap saja begitu. Sebelumnya ga ada masalah. Klo boleh minta acl + storeurl youtubenya mas pengen dicoba disini karena saya coba cari2 dan coba ganti dengan yang lain tetap sama begitu saja.
Sebelumnya terimakashih atas bantuannya...


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 29 Mar 2013, 21:39

@zero44
Popularitas squid itu ngalah2in OS-nya sendiri (baca ubuntu, debian centos dll). sehingga orang lebih mengenal proxy ketimbang ubuntu. dan khusus di kita, lusca lebih lebih populer daripada induknya, squid. Ini lebih sering mengacaukan kita yang nubi dalam mencari referensi, karena saking banyaknya yang menulis howto-nya dan meng-klaim high-performance. Begitu kita baca sampai pada susunan partisi-nya yang 1 HDD dipecah sampai 7 untuk direktori cache, ketahuan kelas-nya. Saran saya back-to-basic, kembalilah ke situs resminya squid.
cmiiw


User avatar
quppet
Posts: 11
Joined: 28 Mar 2013, 02:00
Location: Indonesia

Post by quppet » 30 Mar 2013, 00:15

kk-kk FUI... mau tanya ni?

apakah flash player mempengaruhi cache video youtube!!!!

Coz waktu aq install flash player versi terbaru, video youtube ter-cache menjadi beberapa bagian...

tpi waktu flash player masih versi lama, youtube ter-cache menjadi 1 bagian... alias 1x hit... jadi sekali play youtube langsung full...


User avatar
zero44
Posts: 30
Joined: 29 Mar 2013, 09:12

Post by zero44 » 30 Mar 2013, 00:35

sepertinya ada titik cerah mas.., test 7 vidio belum nyasar.., awalnya sempat nyasar tapi agak curiga sama plugin (mozila), extention (di crome)yg bisa ngeforce kualitas menjadi 240p, karna kemarin youtube gak kehit saya pake itu, biar ringan walaupun tanpa proxy.., ini saya disable plugin (mozila)/extention(crome).., nampaknya berjalan normal.., cuma ya gak tau kalo ada user yg suka mainin itu kwalitas vidio ke 240p masih ada kemungkinan kumat lagi.., tapi masih dipantau aja

**moga-moga bener nih penyakitnya dah mabok ngoprek terus**
terima kasih atas suport para sesepuh disini juga..,


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 02:21

@quppet
quppet wrote:kk-kk FUI... mau tanya ni?

apakah flash player mempengaruhi cache video youtube!!!!

Coz waktu aq install flash player versi terbaru, video youtube ter-cache menjadi beberapa bagian...

tpi waktu flash player masih versi lama, youtube ter-cache menjadi 1 bagian... alias 1x hit... jadi sekali play youtube langsung full...
FlashPlayer ver.Lama, versi berapa tepatnya mas ? Youtube melakukan splitting kira2 setahun yang lalu. Waktu itu kita juga kelabakan dihadapkan pada "an error occured, please try again". Apakah flashplayer yang anda maksud-kan, pada saat itu lancar ? tdk ketemu error tsb ?
Pengaruhnya itu yang saya tdk tahu mas, mungkin warga FUI lainnya ada yang punya pengalaman atau melakukan pengamatan yang seperti mas quppet lakukan

@zero44
zero44 wrote:sepertinya ada titik cerah mas.., test 7 vidio belum nyasar.., awalnya sempat nyasar tapi agak curiga sama plugin (mozila), extention (di crome)yg bisa ngeforce kualitas menjadi 240p, karna kemarin youtube gak kehit saya pake itu, biar ringan walaupun tanpa proxy.., ini saya disable plugin (mozila)/extention(crome).., nampaknya berjalan normal.., cuma ya gak tau kalo ada user yg suka mainin itu kwalitas vidio ke 240p masih ada kemungkinan kumat lagi.., tapi masih dipantau aja

**moga-moga bener nih penyakitnya dah mabok ngoprek terus**
terima kasih atas suport para sesepuh disini juga..,
Hebat mas zero44 ini, sampai detil ngopreknya. lanjut terus mas ... keep spirit :D


User avatar
quppet
Posts: 11
Joined: 28 Mar 2013, 02:00
Location: Indonesia

Post by quppet » 30 Mar 2013, 08:48

- flash player Ver-Lama q "shockwave flash 10.0.22.87"

- pesan error-nya cuma disuruh update flash player, tpi tinggal klik layarnya sudah bisa jalan tanpa update flash player.


sudah saya test beberapa video youtube hasilnya tetep sama seperti pertanyaan saya diatas mas...
aq install flash player versi terbaru, video youtube ter-cache menjadi beberapa bagian...
tpi waktu flash player masih versi lama, youtube ter-cache menjadi 1 bagian... alias 1x hit... jadi sekali play youtube langsung full...

apa mungkin dari flash player-nya mas...bukan dari proxy-squid-nya...
aq perhati'in flash player ver-lama selalu mengambil file yang utuh dari youtub...


User avatar
opung
Posts: 3
Joined: 23 Mar 2013, 13:26

Post by opung » 30 Mar 2013, 09:11

kemaren proxy sudah bagus dengan penambahan --enable-referer-log, tapi sekarang (30 maret) error lg youtube munculnya beda dengan yg dibuka, temen yg gimana? apa ada yg salah dengan proxy sy apa semuanya kaya kemaren.


User avatar
bayuubuntu
Posts: 14
Joined: 28 Mar 2013, 12:38
Location: Bandung, Indonesia

Post by bayuubuntu » 30 Mar 2013, 09:48

sama @opung dgn saya, kemaren sudah bagus, skrg kambuh lagi nih, nyetel videonya beda, berikut iklan2nya juga beda... wah harus ditunning lagi... :grin:


User avatar
opung
Posts: 3
Joined: 23 Mar 2013, 13:26

Post by opung » 30 Mar 2013, 09:51

dituning lg gimana caranya yah


User avatar
bayuubuntu
Posts: 14
Joined: 28 Mar 2013, 12:38
Location: Bandung, Indonesia

Post by bayuubuntu » 30 Mar 2013, 10:41

opung wrote:dituning lg gimana caranya yah

setel atau compile ulang squid sm luscanya... berikut config storeurl dan juga squid.conf nya..


User avatar
cah_clacap
Posts: 258
Joined: 19 Mar 2013, 23:07
Location: Cilacap
Contact:

Post by cah_clacap » 30 Mar 2013, 10:47

masa youtube error lg. Sy malah belum coba buka hari ini. Kalo bener eror lg, bisa berabe nich


User avatar
anbel
Posts: 263
Joined: 18 Mar 2013, 23:38
Location: Bogor - Jakarta
Contact:

Post by anbel » 30 Mar 2013, 10:59

@All

Saya punya masalah dg cache:
Ketika play youtube saat BW gak dapat jatah (maklum dishare)kira2 baru 1/4 videonya terpaksa terhenti dan gak ngebufer tapi langsung selesai, saat di play ulang hasil cache hanya sebatas 1/4 dari video yg di cache, dan klu direfress (CTRL + F5) mengulang dari awal bisa sampai selesai, Tapi hasil cache klu diplay lagi videonya ada 2 kali:
Video yg hasil cache 1 hanya 1/4 video dan langsung kembali putar video yg ke dua dari awal sampai selesai.
Tolong mastah dibantu.
Terima kasih


User avatar
anbel
Posts: 263
Joined: 18 Mar 2013, 23:38
Location: Bogor - Jakarta
Contact:

Post by anbel » 30 Mar 2013, 11:26

cah_clacap wrote:masa youtube error lg. Sy malah belum coba buka hari ini. Kalo bener eror lg, bisa berabe nich
Ngak kok Mas, youtube gak error masih bisa hit, cuma saya masih ada masalah klu gak jatah BW ngak mau ngebufer tiba2 langsung selesai dan kalau di play ulang hasil videonya gak sampai selesai langsung habis.


User avatar
adith
Posts: 2
Joined: 24 Mar 2013, 02:47
Location: samarinda,indonesia

Post by adith » 30 Mar 2013, 12:57

update storeurl bang ucok $ chudy
30/3/2013

#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
# rev by ucok_karnadi@yahoo.com
# Youtube updates at http://wiki.squid-cache.org/ConfigExamp ... Discussion

# http://www.facebook.com/stressss

$|=1;
while () {
@X = split;
$x = $X[0] . " ";

#facebook
if (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

#Speedtest
} elsif (m/^http\:\/\/.*\/speedtest\/(.*)\?.*/) {
print $x . "http://speedtest.SQUIDINTERNAL/speedtest/" . $1 . "\n";

#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

#BLOGSPOT
} elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) {
print $x . "http://blog-cdn." . $1 . "\n";

#ytimg
} elsif (m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
print $x . "http://cdn.ytimg.com" . $1 . "\n";

#AVAST
} elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
print $x . "http://avast-cdn." . $1 . "\n";

#KAV
} elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
print $x . "http://kav-cdn." . $1 . "\n";

#AVG
} elsif (m/^http:\/\/update.avg.com/) {
print $x . "http://avg-cdn." . $1 . "\n";

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

#gstatic and/or wikimapia
} elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
print $x . "http://" . $1 . $2 . "\n";

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

# for ALL Youtube ( range & non range )
# first you need do this
# install package dependencies "apt-get install libfile-readbackwards-perl"
# add line below to your squid config and remove "#"

# acl yutub url_regex -i .*youtube\.com\/.*$
# acl yutub url_regex -i .*youtu\.be\/.*$
# logformat squid1 %{Referer}>h %ru %Ss/%03Hs %new('/var/log/squid/access.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 close();
return $id;
}


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 13:07

@all
Untuk warga FUI yang belum berhasil menyesuaikan mesin proxy-nya dengan youtube atau yang belum puas dengan pencapaian yang sekarang, hendaknya mempertimbangkan =
1. Mesin (hardware) meliputi jumlah HDD, RAM, proc (amd/intel), NIC dan FSB motherboard.
2. topologi (full ubuntu sebagai server atau menggunakan mikrotik)
3. platform ubuntu 64 bit atau 32 bit.
4. versi ubuntu, usahakan yang LTS.
5. versi squid
squid memang menjajikan kekayaan fitur-nya. itu merupakan kelebihan squid yang sekaligus menjadi kekurangan-nya. Banyaknya fitur untuk melakukan konfigurasi berpotensi memberikan hasil yang berbeda (deviasi).


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 13:57

@adith
adith wrote:update storeurl bang ucok $ chudy
30/3/2013

# add line below to your squid config and remove "#"

# acl yutub url_regex -i .*youtube\.com\/.*$
# acl yutub url_regex -i .*youtu\.be\/.*$
Terima kasih mas, atas sharingnya. Sedikit pertanyaan, acl yang saya kutip itu kok tdk ada opsi kelanjutannya, seperti acl lainnya ?
:confused:

Sudah saya coba, not work di squid-2.7.STABLE9. Setelah saya kembalikan ke setting awal seperti di pejwan, malah it's work.


User avatar
anbel
Posts: 263
Joined: 18 Mar 2013, 23:38
Location: Bogor - Jakarta
Contact:

Post by anbel » 30 Mar 2013, 17:14

@Mas Adith
Terima kasih mas Adith sudah sharing update storeurl dan modif squidnya, sudah dicoba dan berjalan sempurna.


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 17:45

@adith
@anbel
Sip ... lah :D
Ternyata saya tadi kurang teliti, referer_log tidak saya hapus.

##apdet
Saya sudah test dengan menghapus referer_log, di squid-2.7.STABLE9 hasilnya malah selalu redirect. Saya coba kembalikan ke storeurl.pl di pejwan, lancar jaya :confused:

Saran=
Agar pengujian/test bisa lebih obyektif
1. Satukan link test =
http://www.youtube.com/watch?v=zPwMdZOl ... sults_main
2. Sebutkan versi squid
3. gambarkan secara singkat topologi

Mungkin ada tambahan dari warga lainnya ?
tq.


User avatar
niviedevi
Posts: 8
Joined: 27 Mar 2013, 16:40

Post by niviedevi » 30 Mar 2013, 18:44

Maaf nih newbie , problem squid HIT youtube sudah solved tapi yang mau saya tanyakan masalah youtube no-range
#==========================================================
# youtube no range
#=========================================================
acl norange url_regex ^.*youtube.com/videoplayback.*range=.*$
http_access deny norange

berhasil sih berhasil ... HIT langsung mentok. yang jadi masalah ada beberapa youtube yang ga bisa alias blank. Ada solusi buat ga blank. kalo saya tidak memakai acl norange , ga blank tapi HIT nya seperti streaming biasa.


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 19:57

@niviedevi
bisa lihat storeurl dan acl -nya mas ?


User avatar
emencavalera
Posts: 8
Joined: 30 Mar 2013, 21:09

Post by emencavalera » 30 Mar 2013, 21:11

Pragola_Pati wrote:Sejak kemarin Sabtu 16 Maret 2013, youtube error. Kasus-nya begini =

1. Yang terputar lebih sering dalam screenshot berikut =

[img]http://s20.postimage.org/lfdsmzb3h/youtube_error.png[/img]

Jika kita klik apapun, lebih sering redirect ke link berikut =
http://www.youtube.com/watch?v=InRDF_0lfHk

2. Untuk lebih meyakinkan, saya coba searching dengan menuliskan "Rolling Stones Paint In Black". Pada halaman yang muncul, saya klik salah satunya lebih sering (cenderung selalu) redirect ke link di atas ( seperti dalam skringsut).

3. Kepada warga lain yang, mohon untuk mencobanya dan saya minta tolong hasilnya di posting di sini. Dilengkapi dengan skringsut dan link youtube-nya yang error tsb.

Terima kasih :confused:

[size:17pt]##Resume##[/size]
Namanya juga diskusi, harus ada resume. jiak nggaya :D

[size:17pt]UPIL ULANG | JANGAN INSTALL ULANG[/size]

Sebenarnya tdk perlu sampai install ulang begitu, cukup dengan ngupil ulang (re-compile) sudah bisa. Dan yang banyak menjadi pertanyaan bagi warga FUI, adalah bagaimana cara memasukkkan option --enable-referer-log ? Untuk tujuan tersebut ikuti saja langkah2 dibawah ini, dan harap diperhatikan isi file dalam direktori /etc/squid jangan dirubah (otak-atik) kecuali file storeurl.pl.
  • Temukan versi squid anda

Code: Select all

squid -v
Output-nya, jika menggunakan squid-2.7.9 seperti di bawah ini =
[spoiler]Squid Cache: Version 2.7.STABLE9
configure options: '-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-gnuregex' '--enable-async-io=24' '--with-aufs-threads=24' '--with-pthreads' '--with-aio' '--with-dl' '--enable-storeio=aufs,null' '--enable-removal-policies=heap' '--enable-icmp' '--enable-delay-pools' '--disable-wccp' '--enable-snmp' '--enable-cache-digests' '--enable-default-err-language=English' '--enable-err-languages=English' '--enable-linux-netfilter' '--disable-ident-lookups' '--with-maxfd=65535' '--enable-follow-x-forwarded-for' '--enable-large-cache-files' '--with-large-files' '--enable-referer-log' 'CFLAGS=-march=amdfam10 -O2 -pipe'[/spoiler]
Untuk lusca, hasilnya kurang lebih sama. Di situ terlihat, kecuali kita mendapatkan informasi tentang versi squid yang kita gunakan yaitu squid-2.7.STABLE9, kita juga mendapatkan informasi bagaimana konfigurasi squid pada saat di compile.
  • Temukan lokasi UPIL yang dulu dilakukan, jika menggunakan squid-2.7.STABLE9 =

Code: Select all

# locate squid-2.7.STABLE9
Cuplikan output-nya seperti di bawah ini =

Code: Select all

/home/share_2/arsip/squid/squid-2.7.STABLE9/tools/cossdump.c
/home/share_2/arsip/squid/squid-2.7.STABLE9/tools/squidclient.c
/home/share_2/arsip/squid/squid-2.7.STABLE9/tools/.deps/cachemgr__CGIEXT_-cachemgr.Po
/home/share_2/arsip/squid/squid-2.7.STABLE9/tools/.deps/cossdump.Po
/home/share_2/arsip/squid/squid-2.7.STABLE9/tools/.deps/squidclient.Po
Jadi, lokasi path installasi squid berada di direktori /home/share_2/arsip/squid/squid-2.7.STABLE9. Jika menggunakan lusca =

Code: Select all

# locate LUSCA_HEAD-r14809
Dan cuplikan output-nya seperti di bawah ini =

Code: Select all

/home/share_2/arsip/squid/LUSCA_HEAD-r14809
  • Masuk ke direktori tersebut di atas, jika menggunakan squid-2.7.STABLE9 =

Code: Select all

# cd /home/share_2/arsip/squid/squid-2.7.STABLE9
# apt-get install libfile-readbackwards-perl -y
Jika menggunakan lusca =

Code: Select all

# cd /home/share_2/arsip/squid/LUSCA_HEAD-r14809
# apt-get install libfile-readbackwards-perl -y
  • Dari lokasi ini, lakukan uninstall squid (lusca) anda dan kompil ulang. Baik squid-2.7.STABLE9 maupun LUSCA_HEAD-r14809 caranya sama.

Code: Select all

# squid -k shutdown
#kalau diperlukan cek dengan baris berikut
#untuk memastikan tidak ada squid ID process yang berjalan
# ps aux | grep squid  
# make uninstall
  • Lakukan konfigurasi dengan bekal output perintah squid -z di atas . Sudah tentu jangan ditelan mentah, lakukan modifikasi sesuai kondisi anda. Dalam contoh di bawah ini yang paling besar kemungkinannya menjadi faktor pembeda adalah CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}" karena perbedaan arsitektur processor kita. Dan jangan lupa, opsi --enable-referer-log harus ada di dalamnya.

Code: Select all

CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}" \
./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-gnuregex --enable-async-io=24 --with-aufs-threads=24 \
--with-pthreads --with-aio --with-dl --enable-storeio=aufs,null \
--enable-removal-policies=heap --enable-icmp --enable-delay-pools --disable-wccp \
--enable-snmp --enable-cache-digests --enable-default-err-language=English \
--enable-err-languages=English --enable-linux-netfilter --disable-ident-lookups \
--with-maxfd=65535 --enable-follow-x-forwarded-for --enable-large-cache-files \
--with-large-files --enable-referer-log
  • Jika menggunakan squid-2.7.STABLE9, lanjutkan dengan perintah =

Code: Select all

# make
# umask 022
# make install
# make clean
# /etc/init.d/squid stop
# echo "referer_log /var/log/squid/referer.log" >> /etc/squid/squid.conf
# squid -f /etc/squid/squid.conf -z
# /etc/init.d/squid start
# ps aux | grep squid
Jika menggunakan LUSCA_HEAD-r14809 =

Code: Select all

# make
# make install
# /etc/init.d/squid stop
# echo "referer_log /var/log/squid/referer.log" >> /etc/squid/squid.conf
# squid -f /etc/squid/squid.conf -z
# /etc/init.d/squid start
# ps aux | grep squid
That all about recompile :D

[size:17pt]KASUS | DIREKTORI COMPILE TERHAPUS[/size]
Jika anda tidak menemukan direktori tempat anda dulu melakukan NGUPIL, mau-tidak-mau anda harus menghapus path hasil installasi sebelumnya dengan bekal output perintah squid -v di atas. Hapus satu per satu path tersebut. Dan sebelum menghapus direktori tsb, kill semua proses squid dengan perintah squid -k shutdown

Demikian, selamat ngoprek :D
[size:17pt]storeurl.pl TESTED ON
LUSCA_HEAD-r14809 & squid-2.7.STABLE9[/size]
@chudy_fernandez@yahoo.com
@ucok_karnadi@yahoo.com
@Syaifuddin JW
@Robbyn
@Juldian Tan

Mohon ijin kopas di pejwan u/ warga FUI ya mas ?


Temukan file storeurl.pl dan edit dengan cara sebagai berikut =

Code: Select all

~# locate storeurl.pl
/etc/squid/storeurl.pl
~# cp /etc/squid/storeurl.pl > /etc/squid/storeurl.pl_old
~# nano /etc/squid/storeurl.pl
Hapus semuanya, dan ganti (kopas) dengan yang ada di spoiler di bawah ini.

[spoiler]

Code: Select all

#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
# rev by ucok_karnadi@yahoo.com
# Youtube updates at http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube/Discussion
# http://www.facebook.com/stressss

$|=1;
while (<>) {
@X = split;
$x = $X[0] . " ";

		#facebook
if (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
	print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

		#Speedtest
} elsif (m/^http\:\/\/.*\/speedtest\/(.*)\?.*/) {
	print $x . "http://speedtest.SQUIDINTERNAL/speedtest/" . $1 . "\n";

		#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
	print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

		#BLOGSPOT
} elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) {
	print $x . "http://blog-cdn." . $1 . "\n";

		#ytimg
} elsif (m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
	print $x . "http://cdn.ytimg.com" . $1 . "\n";

		#AVAST
} elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
	print $x . "http://avast-cdn." . $1 . "\n";

		#KAV
} elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
	print $x . "http://kav-cdn." . $1 . "\n";

		#AVG
} elsif (m/^http:\/\/update.avg.com/) {
	print $x . "http://avg-cdn." . $1 . "\n";

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

		#gstatic and/or wikimapia
} elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
	print $x . "http://" . $1 . $2 . "\n";

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

		# for ALL Youtube ( range & non range )
		# first you need do this
		# build your squid with "--enable-referer-log"
		# install package dependencies "apt-get install libfile-readbackwards-perl"
		# add this "referer_log /var/log/squid/referer.log" to your squid config

} elsif ($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://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range\n";

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

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

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

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

		#cdn, varialble 1st path
} 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://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

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

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

		#domain/path/.*/path/filename
} elsif (($X[1] =~ /fucktube/) && (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 . "http://" . $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/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
	print $x . "http://cdn." . $4 . $6 . "\n";

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

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

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

		#youjizz. We use only domain and filename
} elsif (($X[1] =~ /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://" . $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 . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

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

} else {
	print $x . $X[1] . "\n";
}
}


sub GetID
{
use File::ReadBackwards;
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.*\/ptracking.*cpn=$CPN[0].*video\_id=([a-zA-Z0-9\-\_]*).*/){
		$id = $1;
		last;
		}
	if ($line =~ m/.*youtube.*\/ptracking.*video\_id=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
		$id = $1;
		last;
		}
	}
$ref_log->close();
return $id;
}
[/spoiler]
[img]http://s20.postimg.org/4rkjw0lm5/proxy_HIT.png[/img]

[size:17pt]###update### Tidak Tercache Setelah Recompile[/size]
Yang berubah setelah kita kompil ulang, baik yang berhasil mencache dan tdk redirect maupun yang tdk berhasil adalah =
1. Ubuntu kita terinstall 'libfile-readbackwards-perl' agar bisa memasukkan option '--enable-referer-log' pada saat kompile squid.\
2. Konfigurasi squid bertambah satu yaitu adanya '--enable-referer-log' seperti dalam output-nya cli "squid -v"
3. squid.conf berubah dengan bertambahnya satu baris yaitu "referer_log /var/log/squid/referer.log"
4. dan storeurl.pl
Sudah, hanya itu. Yang lain, termasuk misalnya refresh_pattern tidak ada perubahan.

Sekarang mari kita lihat output cli "squid -v" yang tidak berhasil =
rimbun wrote:root@rimbun:/home/rimbun# squid -v
Squid Cache: Version LUSCA_FMI
configure options: '--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-referer-log' '--enable-http-gzip' '--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' '--with-maxfd=65536'
Bandingkan dengan yang sudah berhasil mencache dan tdk redirect seperti di pejwan
Pragola_Pati wrote: CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}" \
./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-gnuregex --enable-async-io=24 --with-aufs-threads=24 \
--with-pthreads --with-aio --with-dl --enable-storeio=aufs,null \
--enable-removal-policies=heap --enable-icmp --enable-delay-pools --disable-wccp \
--enable-snmp --enable-cache-digests --enable-default-err-language=English \
--enable-err-languages=English --enable-linux-netfilter --disable-ident-lookups \
--with-maxfd=65535 --enable-follow-x-forwarded-for --enable-large-cache-files \
--with-large-files --enable-referer-log
Menurut saya ada dua opsi yang perlu diperhatikan, yaitu =
1. CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -O2 -pipe" CXXFLAGS="${CFLAGS}"
2. dan '--with-maxfd=65535'
Yang pertama berkaitan dengan penggunaan prosesor dan yang kedua mengenai file-descriptor

Saran =
1. Konfigurasikan squid pada saat compile agar menggunakan processor secara optimal. Untuk itu sesuaikan processor yang digunakan server dengan merujuk ke Safe Cflags. Jika Ubuntu server anda memakai processor Intel silahkan merujuk ke sini
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
Jika AMD monggo mampir ke sini =
http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD
Untuk mengatahui type prosesor mesin Ubuntu Server anda, buka terminal =

Code: Select all

cat /proc/cpuinfo
Pada outputnya, perhatikan baris ke-5. Itulah type processor yang akan disesuaikan profile-nya dengan Safe Cflags. Profile inilah yang dimasukkan ke salah satu opsi penting dalam melakukan compile squid.
2. Mengenai file-descritor yang semuanya menggunakan angka 65536, lakukan cross-ceck pada file squid.conf, output dari cache-managerCGI, init-script (/etc/init.d/squid), file /etc/default/squid dan mesin ubuntu itu sendiri (ulimit -n). Hasilnya semua harus ada kesesuaian yaitu 65536. Jika tidak, penggunakan opsi '--with-maxfd=65536' pada saat kompil menjadi mentah. Untuk menaikkan file-descriptors secara permanen, silahkan ke trit =
http://ubuntu-indonesia.com/forums/ubbt ... Post117313
cmiiw

Maaf mas, saya biasanya instal lusca pake "apt-get lusca", solusi upilnya gimana mas....maaf bener-bener newbie


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 21:31

cek dengan "squid -v", lihat output-nya. Jika di sana ada "--enable-referer-log" anda tdk perlu ngupil. Jika tdk ada, terpaksa lusca di uninstall dan install ulang dengan teknik upil
:D


User avatar
emencavalera
Posts: 8
Joined: 30 Mar 2013, 21:09

Post by emencavalera » 30 Mar 2013, 22:05

maaf mas, banyak tanya....kan bersebaran teknik compile..saya dah coba beberapa tehknik, termasuk upil yang dari mas pragola...2 malam saya oprek tapi belum tembus juga (instal ulang lho)...boleh kasih rujukan nggak mas...cara uninstal sampai upil...kalo mas tidak keberatan...terima kasih sebelumya...


User avatar
cah_clacap
Posts: 258
Joined: 19 Mar 2013, 23:07
Location: Cilacap
Contact:

Post by cah_clacap » 30 Mar 2013, 22:07

niviedevi wrote:Maaf nih newbie , problem squid HIT youtube sudah solved tapi yang mau saya tanyakan masalah youtube no-range
#==========================================================
# youtube no range
#=========================================================
acl norange url_regex ^.*youtube.com/videoplayback.*range=.*$
http_access deny norange

berhasil sih berhasil ... HIT langsung mentok. yang jadi masalah ada beberapa youtube yang ga bisa alias blank. Ada solusi buat ga blank. kalo saya tidak memakai acl norange , ga blank tapi HIT nya seperti streaming biasa.
+++++++++++++++++++++++++++++++++++++++++++++++++++++

Emang ACL tersebut udah full???? kok masih ada tanda bintangnya????
Sya pake itu malah jadi salah video kemarin lusa


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 30 Mar 2013, 22:22

@eman
Yang di pejwan itu, rcompile. Upil ulang karena sebelumnya sudah ter-kompil dan kita mau menambahkan opsi baru dalam install-configuration. Dalam kasus anda, uninstall squid dengan apt-get uninstall atau apt-get purge. Saya tdk berani ngasih referensi mas, pilih saja salah satu. Lalu anda komunikasikan di FUI dengan membuat trit baru, insyaallah kita bantu :)
@cah_cilacap
sama, bahkan saya sudah coba pakai yang ini mas

Code: Select all

#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
# rev by ucok_karnadi@yahoo.com
# Youtube updates at http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube/Discussion

# http://www.facebook.com/stressss

$|=1;
while (<>) {
@X = split;
$x = $X[0] . " ";

		#facebook
if (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
	print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

		#Speedtest
} elsif (m/^http\:\/\/.*\/speedtest\/(.*)\?.*/) {
	print $x . "http://speedtest.SQUIDINTERNAL/speedtest/" . $1 . "\n";

		#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
	print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

		#BLOGSPOT
} elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) {
	print $x . "http://blog-cdn." . $1 . "\n";

		#ytimg
} elsif (m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
	print $x . "http://cdn.ytimg.com" . $1 . "\n";

		#AVAST
} elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
	print $x . "http://avast-cdn." . $1 . "\n";

		#KAV
} elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
	print $x . "http://kav-cdn." . $1 . "\n";

		#AVG
} elsif (m/^http:\/\/update.avg.com/) {
	print $x . "http://avg-cdn." . $1 . "\n";

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

		#gstatic and/or wikimapia
} elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
	print $x . "http://" . $1 . $2 . "\n";

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

		# for ALL Youtube ( range & non range )
# first you need do this
# install package dependencies "apt-get install libfile-readbackwards-perl"
# add line below to your squid config and remove "#"

# acl yutub url_regex -i .*youtube\.com\/.*$
# acl yutub url_regex -i .*youtu\.be\/.*$
# logformat squid1 %{Referer}>h %ru %Ss/%03Hs %<st
# access_log /var/log/squid/access.log squid1 yutub 
# acl redirec urlpath_regex -i .*&redirect_counter=1&cms_redirect=yes
# acl redirec urlpath_regex -i .*&ir=1&rr=12
# cache deny redirec 
# acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
# acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$
# storeurl_access deny reddeny

} elsif ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
	sleep(2);
	@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://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range\n";

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

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

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

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

		#cdn, varialble 1st path
} 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://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

		#rapidshare
} elsif (($X[1] =~ /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 (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
	print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

		#domain/path/.*/path/filename
} elsif (($X[1] =~ /fucktube/) && (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 . "http://" . $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/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
	print $x . "http://cdn." . $4 . $6 . "\n";

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

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

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

		#youjizz. We use only domain and filename
} elsif (($X[1] =~ /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://" . $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 . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

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

} else {
	print $x . $X[1] . "\n";
}
}


sub GetID
{
use File::ReadBackwards;
my $lim = 200 ;
my $ref_log = File::ReadBackwards->new('/var/log/squid/access.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 = $CPN[0];
		} 
$ref_log->close();
return $id;
}


User avatar
emencavalera
Posts: 8
Joined: 30 Mar 2013, 21:09

Post by emencavalera » 30 Mar 2013, 22:31

Pragola_Pati wrote:@eman
Yang di pejwan itu, rcompile. Upil ulang karena sebelumnya sudah ter-kompil dan kita mau menambahkan opsi baru dalam install-configuration. Dalam kasus anda, uninstall squid dengan apt-get uninstall atau apt-get purge. Saya tdk berani ngasih referensi mas, pilih saja salah satu. Lalu anda komunikasikan di FUI dengan membuat trit baru, insyaallah kita bantu :)
@cah_cilacap
sama, bahkan saya sudah coba pakai yang ini mas

Code: Select all

#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
# rev by ucok_karnadi@yahoo.com
# Youtube updates at http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube/Discussion

# http://www.facebook.com/stressss

$|=1;
while (<>) {
@X = split;
$x = $X[0] . " ";

		#facebook
if (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
	print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

		#Speedtest
} elsif (m/^http\:\/\/.*\/speedtest\/(.*)\?.*/) {
	print $x . "http://speedtest.SQUIDINTERNAL/speedtest/" . $1 . "\n";

		#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
	print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

		#BLOGSPOT
} elsif (m/^http:\/\/[1-4].bp.(blogspot.com.*)/) {
	print $x . "http://blog-cdn." . $1 . "\n";

		#ytimg
} elsif (m/^http:\/\/i[1-4]\.ytimg\.com(.*)/) {
	print $x . "http://cdn.ytimg.com" . $1 . "\n";

		#AVAST
} elsif (m/^http:\/\/download[0-9]{3}.(avast.com.*)/) {
	print $x . "http://avast-cdn." . $1 . "\n";

		#KAV
} elsif (m/^http:\/\/dnl-[0-9]{2}.(geo.kaspersky.com.*)/) {
	print $x . "http://kav-cdn." . $1 . "\n";

		#AVG
} elsif (m/^http:\/\/update.avg.com/) {
	print $x . "http://avg-cdn." . $1 . "\n";

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

		#gstatic and/or wikimapia
} elsif (m/^http:\/\/([a-z])[0-9]?(\.gstatic\.com.*|\.wikimapia\.org.*)/) {
	print $x . "http://" . $1 . $2 . "\n";

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

		# for ALL Youtube ( range & non range )
# first you need do this
# install package dependencies "apt-get install libfile-readbackwards-perl"
# add line below to your squid config and remove "#"

# acl yutub url_regex -i .*youtube\.com\/.*$
# acl yutub url_regex -i .*youtu\.be\/.*$
# logformat squid1 %{Referer}>h %ru %Ss/%03Hs %<st
# access_log /var/log/squid/access.log squid1 yutub 
# acl redirec urlpath_regex -i .*&redirect_counter=1&cms_redirect=yes
# acl redirec urlpath_regex -i .*&ir=1&rr=12
# cache deny redirec 
# acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
# acl reddeny url_regex -i c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$
# storeurl_access deny reddeny

} elsif ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
	sleep(2);
	@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://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range\n";

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

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

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

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

		#cdn, varialble 1st path
} 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://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

		#rapidshare
} elsif (($X[1] =~ /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 (($X[1] =~ /maxporn/) && (m/^http:\/\/([^\/]*?)\/(.*?)\/([^\/]*?)(\?.*)?$/)) {
	print $x . "http://" . $1 . "/SQUIDINTERNAL/" . $3 . "\n";

		#domain/path/.*/path/filename
} elsif (($X[1] =~ /fucktube/) && (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 . "http://" . $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/) && (m/^http:\/\/(([A-Za-z]+[0-9-.]+)*?(\.[a-z]*)?)\.([a-z]*[0-9]?\.[^\/]{3}\/[a-z]*)(.*?)((\/[a-z]*)?(\/[^\/]*){4}\.[^\/\?]{3,4})(\?.*)?$/)) {
	print $x . "http://cdn." . $4 . $6 . "\n";

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

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

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

		#youjizz. We use only domain and filename
} elsif (($X[1] =~ /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://" . $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 . "storeurl://" . $y[0] . $y[1] . "/" . $y[2] . "." . $y[3] . "\n";

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

} else {
	print $x . $X[1] . "\n";
}
}


sub GetID
{
use File::ReadBackwards;
my $lim = 200 ;
my $ref_log = File::ReadBackwards->new('/var/log/squid/access.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 = $CPN[0];
		} 
$ref_log->close();
return $id;
}
Thank's mas pragola....anda memang sangat sabar dan telaten ngeladeni kami yang newbie :).....tapi kalo memang boleh saran, lebih enak nyatu ama trit ini, kan jadi lebih nyambung mengatasi erorr youtube...itu cuma saran lho mas...tapi aku coba mas, mudah-mudahan tembus upilnya...sekali lagi terima kasih...


User avatar
quppet
Posts: 11
Joined: 28 Mar 2013, 02:00
Location: Indonesia

Post by quppet » 30 Mar 2013, 22:57

niviedevi wrote:Maaf nih newbie , problem squid HIT youtube sudah solved tapi yang mau saya tanyakan masalah youtube no-range
#==========================================================
# youtube no range
#=========================================================
acl norange url_regex ^.*youtube.com/videoplayback.*range=.*$
http_access deny norange

berhasil sih berhasil ... HIT langsung mentok. yang jadi masalah ada beberapa youtube yang ga bisa alias blank. Ada solusi buat ga blank. kalo saya tidak memakai acl norange , ga blank tapi HIT nya seperti streaming biasa.
saya juga pernah pake acl itu... dan hasilnya sama persis seperti yang @niviedvi billang...
daripada bikin error saya remove aja tu acl... hahaha :grin:


kalo pengen norange atau langusng 1x hit cuba ganti flash player ke ver-lama "shockwave flash 10.0.22.87" aq dah coba dan hasilnya memuaskan...!!! tpi kalo ada apa"nya resiko ditanggung sendiri hahahaha!!! :grin:

===============================
My-OS : Ubuntu 8.04 Hardy
My-Proxy: LUSCA_HEAD-r14809


User avatar
Aira
Posts: 70
Joined: 22 Mar 2012, 21:20

Post by Aira » 31 Mar 2013, 02:04

Sebelumnya terimakasih buat mas Pragola_Pati dan warga FUI yang sudah memberi tutor dan bimbingannya. Alhamdulillah sudah 2 hari ini lancar jaya cacahe youtube nya.
Yang di herankan saya kok pake ACL tidak mau tercache dan youtube tidak sesuai judulnya tapi tanpa disertakan ACL malah bisa cache dan diputar sesuai judul yang kita mau. Dan satu lagi https harus di hilangkan.

Pengujian/test :
1. Satukan link test = http://www.youtube.com/watch?v=zPwMdZOl ... sults_main
screen :
[spoiler][img]http://s22.postimg.org/p12iroych/Youtubee1.jpg[/img][/spoiler]
Takut ga jelas ditambahin ini :)
[spoiler][img]http://s7.postimg.org/9orz10c7f/Youtubee2.jpg[/img][/spoiler]

2. Sebutkan versi squid
Pakai squid-2.7.STABLE9

3. gambarkan secara singkat topologi
Topologi setandar ajaa...
Di tunning nya cuman ini :
[spoiler]# OPTIONS FOR TUNING THE CACHE
# -----------------------------------------------------------------------------
acl cache_allow_dom dstdomain .youtube.com .googlevideo.com .4shared.com .speedtest.net
storeurl_access allow cache_allow_dom
storeurl_access deny all

acl ytrange url_regex ^.*youtube.com/videoplayback.*range=.*$
http_access deny ytrange

acl speedtest_allow_url url_regex -i \.speedtest\.net\/ speedtest
acl speedtest_allow_url url_regex ^http:\/\/speedtest\.*
acl speedtest_allow_dom dstdomain .speedtest.net

storeurl_access allow speedtest_allow_url
storeurl_access allow speedtest_allow_dom
storeurl_access deny all

storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 7
storeurl_rewrite_concurrency 15

acl DENYCACHE urlpath_regex \.(ini|ui|lst|inf|pak|ver|patch|md5|cfg|lst|list|rsc|log|conf|dbd|db)$
acl DENYCACHE urlpath_regex (notice.html|afs.dat|dat.asp|patchinfo.xml|version.list|iepngfix.htc|updates.txt|patchlist.txt)
acl DENYCACHE urlpath_regex (pointblank.css|login_form.css|form.css)$
acl DENYCACHE urlpath_regex (Loader|gamenotice|sources|captcha|notice|reset)
cache deny DENYCACHE

# -----------------------------------------------------------------------------
# REFRESH PATTERN FOR TUNING THE CACHE
# 1 year = 525600 mins, 1 month = 10080 mins, 1 day = 1440
# -----------------------------------------------------------------------------
# Youtube
# -----------------------------------------------------------------------------
refresh_pattern (get_video\?|videoplayback\?|videodownload\?) 5259487 99999999% 5259487 override-expire ignore-reload ignore-private negative-ttl=0
refresh_pattern -i \.(flv)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private[/spoiler]

Storeurlnya :
[spoiler]#!/usr/bin/perl
# $Rev$
# by chudy_fernandez@yahoo.com
# rev by ucok_karnadi@yahoo.com
# Youtube updates at http://wiki.squid-cache.org/ConfigExamp ... Discussion
# http://www.facebook.com/stressss

$|=1;
while () {
@X = split;
$x = $X[0] . " ";

#facebook
if (m/^http\:\/\/.*(profile|photo).*\.ak\.fbcdn\.net(\/h(profile|photos)-ak-)(snc|ash|prn)[0-9]?(.*)/) {
print $x . "http://facebook.SQUIDINTERNAL" . $2 . "fb" . $5 . "\n";

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

#reverbnation
} elsif (m/^http:\/\/[a-z0-9]{4}\.reverbnation\.com\/.*\/([0-9]*).*/) {
print $x . "http://reverbnation.com.SQUIDINTERNAL/" . "$1" . "\n";

# for ALL Youtube ( range & non range )
# first you need do this
# build your squid with "--enable-referer-log"
# install package dependencies "apt-get install libfile-readbackwards-perl"
# add this "referer_log /var/log/squid/referer.log" to your squid config
} elsif ($X[1] =~ m/^http\:\/\/.*(youtube|google).*videoplayback.*/){
sleep(2);
@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://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range\n";

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

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

} else {
print $x . $X[1] . "\n";
}
}


sub GetID
{
use File::ReadBackwards;
my $ref_log = File::ReadBackwards->new('/var/spool/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.*\/ptracking.*cpn=$CPN[0].*video\_id=([a-zA-Z0-9\-\_]*).*/){
$id = $1;
last;
}
if ($line =~ m/.*youtube.*\/ptracking.*video\_id=([a-zA-Z0-9\-\_]*).*cpn=$CPN[0].*/){
$id = $1;
last;
}
}
if ($id eq ''){
$id = $CPN[0];
}
$ref_log->close();
return $id;
}[/spoiler]


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 03:02

@emen
Boleh lah dan sebelumnya komunikasikan dulu pilihan anda ya agar kita2 yang di FUI bisa ngasih masukan :)

@quppet
shockwave player atau flash player mas ?

@aira
Kebetulan sama, saya juga pakai squid yang itu. Bagus itu, jaga squid anda tetap ramping (dengan konfigurasi yang sederhana) sehinga lincah ber-manuver :)


User avatar
Aira
Posts: 70
Joined: 22 Mar 2012, 21:20

Post by Aira » 31 Mar 2013, 04:16

@Pragola_Pati
Alhamdulillah berkat bantuan akang & warga FUI sebelumnya jadi bisa lancar...
Terimakasih

Tinggal sedikit lagi Update Game Online yang masih ada yang belum tercache dengan sempurna. Adakah clue agar bisa sempurna?


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 05:15

Sama2 mas. Game yang mana nih, kalau update kok saya tdk peernah ada masalah ya. tapi sejak ganti storeurl.pl saya belum pernah update game. Yang suka bikin masalah itu rohan kalau ada upgrade (bukan update berkala), bahkan yang versi terakhir ini malah eror melulu rohannya. cari2 clue juga gak dapat2.


User avatar
herowp
Posts: 1
Joined: 14 Aug 2012, 20:56
Location: poso

Post by herowp » 31 Mar 2013, 06:53

permisi para sesepuh FUI.saya mau tanya apa kalo re-upil youtube yg https bisa HIT ya ?
kalau bole,minta link tutor instal squid3

thanx buat warga FUI terutama eyang pragola_pati yg dengan sabar mau berbagi........


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 10:11

@herowp
herowp wrote:permisi para sesepuh FUI.saya mau tanya apa kalo re-upil youtube yg https bisa HIT ya ?
Menurut sya sih tdk bisa mas, hanya men-cache web (port 80). cmiiw :)
herowp wrote:kalau bole,minta link tutor instal squid3
Berhamburan di inet mas, pilih saja salah satu. nanti kalau ada kendala bisa dikomunikasikan di sini.


User avatar
cah_clacap
Posts: 258
Joined: 19 Mar 2013, 23:07
Location: Cilacap
Contact:

Post by cah_clacap » 31 Mar 2013, 13:45

Alhamdulillah .... sampai hari ni masih lancar .....cuma kalo pada listblok.txt utk blokir situs porno terlalu banyak daftar situs yg kita masukin ..... kok terasa lebih berat ya ..... kaya membebani gitu ..... bagaimana menurut kawan2 FUI ???

(Daftar situs pornonya ini ngutip punya Juldi Tian)

tube8
flytube.com
bokep
youjizz.com
sunporno.com
pornoxo.com
cheatengine561.exe
playboy.com
penthouse.com
duniasex.com
17tahun.com
bangbros.com
youporn.com
redtube.com
kukusikis.org
porncall.tv
sikis*.com
sikis*.org
sikis*.tv
sexy-hentai.net
8teenxxx.com
gonzoxxxmovies.com
freeporn.com
***.com
xxxsex.com
yobt.com
porntube.com
porn.com
nudetube.com
dailymotion.com
videotube.com
sexy-employee.com
sextube.com
sexkitty.net
tubegalore.com
eskimotube.com
tubesex.org
rawtube.com
sextubehere.com
coitustube.com
maturesextube.in
sextubestore.com
retrosextube.net
milfsextube.net
homemoviestube.com
maturevideostube.com
sexvideomix.com
redtubedump.com
bizarresextube.net
sexmothertube.com
freeanimalsextube.net
tubesexshow.com
sexmaturetube.com
bestgrannytube.com
tubetimefun.com
sexstreamingtube.com
sextubedump.com
porngus.com
amateurteenvideo.cn
tubepornfever.com
tubepornpages.com


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 14:27

Ya jelas, membebani squid mas. kalau mau pakai ini mas =
http://ubuntu-indonesia.com/forums/ubbt ... Post129716


User avatar
pluto01
Posts: 58
Joined: 27 Mar 2013, 20:15

Post by pluto01 » 31 Mar 2013, 14:54

di tempat ane akses video ini ko ga bisa yach dengan proxy.
agan2 FUI bisa coba test apakah kejadiannya sama?

Link http://www.youtube.com/watch?v=w5tJBKkCkYk yg lain aman.

errornya "An error occurred. Please try again later"

Jika dibypass tanpa proxy aman.


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 15:16

Pragola_Pati wrote:Ya jelas, membebani squid mas. kalau mau pakai ini mas =
http://ubuntu-indonesia.com/forums/ubbt ... Post129716


@Pragola_Pati:
Benar sekali, setelah saya update dengan tut diatas, jadinya lebih ringan


User avatar
cah_clacap
Posts: 258
Joined: 19 Mar 2013, 23:07
Location: Cilacap
Contact:

Post by cah_clacap » 31 Mar 2013, 15:26

@ Master_Pragola : ya boz nanti kita coba

@ Master_Juldian Tan : maaf td cepetan jd salah ketik Juldi Tian
iya mas ..makasih sarannya


User avatar
cikarang
Posts: 2
Joined: 20 Mar 2013, 06:28

Post by cikarang » 31 Mar 2013, 16:51

sampai kpn ya youtobe error redirect lg...tlg infonya donk


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 16:59

cikarang wrote:sampai kpn ya youtobe error redirect lg...tlg infonya donk
Ikutan nyimak di FUI.
Bakalan ada infonya koq.


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 17:39

@pluto
Tidak masalah kok mas :

[img]http://s20.postimg.org/q3palgbxp/not_error.png[/img]

Coba anda gunakan storeurl di pejwan mas

@Cah cilacap dan Julian
Selalu gunakan kategori redirector/proxy agar client tdk bisa menggunakan proxy luar untu browsing secara anonymous dan tambahkan di acl

Code: Select all

 .... !in-addr all
agar penggantian alamat web dengan ip tdk berpengaruh.

@Cikarang
saya pakai yang di pejwan, lancar mas :)


User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Post by Bandi_Shippuden » 31 Mar 2013, 19:50

Coba Liat yg ini mas ....
semoga membantu
https://code.google.com/p/tempat-sampah ... toreurl.pl


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 20:00

bandi16 wrote:Coba Liat yg ini mas ....
semoga membantu
https://code.google.com/p/tempat-sampah ... toreurl.pl


ijin nyimak gan
sepertinya hrs di oprek dan testing dl


User avatar
samiun
Posts: 3
Joined: 26 Mar 2013, 12:26

Post by samiun » 31 Mar 2013, 20:19

permisi mas-mas sekalian. saya mau nanya nih, CHOST dan CFLAGS buat prosesor intel E2140 brapa ya..?? udah dicari di
http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel tapi g nemu yang cocok nih.
berikut saya sertakan hasil #cat /proc/cpuinfo nya
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2140 @ 1.60GHz
stepping : 13
cpu MHz : 1599.818
Trims sebelumnya.. :)


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 20:44

@ Samiun
Yang mirip2 saya kutipkan dari link tsb =
Core 2 Duo/Quad, Xeon 51xx/53xx/54xx/3360, Pentium Dual-Core T23xx+/Exxxx, Celeron Dual-Core

vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Dual-core CPU E5700 @ 3.00GHz
model name : Intel(R) Core(TM)2 duo CPU E7400 @ 2.80GHz
model name : Intel(R) Pentium(R) Dual CPU T23xx @ XXXGHz
model name : Intel(R) Xeon(R) CPU X3360

Jika GCC anda versinya dibawah GCC 4.3 maka gunakan yang ini=
32 bit profile (x86) for = GCC 4.3:

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
Untuk mengetahui versi GCC, ketikkan "gcc -v". Contoh ouput-nya punya saya =
[spoiler]

Code: Select all

ersa@ersa-13:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnuut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
ersa@ersa-13:~$
[/spoiler]
Ketahuan GGC yang saya punya adalah =
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 20:50

@bandi dan Julian Tan
bandi16 wrote:Coba Liat yg ini mas ....
semoga membantu
https://code.google.com/p/tempat-sampah ... toreurl.pl
Tidak jalan di squid-2.7.STABLE9
:confused:


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 21:00

coba yang ini gan

[spoiler]32 bit profile (x86) for = GCC 4.3:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

64 bit profile (amd64) for = GCC 4.3
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CXXFLAGS="${CFLAGS}"[/spoiler]


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 21:02

Saya belum sempat tes.
Nanti saya coba oprek.
Gagalnya dimananya...


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 21:04

Bukan gagal sih, selalu redirect seperti tempohari :confused:


User avatar
samiun
Posts: 3
Joined: 26 Mar 2013, 12:26

Post by samiun » 31 Mar 2013, 21:06

@Pragola_Pati
versi GCC-nya ini mas :
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
berarti yang dipakai

Code: Select all

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
mau UPIL tapi bingung mau pakai CHOST-nya yang mana :D
sebelumnya saya install squid g pakai CHOST tp squid masih jalan dan bisa HIT. cuma youtube masih belum bisa. Ngomong� install squid g pakai CHOST kekurangannya apa ya mas?
trism atas Fast responenya :)


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 21:13

Sudah pernah tes cache patch game lost saga, dragonica dan grandchase belum?
Saya masi gagal nih utk cache patch game tersebut.

Ini config saya:
[spoiler]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 8 MB
maximum_object_size_in_memory 512 bytes
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

minimum_object_size 0 KB
maximum_object_size 512 MB
cache_swap_low 97
cache_swap_high 99

cache_dir aufs /cache1 100000 16 256
#cache_dir aufs /cache2 100000 16 256

access_log daemon:/cache1/access.log squid
cache_log /cache1/cache.log
referer_log /cache1/referer.log
cache_store_log none
store_dir_select_algorithm round-robin
logfile_daemon /usr/lib/squid/logfile-daemon
logfile_rotate 1

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 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

acl store_rewrite_list urlpath_regex \/(get_video|video\?v|videoplayback\?id|videoplayback.*id)
acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id|watch\?)
acl store_rewrite_list urlpath_regex \.(3gp|mp(3|4)|flv|(m|f)4v|on2|fid|avi|mov|wm(a|v)|(mp(e?g|a|e|1|2))|mk(a|v)|jp(e?g|e|2)|gif|png|tiff?|bmp|tga|svg|ico|swf|exe|ms(i|u|p)|cab|psf|mar|bin|z(ip|[0-9]{2})|r(ar|[0-9]{2})|7z)\?
acl store_rewrite_list_domain url_regex ^http:\/\/(([a-z-]+[0-9-]+)|([0-9-]+[a-z-]+))\.[a-z0-9-]*\.[a-z]{2,4}
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(3gp|mp(3|4)|flv|(m|f)4v|on2|fid|avi|mov|wm(a|v)|(mp(e?g|a|e|1|2))|mk(a|v)|jp(e?g|e|2)|gif|png|tiff?|bmp|tga|svg|ico|swf|exe|ms(i|u|p)|cab|psf|mar|bin|z(ip|[0-9]{2})|r(ar|[0-9]{2})|7z)$
acl store_rewrite_list_domain_CDN url_regex (cbk|mt|khm|mlt|tbn)[0-9]?.google\.co(m|\.uk|\.id)
acl store_rewrite_list_domain_CDN url_regex photos-[a-z].ak.fbcdn.net
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/([a-z])[0-9]?(\.gstatic\.com|\.wikimapia\.org)
acl store_rewrite_list_domain_CDN url_regex ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$
acl store_rewrite_list_domain_CDN url_regex streamate.doublepimp.com.*\.js\? \.doubleclick\.net.* yieldmanager cpxinteractive quantserve\.com
acl speedtest_allow_url url_regex -i \.speedtest\.net\/ speedtest
acl speedtest_allow_url url_regex ^http:\/\/speedtest\.*
acl speedtest_allow_dom dstdomain .speedtest.net

acl dontrewrite url_regex (get_video|video\?v=|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]* \.php\? \.asp\? \.aspx\? threadless.*\.jpg\?r=
acl getmethod method GET

storeurl_access deny dontrewrite
storeurl_access deny !getmethod

storeurl_access allow store_rewrite_list_domain_CDN
storeurl_access allow store_rewrite_list
storeurl_access allow store_rewrite_list_domain store_rewrite_list_path
storeurl_access allow speedtest_allow_url
storeurl_access allow speedtest_allow_dom
storeurl_access deny all
storeurl_rewrite_program /etc/squid/supercache.pl
storeurl_rewrite_children 4
storeurl_rewrite_concurrency 10


acl DENYCACHE urlpath_regex \.(ini|ui|lst|inf|pak|ver|patch|md5|cfg|lst|list|rsc|log|conf|dbd|db|xml|cfg.iop)$ afs\.dat$
acl DENYCACHE urlpath_regex -i (mrtg|include|Loader|xtrap|login|captcha|notice|sources|registration|voucher|partialinfo)
acl DENYCACHE urlpath_regex (notice.html|afs.dat|dat.asp|patchinfo.xml|version.list|iepngfix.htc|updates.txt|patchlist.txt)
acl DENYCACHE urlpath_regex (pointblank.css|login_form.css|form.css)$
acl DENYCACHE urlpath_regex (Loader|gamenotice|sources|captcha|notice|reset)
cache deny DENYCACHE

acl virus url_regex \.(scr|bat|pif|cmd)$

#Image
refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png|pcx|svgpic|max|dxf|ep)$ 5259487 99999999% 5259487 override-expire reload-into-ims ignore-no-cache ignore-private ignore-no-store ignore-auth ignore-must-revalidate store-stale negative-ttl=0
refresh_pattern \.(swf|flv|fid|avi|mov|wm(a|v)|3gp|mp(4|3)|rm|ram|m4v|on2|mar|cab|psf)$ 259200 999999% 5259487 override-expire ignore-reload ignore-no-cache ignore-private ignore-no-store ignore-auth ignore-must-revalidate store-stale negative-ttl=0

#Youtube
refresh_pattern ^http://[^/]+\.youtube\.com/(get_video|video|videoplayback|videodownload).*(begin|start)\=[1-9][0-9]* 0 0% 0
refresh_pattern ^http://[^/]+\.youtube\.com/(get_video\?|videoplayback\?|videodownload\?) 43200 99999999% 259200 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0
refresh_pattern (get_video\?|videoplayback\?|videodownload\?|watch\?\.flv?|.vid\?) 2629742 99999999% 2629742 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0

#Sensitive files
refresh_pattern \.(sc-|dl-|ex-|mh-|dll|da-|cfg.iop|Xtp)$ 0 10% 50 reload-into-ims
refresh_pattern (update-smadav|updates|patchlist|start|start1|start2|start3)\.txt$ 0 20% 1440 reload-into-ims
refresh_pattern (pointblank|form|reset|ickernew|layout)\.css$ 0 10% 1440 reload-into-ims
refresh_pattern (all.png|dat.asp|patchinfo.xml|iepngfix.htc)$ 0 10% 1440 reload-into-ims
refresh_pattern (game|cookie)\.js$ 0 10% 1440 reload-into-ims
refresh_pattern (autoup|main|autoupgrade|grandchase|FSLauncher|FreeStyle_Setup|grandchase|cabal|i7|UpdaterModifier|FreeStyle|PBLauncher|update|NewLauncher|NewAvalon)\.exe$ 0 50% 1440 reload-into-ims
refresh_pattern (PointBlank.exe|HSUpdate.exe|PBConfig.exe|hon.exe|filelist)\.zip$ 0 50% 1440 reload-into-ims
refresh_pattern -i (livescore.com|goal.com|bobet|bet) 0 50% 60 reload-into-ims

refresh_pattern \.(aspx|asp|php|css|htm|html|js|jsp|xml)$ 20 80% 20160 reload-into-ims
refresh_pattern \.(nzp|iop|kom|nup|mst)$ 43200 99999999% 5259487 override-expire reload-into-ims ignore-no-cache

#Regex spesific
refresh_pattern (gstatic|diggstatic)\.com/.* 43200 999999% 259200 override-expire ignore-reload ignore-no-cache ignore-private ignore-no-store ignore-must-revalidate store-stale
refresh_pattern (zynga|ninjasaga|mafiawars|cityville|farmville|crowdstar|spilcdn|agame|popcap)\.com/.* 43200 999999% 259200 override-expire ignore-reload ignore-no-cache ignore-private ignore-no-store ignore-must-revalidate store-stale
refresh_pattern ^http:\/\/images|image|img|pics|openx|thumbs[0-9]\. 43200 999999% 259200 override-expire ignore-reload ignore-no-cache ignore-private ignore-no-store ignore-must-revalidate store-stale
refresh_pattern ^.*safebrowsing.*google 259200 999999% 259200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern ^.*(streamate.doublepimp.com.*\.js\?|utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 43200 20% 259200 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth ignore-must-revalidate store-stale negative-ttl=40320 max-stale=1440
refresh_pattern \.(ico|video-stats) 43200 999999% 259200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod ignore-must-revalidate negative-ttl=10080 store-stale
refresh_pattern ^http://((cbk|mt|khm|mlt|tbn)[0-9]?)\.google\.co(m|\.uk|\.id) 43200 999999% 259200 override-expire override-lastmod ignore-reload ignore-no-cache ignore-private ignore-auth ignore-must-revalidate ignore-no-store negative-ttl=10080 store-stale
refresh_pattern \.speedtest/.* 43200 99999% 259200 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-must-revalidate store-stale negative-ttl=10080
refresh_pattern \.wikimapia\.org\/? 43200 99999% 259200 override-expire override-lastmod ignore-reload ignore-no-cache ignore-private ignore-must-revalidate store-stale
refresh_pattern (resize|timthumb|product_thumb|thumb|img|imag(e|es))\.php? 43200 99999999% 5259487 override-expire ignore-reload ignore-no-cache store-stale

refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png|pcx|svgpic|max|dxf|ep)\? 259200 99999999% 5259487 override-expire reload-into-ims ignore-no-cache ignore-private ignore-no-store ignore-auth ignore-must-revalidate store-stale negative-ttl=0
refresh_pattern \.(nzp|swf|flv|fid|avi|mov|wm(a|v)|3gp|mp(4|3)|rm|ram|m4v|on2)\? 259200 99999999% 5259487 override-expire ignore-reload ignore-must-revalidate ignore-no-cache ignore-no-store ignore-private store-stale negative-ttl=0
refresh_pattern \.(z(ip|[0-9]{2})|r(ar|[0-9]{2})|jar|bz2|gz|tar|rpm|vpu|vpx) 43200 99999999% 259200 override-expire reload-into-ims ignore-no-cache ignore-private ignore-must-revalidate ignore-no-store store-stale
refresh_pattern \.(mp3|mp4|wav|og(g|a)|flac|midi?|rm|aac|wma|mka|ape) 43200 99999999% 259200 override-expire reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-must-revalidate ignore-no-store store-stale
refresh_pattern \.(exe|msi|msp|msu|dmg|bin|xpi|iso|mar|psf|cab) 43200 99999999% 259200 override-expire ignore-reload ignore-no-cache ignore-private ignore-must-revalidate ignore-no-store store-stale
refresh_pattern \.(mpeg|ra?m|avi|mp(g|e|4)|mov|divx|asf|wmv|mkv|m\dv|rv|vob|asx|ogm|flv|3gp|on2) 43200 999999% 259200 override-expire override-lastmod ignore-reload ignore-no-cache ignore-private ignore-auth ignore-must-revalidate ignore-no-store negative-ttl=0 store-stale
refresh_pattern \.(doc|docx|pdf|ppt|pptx|psd|rtf|xls|xlsx) 43200 99999999% 5259487 override-expire reload-into-ims ignore-no-cache ignore-must-revalidate
refresh_pattern -i (cgi-bin) 0 0% 0
refresh_pattern \.(php|jsp|cgi|asx|asp|aspx|js)\? 0 0% 0
refresh_pattern . 0 50% 259200 store-stale

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 deny virus

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 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_nameservers 8.8.8.8
#dns_testnames 127.0.0.1

#fqdncache_size 4096 # aslinya
fqdncache_size 16384
#ipcache_size 10240 # aslinya
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
cache_mgr juldian@j-com.web.id
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.j-com.web.id
unique_hostname j-com.web.id
cachemgr_passwd none all
client_db on
max_filedescriptors 8192

# TAG: ZPH
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136

#squidstats
snmp_port 3401
acl snmppublic snmp_community public
snmp_access allow snmppublic all[/spoiler]


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 21:25

Pakai yg itu bole
versinya utk < 4.6.3


User avatar
cah_clacap
Posts: 258
Joined: 19 Mar 2013, 23:07
Location: Cilacap
Contact:

Post by cah_clacap » 31 Mar 2013, 21:30

Pragola_Pati wrote:@pluto
Tidak masalah kok mas :

[img]http://s20.postimg.org/q3palgbxp/not_error.png[/img]

Coba anda gunakan storeurl di pejwan mas

@Cah cilacap dan Julian
Selalu gunakan kategori redirector/proxy agar client tdk bisa menggunakan proxy luar untu browsing secara anonymous dan tambahkan di acl

Code: Select all

 .... !in-addr all
agar penggantian alamat web dengan ip tdk berpengaruh.

@Cikarang
saya pakai yang di pejwan, lancar mas :)


++++++++++++++++++++++++++++++++++++++++++++++++++

Cara nambahinnnya lengkapnya gimana masta Pragola ????
Trims mau berbagi ilmu .................


User avatar
samiun
Posts: 3
Joined: 26 Mar 2013, 12:26

Post by samiun » 31 Mar 2013, 21:30

trims mas.. tak cobain dulu


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 21:35

@samiun
Agar squid menggunakan proci secara optimum

@Julian Tan
OOT dikit gak apa2 lah,
Lost Saga dan DragonNest saya pakai, tapi Dragonica tdk. Grandchase juga tidak pakai karena volumenya yang gila (kalau tdk salah 16 GB ya?). Yang selalu bikin ulah (bukan tdk ter-cache) itu Rohan, setiap upgrade versi pasti error. Sampai sekarang rohan belum fix di tempat saya :confused:
Semuanya ter-cache mas, jadi kita hanya perlu update 1 kompi saja. Pengaturannya ada di iptables, catat semua port yang digunakan masing2 game. Masukkan juga ke opsi safe_port -nya squid.
Anda pakai mikrotik kan ? Sayang saya tdk pakai mikrotik jadi saya tdk tahu bagaimana pengaturannya di sana.


User avatar
JuldianTan
Posts: 45
Joined: 25 Mar 2013, 04:07
Location: Palembang, Indonesia
Contact:

Post by JuldianTan » 31 Mar 2013, 21:41

Saya sih pakai mikrotik.
Kalo safeport sih saya sdh pernah tes masukin.
Tp kdg hasilnya jg error.
Kl utk game lain sih sdh ok.
Tp gpp lah.
Nanti qt oprek lagi.


User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Post by q_p » 31 Mar 2013, 21:45

cah_clacap wrote:
Pragola_Pati wrote:@pluto
Tidak masalah kok mas :

[img]http://s20.postimg.org/q3palgbxp/not_error.png[/img]

Coba anda gunakan storeurl di pejwan mas

@Cah cilacap dan Julian
Selalu gunakan kategori redirector/proxy agar client tdk bisa menggunakan proxy luar untu browsing secara anonymous dan tambahkan di acl

Code: Select all

 .... !in-addr all
agar penggantian alamat web dengan ip tdk berpengaruh.

@Cikarang
saya pakai yang di pejwan, lancar mas :)


++++++++++++++++++++++++++++++++++++++++++++++++++

Cara nambahinnnya lengkapnya gimana masta Pragola ????
Trims mau berbagi ilmu .................
Nambahin apanya mas Cilacap :) ?


User avatar
Aira
Posts: 70
Joined: 22 Mar 2012, 21:20

Post by Aira » 31 Mar 2013, 21:45

Pragola_Pati wrote:Sama2 mas. Game yang mana nih, kalau update kok saya tdk peernah ada masalah ya. tapi sejak ganti storeurl.pl saya belum pernah update game. Yang suka bikin masalah itu rohan kalau ada upgrade (bukan update berkala), bahkan yang versi terakhir ini malah eror melulu rohannya. cari2 clue juga gak dapat2.
Kalo update game itu membutuhkan ACl ga ya mas?
List Update Game yang belum bisa masuk cache squid :
LineageII, Idol-street Next Gen dan RagnarokOnline. Kalo rohan ada yang main jadi ga bisa di cek. Sama2 cari ya mas kalo ada clue info2 :).
Sekalian tanya ini mas gunanya untuk apa?
[spoiler]acl store_rewrite_list urlpath_regex \.(3gp|mp(3|4)|flv|(m|f)4v|on2|fid|avi|mov|wm(a|v)|(mp(e?g|a|e|1|2))|mk(a|v)|jp(e?g|e|2)|gif|png|tiff?|bmp|tga|svg|ico|swf|exe|ms(i|u|p)|cab|psf|mar|bin|z(ip|[0-9]{2})|r(ar|[0-9]{2})|7z)\?
acl store_rewrite_list_domain url_regex ^http:\/\/(([a-z-]+[0-9-]+)|([0-9-]+[a-z-]+))\.[a-z0-9-]*\.[a-z]{2,4}
acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
acl store_rewrite_list_path urlpath_regex \.(3gp|mp(3|4)|flv|(m|f)4v|on2|fid|avi|mov|wm(a|v)|(mp(e?g|a|e|1|2))|mk(a|v)|jp(e?g|e|2)|gif|png|tiff?|bmp|tga|svg|ico|swf|exe|ms(i|u|p)|cab|psf|mar|bin|z(ip|[0-9]{2})|r(ar|[0-9]{2})|7z)$[/spoiler]
pluto01 wrote:di tempat ane akses video ini ko ga bisa yach dengan proxy.
agan2 FUI bisa coba test apakah kejadiannya sama?
Link http://www.youtube.com/watch?v=w5tJBKkCkYk yg lain aman.
errornya "An error occurred. Please try again later"
Jika dibypass tanpa proxy aman.
Alhamdulillah lancar sama kaya mas Pragola_Pati
[img]http://s18.postimg.org/wrbsjo7nt/suksess.jpg[/img]


Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests