[SQUID]BelajarRegulerExpressions

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

[SQUID]BelajarRegulerExpressions

Postby q_p » 16 Jun 2013, 09:01

Bagi Warga yang punya kasus penulisan RegEx untuk refresh_pattern squid, silahkan mampir di sini untuk belajar bareng. Sebagai awalan, berikut kasus dari saya =

[size:17pt]Kasus Pertama
PERFECT WORLD
[/size]
output access.log
1371321185.119 93 192.168.0.101 TCP_REFRESH_MISS/200 244 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321185.119 93 192.168.0.101 TCP_REFRESH_MISS/200 244 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321185.205 81 192.168.0.101 TCP_REFRESH_HIT/200 233 GET http://patch3.perfectworld.web.id/CPW/patcher/version - DIRECT/202.93.17.201 text/plain
1371321185.205 81 192.168.0.101 TCP_REFRESH_HIT/200 233 GET http://patch3.perfectworld.web.id/CPW/patcher/version - DIRECT/202.93.17.201 text/plain
1371321190.836 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321190.836 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321190.924 84 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321190.924 84 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321191.430 84 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321191.430 84 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321204.454 76 192.168.0.101 TCP_MISS/404 460 GET http://patch3.perfectworld.web.id/CPW/p ... ersion.txt - DIRECT/202.93.17.201 text/html
1371321204.454 76 192.168.0.101 TCP_MISS/404 460 GET http://patch3.perfectworld.web.id/CPW/p ... ersion.txt - DIRECT/202.93.17.201 text/html
1371321205.239 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321205.239 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321205.323 79 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321205.323 79 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321205.793 85 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321205.793 85 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321217.363 92 192.168.0.101 TCP_REFRESH_MISS/200 234 GET http://patch3.perfectworld.web.id/CPW/element/version - DIRECT/202.93.17.201 text/plain
1371321217.363 92 192.168.0.101 TCP_REFRESH_MISS/200 234 GET http://patch3.perfectworld.web.id/CPW/element/version - DIRECT/202.93.17.201 text/plain
1371321218.153 95 192.168.0.101 TCP_REFRESH_MISS/200 2035 GET http://patch3.perfectworld.web.id/CPW/element/v-1.inc - DIRECT/202.93.17.197 text/plain
1371321218.153 95 192.168.0.101 TCP_REFRESH_MISS/200 2035 GET http://patch3.perfectworld.web.id/CPW/element/v-1.inc - DIRECT/202.93.17.197 text/plain
1371321220.830 2605 192.168.0.101 TCP_MISS/200 368694 GET http://patch3.perfectworld.web.id/CPW/e ... VzYy50eHQ= - DIRECT/202.93.17.201 text/plain
1371321220.830 2605 192.168.0.101 TCP_MISS/200 368694 GET http://patch3.perfectworld.web.id/CPW/e ... VzYy50eHQ= - DIRECT/202.93.17.201 text/plain
1371321222.649 1318 192.168.0.101 TCP_MISS/200 196857 GET http://patch3.perfectworld.web.id/CPW/e ... xzdHIudHh0 - DIRECT/202.93.17.197 text/plain
1371321222.649 1318 192.168.0.101 TCP_MISS/200 196857 GET http://patch3.perfectworld.web.id/CPW/e ... xzdHIudHh0 - DIRECT/202.93.17.197 text/plain
1371321223.437 315 192.168.0.101 TCP_MISS/200 51884 GET http://patch3.perfectworld.web.id/CPW/e ... AuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321223.437 315 192.168.0.101 TCP_MISS/200 51884 GET http://patch3.perfectworld.web.id/CPW/e ... AuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321252.767 27929 192.168.0.101 TCP_MISS/200 3448165 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321252.767 27929 192.168.0.101 TCP_MISS/200 3448165 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321254.899 145 192.168.0.101 TCP_REFRESH_MISS/200 7615 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321254.899 145 192.168.0.101 TCP_REFRESH_MISS/200 7615 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321338.565 81091 192.168.0.101 TCP_MISS/200 9889450 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321338.565 81091 192.168.0.101 TCP_MISS/200 9889450 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321341.737 86 192.168.0.101 TCP_MISS/200 1805 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321341.737 86 192.168.0.101 TCP_MISS/200 1805 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321342.083 300 192.168.0.101 TCP_REFRESH_MISS/200 47969 GET http://patch3.perfectworld.web.id/CPW/e ... 1lLnN0Zg== - DIRECT/202.93.17.197 text/plain
1371321342.083 300 192.168.0.101 TCP_REFRESH_MISS/200 47969 GET http://patch3.perfectworld.web.id/CPW/e ... 1lLnN0Zg== - DIRECT/202.93.17.197 text/plain
1371321342.450 101 192.168.0.101 TCP_REFRESH_MISS/200 3450 GET http://patch3.perfectworld.web.id/CPW/e ... 51aS5zdGY= - DIRECT/202.93.17.201 text/plain
1371321342.450 101 192.168.0.101 TCP_REFRESH_MISS/200 3450 GET http://patch3.perfectworld.web.id/CPW/e ... 51aS5zdGY= - DIRECT/202.93.17.201 text/plain
1371321342.618 124 192.168.0.101 TCP_MISS/200 6797 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.618 124 192.168.0.101 TCP_MISS/200 6797 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.761 126 192.168.0.101 TCP_MISS/200 7141 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.201 text/plain
1371321342.761 126 192.168.0.101 TCP_MISS/200 7141 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.201 text/plain
1371321342.909 130 192.168.0.101 TCP_MISS/200 8183 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.909 130 192.168.0.101 TCP_MISS/200 8183 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.060 126 192.168.0.101 TCP_MISS/200 6886 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.060 126 192.168.0.101 TCP_MISS/200 6886 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.204 128 192.168.0.101 TCP_MISS/200 8093 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.204 128 192.168.0.101 TCP_MISS/200 8093 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.355 124 192.168.0.101 TCP_MISS/200 6088 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.355 124 192.168.0.101 TCP_MISS/200 6088 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.500 126 192.168.0.101 TCP_MISS/200 7354 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.500 126 192.168.0.101 TCP_MISS/200 7354 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.655 128 192.168.0.101 TCP_MISS/200 7935 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.655 128 192.168.0.101 TCP_MISS/200 7935 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.806 124 192.168.0.101 TCP_MISS/200 5315 GET http://patch3.perfectworld.web.id/CPW/e ... VyLnhtbA== - DIRECT/202.93.17.197 text/plain
1371321343.806 124 192.168.0.101 TCP_MISS/200 5315 GET http://patch3.perfectworld.web.id/CPW/e ... VyLnhtbA== - DIRECT/202.93.17.197 text/plain
1371321343.917 89 192.168.0.101 TCP_MISS/200 1811 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321343.917 89 192.168.0.101 TCP_MISS/200 1811 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321344.069 131 192.168.0.101 TCP_MISS/200 8020 GET http://patch3.perfectworld.web.id/CPW/e ... xfMC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.069 131 192.168.0.101 TCP_MISS/200 8020 GET http://patch3.perfectworld.web.id/CPW/e ... xfMC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.219 124 192.168.0.101 TCP_MISS/200 5744 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.219 124 192.168.0.101 TCP_MISS/200 5744 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.383 148 192.168.0.101 TCP_MISS/200 6377 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.383 148 192.168.0.101 TCP_MISS/200 6377 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.528 127 192.168.0.101 TCP_MISS/200 6251 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.528 127 192.168.0.101 TCP_MISS/200 6251 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.673 126 192.168.0.101 TCP_MISS/200 6517 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.673 126 192.168.0.101 TCP_MISS/200 6517 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.816 125 192.168.0.101 TCP_MISS/200 6479 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.816 125 192.168.0.101 TCP_MISS/200 6479 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.958 124 192.168.0.101 TCP_MISS/200 5636 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.958 124 192.168.0.101 TCP_MISS/200 5636 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.097 127 192.168.0.101 TCP_MISS/200 6689 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.097 127 192.168.0.101 TCP_MISS/200 6689 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.240 125 192.168.0.101 TCP_MISS/200 6447 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.240 125 192.168.0.101 TCP_MISS/200 6447 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.382 124 192.168.0.101 TCP_MISS/200 6294 GET http://patch3.perfectworld.web.id/CPW/e ... xfOS54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.382 124 192.168.0.101 TCP_MISS/200 6294 GET http://patch3.perfectworld.web.id/CPW/e ... xfOS54bWw= - DIRECT/202.93.17.201 text/plain

