Mempercapat SMART dengan Squid Windows

April 9, 2009 – 6:37 PM

Berhubung koneksi yang satu ini banyak yang memakai, namun tidak ultimited hanya terbatasi dengan 2GB saja perbulan dan free selama 6 bulan alias 12GB. Mantap kan bro dengan harga 333ribu ini kita bisa internetan 24Jam, Hebatnya lagi  di malam hari antara pukul 00.00 -08.00 dg kecepatan download 24KB bila beruntung, we keke.

Biar lebih beruntung lagi, mari kita buatkan squid buat komputer kita, alias hemat BBM, opo maneh .. kurang murah nich..  Menurut catatan yang di copy “untuk menghemat kouta bandwith dan meningkatkan kecepatan kita perlu gunakan cache proxy. Kenapa harus chace proxy ? Kenapa menggunakan cache proxy ? Dengan cache proxy, pada situs-situs yang sering kita kunjungi, content yang harus didownload dan mengurangi jatah quota kita akan lebih sedikit. Karena content-content tersebut akan tersimpan dahulu di cache proxy kita. Jadi secara tidak langsung, jika kita mengunjungi situs tersebut berulang kali, sama saja kita mendownload content dari komputer yang terinstall proxy kita. Kesimpulannya.. lebih cepat dan lebih ngirit bandwidth” oke,, mudeng ga?

Pertama kita siapkan koneksi kita, dalam hal ini kita pakek SMAT, namun tidak menutup kemungkinan yang lain juga bisa dong. Download saja squid untuk windows disni dan saatnya kita bermain-main dengan squid kita.. Banyak opsi yang bisa kita gunakan seperti pada tulisan yang dulu pernah dibahas squid di LINUX, namun dalam hal ini kita hanya akan memanfaatkan cache untuk 2GB kita biar ngirit dari pada mubazir akibat kita sering buka situs yang sama di hari yang sama, di minggu yang sama. Ugh,, loading lama lagi. Dengan squid dijamin tidak akan lama dengan syarat SMART dalam keadaan baik, tidak Request timed out dan ada sinyal tentunya bro.

Setelah kita download extras tuh squid di C:/ terus kita optimilisasi dengan cara :

1. Masuk ke C:/squid/etc  hampir mirip di linux ada etc nya ..

* cachemgr.conf.default

* mime.conf.default

* squid.conf.default

* squid_radius_auth.conf.default

Dirubah menjadi

  • cachemgr.conf
  • mime.conf
  • squid.conf
  • squid_radius_auth.conf

Oke, cukup mudah kan, dan ga harus belajar linux, ato apa kek, cuma tinggal rename aja.

2. Editlah squid.conf dengan script sebagai berikut ini

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
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

http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access deny all

icp_access allow all

http_port 3128

hierarchy_stoplist cgi-bin ?

cache_mem 94 MB
cache_dir ufs c:/squid/var/cache 512 16 256

minimum_object_size 0 KB
maximum_object_size 4096 KB

access_log c:/squid/var/logs/access.log squid
cache_log c:/squid/var/logs/cache.log
cache_store_log c:/squid/var/logs/store.log

ftp_passive off

acl QUERY urlpath_regex cgi-bin ?
cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
visible_hostname localhost
dns_nameservers 202.70.61.61 202.43.178.245
coredump_dir c:/squid/var/cache

Gimana, gampang kan,, Scrpit asli dari squid.conf bisa di backup dulu, terus diganti isinya dengan script diatas. cache_mem 94 MB disesuaikan aja dengan 1/4 RAM kamu.

3. Jalan kan opsi berikut ini didalam direktori C:/squid/sbin

C:squidsbin>squid -z
2009/04/10 08:45:20| Creating Swap Directories

C:squidsbin>squid -d l -D
2008/04/10 08:46:17| Starting Squid Cache version 2.7.STABLE5 for i686-pc-winnt.
2008/04/10 08:46:17| Running on Windows XP

Hentikan dengan ctrl+ZX

C:squidsbin>squid -i
Registry stored HKLMSOFTWAREGNUSquid2.6SquidConfigFile value c:/squid/etc/
squid.conf
Squid Cache version 2.7.STABLE5 for i686-pc-winnt
installed successfully as Squid Windows System Service.
To run, start it from the Services Applet of Control Panel.
Don’t forget to edit squid.conf before starting it.

C:squidsbin>squid -O -D
Registry stored HKLMSOFTWAREGNUSquid2.6SquidCommandLine value -D

Sampai disini kita sudah selesai , dan lihatlah cache.log pada C:/squid/var/cace.log

Bedanya disini untuk melihatnya bukan perintah tail -f , namun tinggal dibuka pekek notepad aja.

2009/04/10 00:45:44| logfileClose: closing log c:/squid/var/logs/store.log
2009/04/10 00:45:44| logfileClose: closing log c:/squid/var/logs/access.log
2009/04/10 00:45:44| Squid Cache (Version 2.7.STABLE6): Exiting normally.
2009/04/10 00:47:08| Starting Squid Cache version 2.7.STABLE6 for i686-pc-winnt…
2009/04/10 00:47:08| Running as Squid Windows System Service on Windows XP
2009/04/10 00:47:08| Service command line is: -D
2009/04/10 00:47:08| Process ID 1520
2009/04/10 00:47:08| With 2048 file descriptors available
2009/04/10 00:47:08| With 2048 CRT stdio descriptors available
2009/04/10 00:47:08| Windows sockets initialized
2009/04/10 00:47:08| Using select for the IO loop
2009/04/10 00:47:08| DNS Socket created at 0.0.0.0, port 3422, FD 5
2009/04/10 00:47:08| Adding nameserver 202.70.61.61 from squid.conf
2009/04/10 00:47:08| Adding nameserver 202.43.178.245 from squid.conf
2009/04/10 00:47:08| User-Agent logging is disabled.
2009/04/10 00:47:08| Referer logging is disabled.
2009/04/10 00:47:08| logfileOpen: opening log c:/squid/var/logs/access.log
2009/04/10 00:47:08| Unlinkd pipe opened on FD 8
2009/04/10 00:47:08| Swap maxSize 524288 + 96256 KB, estimated 0 objects
2009/04/10 00:47:08| Target number of buckets: 2386
2009/04/10 00:47:08| Using 8192 Store buckets
2009/04/10 00:47:08| Max Mem  size: 96256 KB
2009/04/10 00:47:08| Max Swap size: 524288 KB
2009/04/10 00:47:08| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2009/04/10 00:47:08| logfileOpen: opening log c:/squid/var/logs/store.log
2009/04/10 00:47:08| Rebuilding storage in c:/squid/var/cache (CLEAN)
2009/04/10 00:47:08| Using Least Load store dir selection
2009/04/10 00:47:08| Set Current Directory to c:/squid/var/cache
2009/04/10 00:47:08| Loaded Icons.
2009/04/10 00:47:08| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 14.
2009/04/10 00:47:08| Accepting ICP messages at 0.0.0.0, port 3130, FD 15.
2009/04/10 00:47:08| Accepting HTCP messages on port 4827, FD 16.
2009/04/10 00:47:08| Accepting SNMP messages on port 3401, FD 17.
2009/04/10 00:47:08| Ready to serve requests.
2009/04/10 00:47:08| Done reading c:/squid/var/cache swaplog (0 entries)
2009/04/10 00:47:08| Finished rebuilding storage from disk.
2009/04/10 00:47:08|         0 Entries scanned
2009/04/10 00:47:08|         0 Invalid entries.
2009/04/10 00:47:08|         0 With invalid flags.
2009/04/10 00:47:08|         0 Objects loaded.
2009/04/10 00:47:08|         0 Objects expired.
2009/04/10 00:47:08|         0 Objects cancelled.
2009/04/10 00:47:08|         0 Duplicate URLs purged.
2009/04/10 00:47:08|         0 Swapfile clashes avoided.
2009/04/10 00:47:08|   Took 0.1 seconds (   0.0 objects/sec).
2009/04/10 00:47:08| Beginning Validation Procedure
2009/04/10 00:47:08|   Completed Validation Procedure
2009/04/10 00:47:08|   Validated 0 Entries
2009/04/10 00:47:08|   store_swap_size = 0k
2009/04/10 00:47:09| storeLateRelease: released 0 objects