Jika ditulis seperti di bawah ini, benar atau tidak ?
Tampilkan

Code: Select all

refresh_pattern ^http://patch[0-9]\/.*\.(([a-zA-Z][0-9]{14}=)|([a-zA-Z][0-9]{14}==)|([a-zA-Z][0-9]{15}=)|([a-zA-Z][0-9]{18}==)|([a-zA-Z][0-9]{16}))$
atau

Code: Select all

refresh_pattern ^http://patch[0-9]\.perfectworld\.web\.id\/.*\.(([a-zA-Z][0-9]{14}=)|([a-zA-Z][0-9]{14}==)|([a-zA-Z][0-9]{15}=)|([a-zA-Z][0-9]{18}==)|([a-zA-Z][09]{16}))$
opsi2 refresh_pattern sengaja tidak disertakan u/ menghemat tempat.
User avatar
Malsasa
Posts: 2974
Joined: 07 Jun 2010, 22:37
Location: Mojokerto, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Malsasa » 16 Jun 2013, 11:32

Bagaimana kalau kita ganti [a-zA-Z][0-9] dengan [[:alnum:]], Kang?
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby sipelaut » 16 Jun 2013, 13:17

asik ada tempat prifat belajr refresh pattern
untuk sementara ini jadi pengamat dulu..
---sori klo ngjunk---
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 16 Jun 2013, 17:18

Malsasa wrote:Bagaimana kalau kita ganti [a-zA-Z][0-9] dengan [[:alnum:]], Kang?

  • Bisa dijelaskan lebih lanjut mas, saya kok baru tahu ada [[:alnum:]]
  • Refferensi regex bagi pemula mas, kalau ada
User avatar
Malsasa
Posts: 2974
Joined: 07 Jun 2010, 22:37
Location: Mojokerto, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Malsasa » 16 Jun 2013, 17:35

Anu, Kang. Regex a-zA-Z itu untuk huruf semuanya, sedangkan 0-9 itu untuk angka semuanya pokoknya angkanya cuma satu saja. Lha, hal ini disadari oleh orang-orang tua sejak dulu lalu dibuatkan standar POSIX khusus menggantikan keduanya sekaligus yakni kode alnum. Ada kode lain semacam:

:digit: -> hanya angka, ini menggantikan 0-9
:blank: -> ruang kosong, ini menggantikan spasi dan TAB
:ctrl: -> melacak tombol Control

dan banyak lagi kepraktisan lain dari standar POSIX. Nah, bagaimana?
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 16 Jun 2013, 18:03

Terima kasih mas. Tapi, saya tidak tahu apakah squid support regex dengan standar POSIX :) Jadi saya belum berani menggantikan dengan POSIX.
BTW, dengan memasukkan {min,max} bisa di-pendek-kan menjadi =
Tampilkan

Code: Select all