Selamat deh, kamu sudah berhasil membuat squid di Windows.

4. Lakukan perubahan option proxy pada browser kita, karena squid ini tidak transparan bro .. oke

Tols-Options-Advanced-Networks-Setting-Manual Setting Proxy

Disi dengan 127.0.0.1 dengan prot 3128 yang lainya di biarkan saja.

5.  Untuk menjalankan proxy, masuk ke “Control Panel” -> “Administrative Tools” -> “Services“. Kemudian cari nama services “squid” -> “Klik kanan” -> “Start“.

6. Cek di C:/squid/var/log/access.log

1239301675.546   4609 127.0.0.1 TCP_MISS/200 949 POST http://www.facebook.com/ajax/chat/buddy_list.php – DIRECT/69.63.176.140 application/x-javascript
1239301696.343  57093 127.0.0.1 TCP_MISS/200 395 GET http://0.channel04.facebook.com/x/939578876/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301696.578   3250 127.0.0.1 TCP_MISS/200 1106 POST http://www.facebook.com/ajax/chat/buddy_list.php – DIRECT/69.63.176.140 application/x-javascript
1239301702.203  57344 127.0.0.1 TCP_MISS/200 395 GET http://1.channel04.facebook.com/x/494772851/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301706.140   2140 127.0.0.1 TCP_MISS/200 1872 GET http://static.cache.l.google.com/safebrowsing/rd/goog-phish-shavar_a_51411-51415.51411-51415.: – DIRECT/74.125.96.86 application/vnd.google.safebrowsing-chunk
1239301732.250   4375 127.0.0.1 TCP_MISS/200 677 POST http://blog.uad.ac.id/lukman/wp-admin/admin-ajax.php – DIRECT/118.97.8.24 text/xml
1239301755.000  58547 127.0.0.1 TCP_MISS/200 395 GET http://0.channel04.facebook.com/x/331827029/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301759.359  57047 127.0.0.1 TCP_MISS/200 395 GET http://1.channel04.facebook.com/x/1833969791/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301780.140   2875 127.0.0.1 TCP_MISS/200 979 GET http://blog.uad.ac.id/lukman/wp-includes/js/thickbox/tb-close.png – DIRECT/118.97.8.24 image/png
1239301780.781   3516 127.0.0.1 TCP_MISS/200 3640 GET http://blog.uad.ac.id/lukman/wp-admin/media-upload.php? – DIRECT/118.97.8.24 text/html
1239301782.625   2735 127.0.0.1 TCP_MISS/200 2322 GET http://blog.uad.ac.id/lukman/wp-admin/css/media.css? – DIRECT/118.97.8.24 text/css
1239301784.578   1875 127.0.0.1 TCP_MISS/200 1593 GET http://blog.uad.ac.id/lukman/wp-content/plugins/wordpress-flickr-manager/js/wfm-lightbox.php? – DIRECT/118.97.8.24 text/javascript
1239301792.359   7375 127.0.0.1 TCP_MISS/200 9802 GET http://blog.uad.ac.id/lukman/wp-includes/js/swfupload/swfupload.js? – DIRECT/118.97.8.24 text/css
1239301810.359  17969 127.0.0.1 TCP_MISS/200 5209 GET http://blog.uad.ac.id/lukman/wp-includes/js/swfupload/plugins/swfupload.swfobject.js? – DIRECT/118.97.8.24 text/css
1239301810.406  22360 127.0.0.1 TCP_MISS/200 677 POST http://blog.uad.ac.id/lukman/wp-admin/admin-ajax.php – DIRECT/118.97.8.24 text/xml
1239301810.734  22563 127.0.0.1 TCP_MISS/200 1541 POST http://www.facebook.com/ajax/reqs.php – DIRECT/69.63.180.14 application/x-javascript
1239301812.156  57063 127.0.0.1 TCP_MISS/200 395 GET http://0.channel04.facebook.com/x/4281899396/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301812.984   2594 127.0.0.1 TCP_MISS/200 530 GET http://blog.uad.ac.id/lukman/wp-includes/js/swfupload/plugins/swfupload.queue.js? – DIRECT/118.97.8.24 text/css
1239301815.421   4546 127.0.0.1 TCP_MISS/200 1402 GET http://b.static.ak.fbcdn.net/images/icons/wall_post.gif – DIRECT/125.56.199.91 image/gif
1239301816.062   5250 127.0.0.1 TCP_MISS/200 676 GET http://b.static.ak.fbcdn.net/images/icons/friend_suggestion.gif – DIRECT/125.56.199.91 image/gif
1239301816.578  57094 127.0.0.1 TCP_MISS/200 395 GET http://1.channel04.facebook.com/x/3924218433/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301852.890   4687 127.0.0.1 TCP_MISS/200 697 POST http://blog.uad.ac.id/lukman/wp-admin/admin-ajax.php – DIRECT/118.97.8.24 text/xml
1239301872.812  59703 127.0.0.1 TCP_MISS/200 395 GET http://0.channel04.facebook.com/x/171220624/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain
1239301876.218  59531 127.0.0.1 TCP_MISS/200 395 GET http://1.channel04.facebook.com/x/2948167992/false/p_1248733445=0 – DIRECT/69.63.176.164 text/plain