# refresh_pattern ^http://patch[0-9]\/.*\.(([a-zA-Z0-9]{14,15}=)|([a-zA-Z0-9]{14,18}==)|([a-zA-Z0-9]{16}))$
# refresh_pattern ^http://patch[0-9]\.perfectworld\.web\.id\/.*\.(([a-zA-Z0-9]{14,15}=)|([a-zA-Z0-9]{14,18}==)|([a-zA-Z0-9]{16}))$


##
Sebagai bahan bacaan, saya menemukan link ini.
http://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm
http://www.regular-expressions.info/reference.html

##
Secara on-line anda bisa melakukan testing di sini
http://regexpal.com/


##Update
Dengan regex yang di kedua, hasilnya hit =
Attachments
pw_hit.PNG
pw_hit.PNG (91.99 KiB) Viewed 641 times
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Bandi_Shippuden » 20 Jun 2013, 00:20

[size:17pt]Kasus Kedua
WARTUNE
[/size]

Masalah GAME watune yang kemaren udah fix mas Pragola
setlah saya amati di access.log kemudian saya tambahkan tulisan ini ..

[font:Courier New]
Tampilkan
acl wartune1 urlpath_regex \.wartune\.r2games\.com\/client\/game\/(.*)(xml|css|zip|txt)
acl wartune2 urlpath_regex ^http:\/\/*.wartune\.r2games\.com\/login\?
acl wartune3 urlpath_regex -i (Loading.swf|config.xml|mainloading.swf|loadingselectlist)($|\?)
cache deny wartune1
cache deny wartune3
always_direct allow wartune2
[/font]

mohon di koreksi lagi mas dalam cara penulisanya ...
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 20 Jun 2013, 02:02

@bandi16
Bisa anda lampirkan access.log ke Wartune kan ?
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Bandi_Shippuden » 20 Jun 2013, 03:03

ini mas gambarnya ...
Ini waktu Loading
Tampilkan
Image

Ini udah masuk kedalam Game
Tampilkan
Image
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Bandi_Shippuden » 20 Jun 2013, 03:14

ini textnya mas ..
[font:Courier New]
Tampilkan
1371672663.524 12 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/status.png - NONE/- image/png
1371672663.524 12 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/artwork_title.png - NONE/- image/png
1371672663.524 12 192.168.10.100 TCP_IMS_HIT/304 323 GET http://wartune.r2games.com/images/wallpaper.jpg - NONE/- image/jpeg
1371672663.524 15 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/server_list_bg.png - NONE/- image/png
1371672663.524 12 192.168.10.100 TCP_IMS_HIT/304 323 GET http://wartune.r2games.com/images/screenshots.jpg - NONE/- image/jpeg
1371672663.542 10 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/server_list_tb_bg.png - NONE/- image/png
1371672663.542 10 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/servers_title.png - NONE/- image/png
1371672663.542 10 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/serve ... mid_bg.png - NONE/- image/png
1371672663.542 13 192.168.10.100 TCP_IMS_HIT/304 323 GET http://wartune.r2games.com/images/movies.jpg - NONE/- image/jpeg
1371672663.559 3 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/server_list.png - NONE/- image/png
1371672663.979 1755 192.168.10.100 TCP_MISS/200 92293 GET http://wartune.r2games.com/server/list - DIRECT/207.198.119.75 text/html
1371672664.038 9 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/last_post.png - NONE/- image/png
1371672664.038 9 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/logout.png - NONE/- image/png
1371672664.038 9 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/forum_title.png - NONE/- image/png
1371672664.322 298 192.168.10.100 TCP_MISS/200 779 GET http://forum.r2games.com/wartunepost.ph ... veby=false - DIRECT/64.34.180.245 text/html
1371672664.754 19 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/r2_logo.png - NONE/- image/png
1371672664.776 3 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/fb_title.png - NONE/- image/png
1371672664.776 6 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/forum_list.png - NONE/- image/png
1371672664.788 3 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/loading.gif - NONE/- image/gif
1371672664.840 3 192.168.10.100 TCP_IMS_HIT/304 322 GET http://wartune.r2games.com/images/server_tabs.png - NONE/- image/png
1371672665.184 267 192.168.10.100 TCP_REFRESH_HIT/200 580 GET http://www.google-analytics.com/__utm.g ... UTF-8&utms
r=1440x900&utmvp=1423x770&utmsc=24-bit&utmul=en-us&utmje=1&utmfl=11.7%20r700&utmdt=Wartune%20Official%20Website%20-%202012%20Epic%20Strategy%20MMORPG%2C%20Play%20for%20FREE!&utmhid=1158
113802&utmr=0&utmp=%2Fserver%2Flist&utmht=1371672660612&utmac=UA-18157850-19&utmcc=__utma%3D180206114.920853804.1371126070.1371126070.1371671639.2%3B%2B__utmz%3D180206114.1371671639.2.2
.utmcsr%3Dgoogle%7Cutmccn%3D(organic)%7Cutmcmd%3Dorganic%7Cutmctr%3Dwartune%3B&utmu=q%7E - DIRECT/173.194.38.165 image/gif
1371672669.902 5 192.168.10.100 TCP_IMS_HIT/304 327 GET http://wartune.r2games.com/favicon.ico - NONE/- image/x-icon
1371672670.249 371 192.168.10.100 TCP_MISS/200 8466 GET http://www.facebook.com/plugins/like_bo ... er=true&st
ream=false&width=190&app_id=151606178257097&locale=en_US&sdk=joey&channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D25%23cb%3Df26b0e9c04a09%26origin%3Dh
ttp%253A%252F%252Fwartune.r2games.com%252Ff257ce637d0e92a%26domain%3Dwartune.r2games.com%26relation%3Dparent.parent - DIRECT/31.13.70.1 text/html
1371672670.431 534 192.168.10.100 TCP_MISS/200 3720 GET http://wartune.r2games.com/game/play/?server=270 - DIRECT/207.198.119.75 text/html
1371672670.497 3 192.168.10.100 TCP_IMS_HIT/304 317 GET http://cdn.r2games.com/wartune/ingame.js?ver=0411 - NONE/- application/x-javascript
1371672670.969 462 192.168.10.100 TCP_MISS/200 4513 GET http://wartune.r2games.com/game/event?server=270&fbid= - DIRECT/207.198.119.75 text/html
1371672670.998 23 192.168.10.100 TCP_MISS/304 374 GET http://cdn.r2games.com/en/wartune/ingame/css/layout.css - DIRECT/205.185.216.10 text/css
1371672670.999 8 192.168.10.100 TCP_IMS_HIT/304 317 GET http://cdn.r2games.com/en/wartune/ingam ... .js?v=0912 - NONE/- application/x-javascript
1371672670.999 5 192.168.10.100 TCP_IMS_HIT/304 317 GET http://cdn.r2games.com/en/wartune/ingam ... .js?v=0912 - NONE/- application/x-javascript
1371672671.074 28 192.168.10.100 TCP_IMS_HIT/304 317 GET http://cdn.r2games.com/en/wartune/ingam ... .js?v=0912 - NONE/- application/x-javascript
1371672671.076 26 192.168.10.100 TCP_IMS_HIT/304 302 GET http://cdn.r2games.com/en/wartune/ingam ... s/text.gif - NONE/- image/gif
1371672671.076 26 192.168.10.100 TCP_IMS_HIT/304 323 GET http://static.r2games.com/banner/r2game ... s_0617.jpg - NONE/- image/jpeg
1371672671.076 26 192.168.10.100 TCP_IMS_HIT/304 323 GET http://static.r2games.com/banner/r2game ... e_0613.jpg - NONE/- image/jpeg
1371672671.099 49 192.168.10.100 TCP_IMS_HIT/304 302 GET http://cdn.r2games.com/en/wartune/ingame/images/r2.gif - NONE/- image/gif
1371672671.099 49 192.168.10.100 TCP_IMS_HIT/304 303 GET http://cdn.r2games.com/en/wartune/ingame/images/bg.jpg - NONE/- image/jpeg
1371672671.116 6 192.168.10.100 TCP_IMS_HIT/304 302 GET http://cdn.r2games.com/en/wartune/ingam ... s/disc.png - NONE/- image/png
1371672671.117 16 192.168.10.100 TCP_IMS_HIT/304 302 GET http://cdn.r2games.com/en/wartune/ingam ... /light.png - NONE/- image/png
1371672671.136 24 192.168.10.100 TCP_IMS_HIT/304 302 GET http://cdn.r2games.com/en/wartune/ingam ... /arrow.png - NONE/- image/png
1371672671.236 187 192.168.10.100 TCP_MISS/304 375 GET http://cdn.r2games.com/en/wartune/ingam ... wn_txt.png - DIRECT/205.185.216.10 image/png
1371672671.269 446 192.168.10.100 TCP_MISS/200 1625 GET http://s81.wartune.r2games.com/client/g ... 2game_0081 - DIRECT
/207.198.105.37 text/html
1371672671.280 230 192.168.10.100 TCP_REFRESH_HIT/304 374 GET http://cdn.r2games.com/en/wartune/ingam ... ine_bg.png - DIRECT/205.185.216.10 image/png
1371672671.280 187 192.168.10.100 TCP_REFRESH_HIT/304 374 GET http://cdn.r2games.com/en/wartune/ingam ... s/line.png - DIRECT/205.185.216.10 image/png
1371672671.330 26 192.168.10.100 TCP_HIT/200 3103 GET http://s81.wartune.r2games.com/client/s ... sniffer.js - NONE/- text/javascript
1371672671.332 32 192.168.10.100 TCP_HIT/200 32575 GET http://s81.wartune.r2games.com/client/scripts/jquery.js - NONE/- text/javascript
1371672671.349 7 192.168.10.100 TCP_HIT/200 6461 GET http://s81.wartune.r2games.com/client/scripts/shenqu.js - NONE/- text/javascript
1371672671.280 230 192.168.10.100 TCP_REFRESH_HIT/304 374 GET http://cdn.r2games.com/en/wartune/ingam ... ine_bg.png - DIRECT/205.185.216.10 image/png
1371672671.280 187 192.168.10.100 TCP_REFRESH_HIT/304 374 GET http://cdn.r2games.com/en/wartune/ingam ... s/line.png - DIRECT/205.185.216.10 image/png
1371672671.330 26 192.168.10.100 TCP_HIT/200 3103 GET http://s81.wartune.r2games.com/client/s ... sniffer.js - NONE/- text/javascript
1371672671.332 32 192.168.10.100 TCP_HIT/200 32575 GET http://s81.wartune.r2games.com/client/scripts/jquery.js - NONE/- text/javascript
1371672671.349 7 192.168.10.100 TCP_HIT/200 6461 GET http://s81.wartune.r2games.com/client/scripts/shenqu.js - NONE/- text/javascript
1371672671.349 7 192.168.10.100 TCP_HIT/200 4407 GET http://s81.wartune.r2games.com/client/s ... fobject.js - NONE/- text/javascript
1371672671.541 7 192.168.10.100 TCP_HIT/200 48772 GET http://s81.wartune.r2games.com/client/framebg02.jpg - NONE/- image/jpeg
1371672671.681 2 192.168.10.100 TCP_IMS_HIT/304 327 GET http://wartune.r2games.com/favicon.ico - NONE/- image/x-icon
1371672672.475 922 192.168.10.100 TCP_MISS/200 147923 GET http://s81.wartune.r2games.com/client/L ... d=sEedee98 - DIRECT/207.198.105.37 application/x-shockwave-flash
1371672673.750 1209 192.168.10.100 TCP_MISS/200 27520 GET http://s81.wartune.r2games.com/client/c ... 6403414607 - DIRECT/207.198.105.37 application/xml
1371672674.224 445 192.168.10.100 TCP_MISS/200 537 GET http://s40.wartune.r2games.com/crossdomain.xml - DIRECT/207.198.105.37 application/xml
1371672674.475 232 192.168.10.100 TCP_MISS/200 590 GET http://s40.wartune.r2games.com/loginsel ... 2652078867 - DIRECT/207.198.10
5.37 text/html
1371672678.109 3582 192.168.10.100 TCP_MISS/200 514 POST http://s40.wartune.r2games.com/login - DIRECT/207.198.105.37 text/html
1371672678.222 63 192.168.10.100 TCP_HIT/200 343257 GET http://s81.wartune.r2games.com/client/r ... 4781149328 - NONE/- -
1371672678.950 436 192.168.10.100 TCP_MISS/200 429 GET http://res40.wartune.r2games.com:8080/crossdomain.xml - DIRECT/207.198.105.37 text/xml
1371672683.306 4342 192.168.10.100 TCP_MISS/200 231979 GET http://res40.wartune.r2games.com:8080/u ... 924a0a00c& - DIRECT/207.198.105
.37 application/x-shockwave-flash
1371672683.661 306 192.168.10.100 TCP_HIT/200 1955373 GET http://res40.wartune.r2games.com:8080/2 ... 4e4bd8c27& - NONE/- image/png
1371672686.821 254 192.168.10.100 TCP_MISS/200 546 GET http://s40.wartune.r2games.com/xml/prox ... 781149328& - DIRECT/207.198.105.37 text/pl
ain
1371672687.351 505 192.168.10.100 TCP_MISS/200 2597 GET http://s40.wartune.r2games.com/xml/zip_ ... 7503294349 - DIRECT/207.198.105.37 text/
plain
1371672687.392 756 192.168.10.100 TCP_MISS/200 6001 GET http://res40.wartune.r2games.com:8080/u ... 7503294349 - DIRECT/207.198.105.37 text/xml
1371672687.705 269 192.168.10.100 TCP_MISS/200 1299 GET http://s40.wartune.r2games.com/xml/vers ... 781149328& - DIRECT/207.198.105.37 application/xml
1371672687.906 467 192.168.10.100 TCP_MISS/200 944 GET http://s40.wartune.r2games.com/xml/avat ... 4781149328 - DIRECT/207.198.105.37 applicatio
n/xml
1371672689.435 1695 192.168.10.100 TCP_MISS/200 28263 GET http://s40.wartune.r2games.com/xml/reso ... 781149328& - DIRECT/207.198.105.37 application/xml
1371672689.527 35 192.168.10.100 TCP_HIT/200 43789 GET http://res40.wartune.r2games.com:8080/4 ... 1a1d5f26b& - NONE/- image/png
1371672689.819 1892 192.168.10.100 TCP_MISS/200 33230 GET http://res40.wartune.r2games.com:8080/s ... 6c72ecff5& - DIRECT/207.198.105.37 applic
ation/x-shockwave-flash
1371672691.826 5185 192.168.10.100 TCP_MISS/200 290432 GET http://res40.wartune.r2games.com:8080/u ... 7503294349 - DIRECT/207.198
.105.37 text/plain
1371672692.010 91 192.168.10.100 TCP_HIT/200 46279 GET http://res40.wartune.r2games.com:8080/u ... 4860b0e2c& - NONE/- application/x-s
hockwave-flash
1371672692.018 105 192.168.10.100 TCP_HIT/200 98977 GET http://res40.wartune.r2games.com:8080/u ... 5a6be3722& - NONE/- application/x
-shockwave-flash
1371672692.077 39 192.168.10.100 TCP_HIT/200 31202 GET http://res40.wartune.r2games.com:8080/u ... 3ae63cdc4& - NONE/- application/x-sh
ockwa[/font]ve-flash
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 20 Jun 2013, 05:17

bandi16 wrote:

Code: Select all

acl wartune1 urlpath_regex \.wartune\.r2games\.com\/client\/game\/(.*)(xml|css|zip|txt)
acl wartune2 urlpath_regex ^http:\/\/*.wartune\.r2games\.com\/login\?
acl wartune3 urlpath_regex -i (Loading.swf|config.xml|mainloading.swf|loadingselectlist)($|\?)
cache deny wartune1
cache deny wartune3
always_direct allow wartune2


Error-nya ter-atasi, tapi kok malah HIT ya ?
User avatar
Bandi_Shippuden
Posts: 62
Joined: 04 May 2012, 12:06
Location: Pekanbaru, Indonesia
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby Bandi_Shippuden » 20 Jun 2013, 05:28

Pragola_Pati wrote:
bandi16 wrote:

Code: Select all

acl wartune1 urlpath_regex \.wartune\.r2games\.com\/client\/game\/(.*)(xml|css|zip|txt)
acl wartune2 urlpath_regex ^http:\/\/*.wartune\.r2games\.com\/login\?
acl wartune3 urlpath_regex -i (Loading.swf|config.xml|mainloading.swf|loadingselectlist)($|\?)
cache deny wartune1
cache deny wartune3
always_direct allow wartune2


Error-nya ter-atasi, tapi kok malah HIT ya ?


La aq juga gak tau mas ...
soalnya pemikiran saya error yang terjadi itu karana fila lama yang di sini ..

Code: Select all

acl wartune2 urlpath_regex ^http:\/\/*.wartune\.r2games\.com\/login\?
acl wartune3 urlpath_regex -i (Loading.swf|config.xml|mainloading.swf|loadingselectlist)($|\?)


sama data2 yang di bagian

Code: Select all

acl wartune1 urlpath_regex \.wartune\.r2games\.com\/client\/game\/(.*)(xml|css|zip|txt)

itu bentrok sama data2 baru, si proxy nganggep itu data udah ada tersimpan padahal data yang tersimpan itu data lama , makanya setiap kali update selalu bermasalah dan harus di besihkan cachenya ...

itu hanya pemikiran saya mas ,,,
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 20 Jun 2013, 06:55

^
@bandi16
Sepertinya tidak ada masalah di regex-nya mas. Kalau mau coba, bagian regex baris pertama tsb anda ubah seperti di bawah ini =

Code: Select all

acl wartune1 urlpath_regex -i \.wartune\.r2games\.com\/client\/game\/(.*)(xml|css|txt)$
acl wartune2 urlpath_regex ^http:\/\/*.wartune\.r2games\.com\/login\?
acl wartune3 urlpath_regex -i (Loading.swf|config.xml|mainloading.swf|loadingselectlist)($|\?)
cache deny wartune1
cache deny wartune3
always_direct allow wartune1 wartune2
User avatar
newbie_linx
Posts: 13
Joined: 03 Aug 2012, 15:49
Location: indonesia

Re: [Belajar]RegulerExpressions u/ Squid

Postby newbie_linx » 10 Oct 2013, 12:57

klo begini gimana regexnya kang kang semua
Attachments
3.JPG
3.JPG (89.92 KiB) Viewed 574 times
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 10 Oct 2013, 13:10

Output cli di bawah ini anda copikan saja. Gambar di atas kekecilan :)

Code: Select all

~#cat /var/log/squid/access.log | grep gemscool
User avatar
newbie_linx
Posts: 13
Joined: 03 Aug 2012, 15:49
Location: indonesia

Re: [Belajar]RegulerExpressions u/ Squid

Postby newbie_linx » 10 Oct 2013, 16:23

begini kang : file .pak nya g kecache bikin refresh patternnya gimana pas nya ya kang...

1381374646.995 631 192.168.88.29 TCP_MISS/404 415 GET http://patch.gemscool.com/dragonnest/li ... 000076.txt - DIRECT/49.50.7.43 text/html
1381374647.298 296 192.168.88.29 TCP_MISS/404 415 GET http://patch.gemscool.com/dragonnest/li ... 000076.txt - DIRECT/49.50.7.43 text/html
1381374647.491 187 192.168.88.29 TCP_MISS/404 415 GET
http://patch.gemscool.com/dragonnest/li ... 000076.txt - DIRECT/49.50.7.43 text/html
1381375034.909 1175899 192.168.88.16 TCP_MISS/206 101539505 GET http://patch.gemscool.com/dragonnest/li ... 000076.pak - DIRECT/49.50.7.43 application/octet-stream
1381375041.455 113 192.168.88.16 TCP_MISS/404 416 GET http://patch.gemscool.com/dragonnest/li ... 000076.txt - DIRECT/49.50.7.43 text/html
1381375041.718 246 192.168.88.16 TCP_MISS/200 1718 GET http://patch.gemscool.com/dragonnest/li ... 000076.pak - DIRECT/49.50.7.43 application/octet-stream

##
ada tutorial sederhana bikin regex untuk newbie spt saya g kang yah
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby q_p » 10 Oct 2013, 18:54

newbie_linx wrote:...
1381375041.718 246 192.168.88.16 [color:#660000]TCP_MISS/200[/color] 1718 GET http://patch.gemscool.com/dragonnest/li ... 000076.pak - DIRECT/49.50.7.43 application/octet-stream
...
##
ada tutorial sederhana bikin regex untuk newbie spt saya g kang yah

Hari ini DragonNest update besar2-an ya (600-an mb) ? Kita tunggu saja bagaimana kelanjutannya. saya malah baru tahu dari anda kalau DragonNest sebelum ter-cache, status-nya [color:#660000]TCP_MISS/200[/color]. Sebelumnya jika tdk ter-cache, statusnya adalah [color:#660000]TCP_MISS/206[/color] yang artinya itu partial-content (reff = http://wiki.squid-cache.org/SquidFaq/Sq ... atus_codes ).
  1. Jika status-nya [color:#660000]TCP_MISS/200[/color], yang di bawah ini bisa anda pertimbangkan untuk dipakai pada game2-nya gemscool

    Code: Select all

    #satu baris
    refresh_pattern \.gemscool.com.*\.(exe|dll|cab|zip|iop|nzp|swf|pak)$ 1440 100% 4320
    override-expire override-lastmod reload-into-ims ignore-auth store-stale
  2. Jika status-nya [color:#660000]TCP_MISS/206[/color], disamping refresh_pattern di atas, masih diperlukan lagi pengaturan lanjutan pada squid.conf
  3. Untuk melihat statistic TCP_*/* pada access.log

    Code: Select all

     cat /var/log/squid/access.log | awk '{print $4}' | sort | uniq -c | sort -rn
Di postingan atas, ada beberapa link yang bisa anda jadikan bahan bacaan/tut.
User avatar
newbie_linx
Posts: 13
Joined: 03 Aug 2012, 15:49
Location: indonesia

Re: [Belajar]RegulerExpressions u/ Squid

Postby newbie_linx » 11 Oct 2013, 16:11

makasih kang atas penjelasannya tak coba dulu, matur nuwun
User avatar
bang_andi
Posts: 398
Joined: 03 Sep 2010, 09:07
Location: Di sekitar sungai musi...
Contact:

Re: [Belajar]RegulerExpressions u/ Squid

Postby bang_andi » 18 Oct 2013, 21:59

q_p wrote:Bagi Warga yang punya kasus penulisan RegEx untuk refresh_pattern squid, silahkan mampir di sini untuk belajar bareng. Sebagai awalan, berikut kasus dari saya =

[size:17pt]Kasus Pertama
PERFECT WORLD
[/size]
output access.log
1371321185.119 93 192.168.0.101 TCP_REFRESH_MISS/200 244 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321185.119 93 192.168.0.101 TCP_REFRESH_MISS/200 244 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321185.205 81 192.168.0.101 TCP_REFRESH_HIT/200 233 GET http://patch3.perfectworld.web.id/CPW/patcher/version - DIRECT/202.93.17.201 text/plain
1371321185.205 81 192.168.0.101 TCP_REFRESH_HIT/200 233 GET http://patch3.perfectworld.web.id/CPW/patcher/version - DIRECT/202.93.17.201 text/plain
1371321190.836 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321190.836 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321190.924 84 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321190.924 84 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321191.430 84 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321191.430 84 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321204.454 76 192.168.0.101 TCP_MISS/404 460 GET http://patch3.perfectworld.web.id/CPW/p ... ersion.txt - DIRECT/202.93.17.201 text/html
1371321204.454 76 192.168.0.101 TCP_MISS/404 460 GET http://patch3.perfectworld.web.id/CPW/p ... ersion.txt - DIRECT/202.93.17.201 text/html
1371321205.239 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321205.239 78 192.168.0.101 TCP_REFRESH_HIT/200 254 GET http://patch3.perfectworld.web.id/CPW/info/pid - DIRECT/202.93.17.197 text/plain
1371321205.323 79 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321205.323 79 192.168.0.101 TCP_REFRESH_HIT/200 857 GET http://patch3.perfectworld.web.id/CPW/l ... /files.md5 - DIRECT/202.93.17.201 text/plain
1371321205.793 85 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321205.793 85 192.168.0.101 TCP_REFRESH_HIT/200 264 GET http://patch3.perfectworld.web.id/CPW/l ... SNLmJhdA== - DIRECT/202.93.17.197 text/plain
1371321217.363 92 192.168.0.101 TCP_REFRESH_MISS/200 234 GET http://patch3.perfectworld.web.id/CPW/element/version - DIRECT/202.93.17.201 text/plain
1371321217.363 92 192.168.0.101 TCP_REFRESH_MISS/200 234 GET http://patch3.perfectworld.web.id/CPW/element/version - DIRECT/202.93.17.201 text/plain
1371321218.153 95 192.168.0.101 TCP_REFRESH_MISS/200 2035 GET http://patch3.perfectworld.web.id/CPW/element/v-1.inc - DIRECT/202.93.17.197 text/plain
1371321218.153 95 192.168.0.101 TCP_REFRESH_MISS/200 2035 GET http://patch3.perfectworld.web.id/CPW/element/v-1.inc - DIRECT/202.93.17.197 text/plain
1371321220.830 2605 192.168.0.101 TCP_MISS/200 368694 GET http://patch3.perfectworld.web.id/CPW/e ... VzYy50eHQ= - DIRECT/202.93.17.201 text/plain
1371321220.830 2605 192.168.0.101 TCP_MISS/200 368694 GET http://patch3.perfectworld.web.id/CPW/e ... VzYy50eHQ= - DIRECT/202.93.17.201 text/plain
1371321222.649 1318 192.168.0.101 TCP_MISS/200 196857 GET http://patch3.perfectworld.web.id/CPW/e ... xzdHIudHh0 - DIRECT/202.93.17.197 text/plain
1371321222.649 1318 192.168.0.101 TCP_MISS/200 196857 GET http://patch3.perfectworld.web.id/CPW/e ... xzdHIudHh0 - DIRECT/202.93.17.197 text/plain
1371321223.437 315 192.168.0.101 TCP_MISS/200 51884 GET http://patch3.perfectworld.web.id/CPW/e ... AuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321223.437 315 192.168.0.101 TCP_MISS/200 51884 GET http://patch3.perfectworld.web.id/CPW/e ... AuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321252.767 27929 192.168.0.101 TCP_MISS/200 3448165 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321252.767 27929 192.168.0.101 TCP_MISS/200 3448165 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321254.899 145 192.168.0.101 TCP_REFRESH_MISS/200 7615 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321254.899 145 192.168.0.101 TCP_REFRESH_MISS/200 7615 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.201 text/plain
1371321338.565 81091 192.168.0.101 TCP_MISS/200 9889450 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321338.565 81091 192.168.0.101 TCP_MISS/200 9889450 GET http://patch3.perfectworld.web.id/CPW/e ... MuZGF0YQ== - DIRECT/202.93.17.197 text/plain
1371321341.737 86 192.168.0.101 TCP_MISS/200 1805 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321341.737 86 192.168.0.101 TCP_MISS/200 1805 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321342.083 300 192.168.0.101 TCP_REFRESH_MISS/200 47969 GET http://patch3.perfectworld.web.id/CPW/e ... 1lLnN0Zg== - DIRECT/202.93.17.197 text/plain
1371321342.083 300 192.168.0.101 TCP_REFRESH_MISS/200 47969 GET http://patch3.perfectworld.web.id/CPW/e ... 1lLnN0Zg== - DIRECT/202.93.17.197 text/plain
1371321342.450 101 192.168.0.101 TCP_REFRESH_MISS/200 3450 GET http://patch3.perfectworld.web.id/CPW/e ... 51aS5zdGY= - DIRECT/202.93.17.201 text/plain
1371321342.450 101 192.168.0.101 TCP_REFRESH_MISS/200 3450 GET http://patch3.perfectworld.web.id/CPW/e ... 51aS5zdGY= - DIRECT/202.93.17.201 text/plain
1371321342.618 124 192.168.0.101 TCP_MISS/200 6797 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.618 124 192.168.0.101 TCP_MISS/200 6797 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.761 126 192.168.0.101 TCP_MISS/200 7141 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.201 text/plain
1371321342.761 126 192.168.0.101 TCP_MISS/200 7141 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.201 text/plain
1371321342.909 130 192.168.0.101 TCP_MISS/200 8183 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.197 text/plain
1371321342.909 130 192.168.0.101 TCP_MISS/200 8183 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.060 126 192.168.0.101 TCP_MISS/200 6886 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.060 126 192.168.0.101 TCP_MISS/200 6886 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.204 128 192.168.0.101 TCP_MISS/200 8093 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.204 128 192.168.0.101 TCP_MISS/200 8093 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.355 124 192.168.0.101 TCP_MISS/200 6088 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.355 124 192.168.0.101 TCP_MISS/200 6088 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.500 126 192.168.0.101 TCP_MISS/200 7354 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.500 126 192.168.0.101 TCP_MISS/200 7354 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.197 text/plain
1371321343.655 128 192.168.0.101 TCP_MISS/200 7935 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.655 128 192.168.0.101 TCP_MISS/200 7935 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.201 text/plain
1371321343.806 124 192.168.0.101 TCP_MISS/200 5315 GET http://patch3.perfectworld.web.id/CPW/e ... VyLnhtbA== - DIRECT/202.93.17.197 text/plain
1371321343.806 124 192.168.0.101 TCP_MISS/200 5315 GET http://patch3.perfectworld.web.id/CPW/e ... VyLnhtbA== - DIRECT/202.93.17.197 text/plain
1371321343.917 89 192.168.0.101 TCP_MISS/200 1811 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321343.917 89 192.168.0.101 TCP_MISS/200 1811 GET http://patch3.perfectworld.web.id/CPW/e ... hwbXAueG1s - DIRECT/202.93.17.201 text/plain
1371321344.069 131 192.168.0.101 TCP_MISS/200 8020 GET http://patch3.perfectworld.web.id/CPW/e ... xfMC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.069 131 192.168.0.101 TCP_MISS/200 8020 GET http://patch3.perfectworld.web.id/CPW/e ... xfMC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.219 124 192.168.0.101 TCP_MISS/200 5744 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.219 124 192.168.0.101 TCP_MISS/200 5744 GET http://patch3.perfectworld.web.id/CPW/e ... xfMS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.383 148 192.168.0.101 TCP_MISS/200 6377 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.383 148 192.168.0.101 TCP_MISS/200 6377 GET http://patch3.perfectworld.web.id/CPW/e ... xfMi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.528 127 192.168.0.101 TCP_MISS/200 6251 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.528 127 192.168.0.101 TCP_MISS/200 6251 GET http://patch3.perfectworld.web.id/CPW/e ... xfMy54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.673 126 192.168.0.101 TCP_MISS/200 6517 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.673 126 192.168.0.101 TCP_MISS/200 6517 GET http://patch3.perfectworld.web.id/CPW/e ... xfNC54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.816 125 192.168.0.101 TCP_MISS/200 6479 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.816 125 192.168.0.101 TCP_MISS/200 6479 GET http://patch3.perfectworld.web.id/CPW/e ... xfNS54bWw= - DIRECT/202.93.17.201 text/plain
1371321344.958 124 192.168.0.101 TCP_MISS/200 5636 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.197 text/plain
1371321344.958 124 192.168.0.101 TCP_MISS/200 5636 GET http://patch3.perfectworld.web.id/CPW/e ... xfNi54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.097 127 192.168.0.101 TCP_MISS/200 6689 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.097 127 192.168.0.101 TCP_MISS/200 6689 GET http://patch3.perfectworld.web.id/CPW/e ... xfNy54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.240 125 192.168.0.101 TCP_MISS/200 6447 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.240 125 192.168.0.101 TCP_MISS/200 6447 GET http://patch3.perfectworld.web.id/CPW/e ... xfOC54bWw= - DIRECT/202.93.17.197 text/plain
1371321345.382 124 192.168.0.101 TCP_MISS/200 6294 GET http://patch3.perfectworld.web.id/CPW/e ... xfOS54bWw= - DIRECT/202.93.17.201 text/plain
1371321345.382 124 192.168.0.101 TCP_MISS/200 6294 GET http://patch3.perfectworld.web.id/CPW/e ... xfOS54bWw= - DIRECT/202.93.17.201 text/plain