Selamat Proxy kita sudah jalan. . untuk melihat cache yang tersmipan ada di C:squidvarcache. disitulah lokasi cache kita berada.

Kita juga bisa agar cache.log tidak bertambah banyak ukuranya, alias merekam aktifitas kita berinternet, tinggal di matikan saja di squid.conf cari kata ini “access_log c:/squid/var/logs/access.log squid” terus rubahlah menjadi “access_log none” tanpa tada petik.

Semoga bermanfaat.


No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags:

  1. 25 Responses to “Mempercapat SMART dengan Squid Windows”

  2. link squidnya kok nggak bisa bos ?

    By ongke on Apr 12, 2009

  3. Forbidden
    You don’t have permission to access /download/ on this server.
    Apache/2.0.52 (Red Hat) Server at squid.acmeconsulting.it Port 80
    Linknya capek di download terus.. sabar yo,. tak kasih link ini aja langsung di .zip nya http://squid.acmeconsulting.it/download/squid-2.7.STABLE6-bin.zip copy di Download magager ato di Adress bar langsung

    By lukman on Apr 12, 2009

  4. Link download squid
    http://spikecursed.blogsome.com/2008/08/23/windows-squid-proxy-server-27-stable-4/

    By spikecursed on Apr 13, 2009

  5. Didalam ketebatasan selalu mencari upaya agar kenyamanan dapat dinikmati… “good tips.”

    By mdin on Apr 14, 2009

  6. Ni tak kasih settingan lagi yang sudha tak acak2 lagi
    acl all src 0.0.0.0/0.0.0.0
    acl manager proto cache_object
    acl localhost src 127.0.0.1/255.255.255.255
    acl to_localhost dst 127.0.0.0/8
    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

    http_port 3128
    http_access allow manager localhost
    http_access deny manager
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access allow localhost
    http_access deny all

    icp_access deny all

    hierarchy_stoplist cgi-bin ?

    cache_mem 6 MB
    cache_swap_low 95
    cache_swap_high 98

    maximum_object_size 32 MB
    maximum_object_size_in_memory 32 KB

    cache_dir ufs c:/squid/var/cache1 256 8 128
    cache_dir ufs c:/squid/var/cache2 256 8 128

    ######################################################
    refresh_pattern -i \.gif$ 1440 500% 262800
    refresh_pattern -i \.jpg$ 1440 700% 262800
    refresh_pattern -i \.htm$ 20 40% 40320
    refresh_pattern -i \.html$ 20 40% 40320
    refresh_pattern \/$ 15 25% 20160
    refresh_pattern -i \.exe$ 2880 1000% 262800
    refresh_pattern -i \.zip$ 2880 1000% 262800
    refresh_pattern -i \.mpg$ 2880 1000% 262800
    refresh_pattern -i \.mov$ 2880 1000% 262800
    refresh_pattern -i \.pdf$ 2880 1000% 262800
    refresh_pattern -i \.avi$ 2880 1000% 262800
    refresh_pattern -i \.swf$ 2880 1000% 262800
    refresh_pattern ^ftp: 10080 95% 241920
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
    refresh_pattern . 1440 95% 4320
    ######################################################
    quick_abort_min 0 KB
    quick_abort_max 0 KB
    quick_abort_pct 100
    range_offset_limit 0 KB
    connect_timeout 5 seconds
    peer_connect_timeout 5 seconds
    read_timeout 40 seconds
    request_timeout 20 seconds
    half_closed_clients off
    shutdown_lifetime 20 seconds
    #####################################################
    icp_query_timeout 100
    maximum_icp_query_timeout 150
    logfile_rotate 2
    memory_pools off
    pipeline_prefetch on
    log_icp_queries off
    icp_hit_stale on
    vary_ignore_expire on
    store_avg_object_size 13 KB
    store_objects_per_bucket 10
    client_db off
    query_icmp off
    test_reachability off
    redirector_bypass on
    forwarded_for off

    ipcache_size 512
    ipcache_low 98
    ipcache_high 99
    fqdncache_size 512
    cache_replacement_policy heap LFUDA
    memory_replacement_policy heap GDSF

    log_fqdn off
    log_icp_queries off
    ftp_passive off

    access_log c:/squid/var/logs/access.log squid
    cache_log c:/squid/var/logs/cache.log
    cache_store_log none
    error_directory c:/squid/share/errors/English
    unlinkd_program c:/squid/libexec/unlinkd.exe
    icon_directory c:/squid/share/icons
    pid_filename c:/squid/var/logs/squid.pid
    mime_table c:/squid/etc/mime.conf
    cache_mgr squid@lukman.net

    acl QUERY urlpath_regex cgi-bin \?
    cache deny QUERY

    acl apache rep_header Server ^Apache
    broken_vary_encoding allow apache

    visible_hostname proxy.lukman.net

    dns_nameservers 202.70.61.61 202.43.178.245

    quick_abort_min 0
    quick_abort_max 0
    quick_abort_pct 98

    memory_pools off

    By lukman on Apr 16, 2009

  7. salam kenal !,
    makasih infonya.

    By Garmin on May 3, 2009

  8. salam kenal :D
    nice blog….and thx buat informasinya juga

    By rental mobil on May 7, 2009

  9. pas bgt …
    ini yang saya cari
    terimakasih pak

    By pasang iklan baris on May 7, 2009

  10. MAKASIH INFONYA,
    kita coba

    By ione on May 29, 2009

  11. Hmmm…. Man Punyaku di rubahke kok ketokmen Rumit. he he he…. Kapan ki Punyaku dirubah kayak Gtuan???

    By handoko on Jul 9, 2009

  12. @Handoko
    Emang rumit nich.. kakaka. Mau beli laptop lagi gak?? haiha

    By Lukman on Jul 9, 2009

  13. gan.. kalau pake proxy squid buat searching di google ma yahoo gak bisa tuh apanya ya??? hasil searching gak tampil..
    tp kalao pake ccproxy tulancar2 aja??
    mohon bantuannya gan..
    thanks b4…

    By nyutnyut on Jul 18, 2009

  14. @nyutnyut
    Coba cek http_access allow nya yang mana yang diperbolehkan. Cek juga cache nya apakah udah benar. semangat

    By lukman on Jul 19, 2009

  15. mas, saya pake windows, udh pasang squid.
    waktu buat swap, squid-z keluar tulisan
    C:\squid\sbin>squid -z
    FATAL: Unable to open configuration file: c:/squid/etc/squid.conf: (2) No such f
    ile or directory
    Squid Cache (Version 2.7.STABLE5): Terminated abnormally.
    CPU Usage: 0.016 seconds = 0.016 user + 0.000 sys
    Maximum Resident Size: 1572 KB
    Page faults with physical i/o: 390

    abnormal program termination

    apanya ya mas?mohon pencerahannya
    thanks

    By andi on Jul 25, 2009

  16. @ Andi. Coba dibuat dulu folder untuk cache nya? letak direkroty cache umumnya berada di c:/squid/var/
    Kalau ternyata bukan itu masalahnya cek perbaris squid.conf nya lagi. Semangat

    By lukman on Jul 27, 2009

  17. aduuuuuh suliiiit buanget ribet bukan gw malas tapi emang susah ga berhasil malah sekarang browseku tak bisa buka situs aduuuh tolongin dong buatkan setingan yg tinggal copy paste, ini spec kompiku: pake koneksi smart, DNS nawala, proxy SlipStream, windows7, firefox 3.5.1, ddr2 2gb, hdd 250gb, proc AMD, sbelumnya tanks…. smoga yg ngebalas masuk surga Amien….

    By toga80 on Aug 20, 2009

  18. great post , keep sharing!

    By berehel on Oct 19, 2009

  19. udh dicoba di IM2, Works!

    cman agak pusing ja wktu ngeditnya..wkwkwk

    By okykrismadi on Nov 17, 2009

  20. Lanjutkan boss

    By lukman on Nov 17, 2009

  21. Boss, ko” puntakku Log nya Miss semua kapan HIT nya…? kayanya ga mau nge chace gt…!

    By muchtar on Dec 11, 2009

  22. Kalo baru dijalankan emang MIS semua. Kalo sudah 1 hari up, udah sering buat download, browsing baru ada HIT nya. HIT sangat terhantung dari kecepatan Hardisk, bufer RAM. Bagusnya kalo proxy emang jalan di linux atau BSD, di windows kan cuma iseng-iseng aja bos. Explore doang

    By lukman on Dec 14, 2009

  23. Dear Mas Andi,
    Untuk Squid di Windows perhatikan alamat penyempanannya…
    Kalo di Linux direktori menggunakan sibol “/”
    Tapi kalo di Windows “\”

    Jadi tinggal di rubah aja simbol tersebut..
    Semoga Membantu

    By Jack de Ripper on Dec 15, 2009

  24. Mas Lukman, squid dah jalan. Tapi knp TCP_miss semua. padahal udah jalan 5 hari ini. dan tiap hari buat browsing/download.
    Mohon bantuannya. terima kasih

    By Adib on Dec 23, 2009

  25. berhasil mas… thx ya untuk tutsnya… ane jalankan menggunakan flexy unlimited di lappie… edit di beberapa tempat…. boleh di copas mas ? he..he..

    By farouk on Feb 18, 2010

  26. kalo ganti direktori C:/squid/sbin gimana caranya ya boss ?? apa langsung ganti proxy aja di browsernya ??

    By tazjpam on Feb 26, 2010

Post a Comment