Jika ditulis seperti di bawah ini, benar atau tidak ?
Tampilkan

Code: Select all

refresh_pattern ^http://patch[0-9]\/.*\.(([a-zA-Z][0-9]{14}=)|([a-zA-Z][0-9]{14}==)|([a-zA-Z][0-9]{15}=)|([a-zA-Z][0-9]{18}==)|([a-zA-Z][0-9]{16}))$
atau

Code: Select all

refresh_pattern ^http://patch[0-9]\.perfectworld\.web\.id\/.*\.(([a-zA-Z][0-9]{14}=)|([a-zA-Z][0-9]{14}==)|([a-zA-Z][0-9]{15}=)|([a-zA-Z][0-9]{18}==)|([a-zA-Z][09]{16}))$
opsi2 refresh_pattern sengaja tidak disertakan u/ menghemat tempat.


izin menyimak mas bro :)

kali2 sj ada yg pas utk diterapkan di squid di tmpt ana.
User avatar
newbie_linx
Posts: 13
Joined: 03 Aug 2012, 15:49
Location: indonesia

Re: [Belajar]RegulerExpressions u/ Squid

Postby newbie_linx » 22 Oct 2013, 16:55

saya pakai refresh ini n hasilnya spt dibawah kok "direct" ya

refresh_pattern -i \.perfectworld.web.id.*\.(exe|dll|cab|dat|zip|lst|pkg|pck) 1440 100% 4320 override-expire override-lastmod reload-into-ims ignore-auth store-stale
Attachments
1.JPG
n hasilnya kok direct ya kang
1.JPG (261.36 KiB) Viewed 553 times

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 12 guests