### การแก้ไข Config ให้เล่น irc.webmaster.com ไม่โดนแบนเวลาเปิด squid ###
### ตำแหน่งไฟล์ที่แก้ไข c:\squid\etc\squid.conf ###
### เป็นการกำหนดไอพีในการเข้าใช้ proxy ว่าจะอนุญาติให้ไอพีใดเข้าใช้บ้าง ###
### มีการทำ 2 วิธี แต่บอกวิธีที่ง่ายที่สุดแล้วกันครับ เพราะที่ร้านใช้ linux เป็น Server###
### ลง Squid 2.5 เลยนำ config บางตัวดีๆๆ มาบอก เป็นทิปความรู้กัน เข้าเนื้อหา config###
### แล้วกันก็ง่ายๆๆ ครับเพิ่มมาอีก 2 บรรทัด เท่านั้นเอง ตามตัวหนังสือสีแดงนะครับที่เพิ่มมา###
icp_port 3130
http_port 8080
#cache_peer proxy.anet.net.th parent 8080 3130 no-query
#cache_peer proxy.asiaaccess.net.th parent 8080 3130 no-query
#cache_peer proxy.asianet.co.th parent 8080 3130 no-query
#cache_peer proxy.cscoms.com parent 8080 3130 no-query
#cache_peer proxy.cwn.net.th parent 8080 3130 no-query
#cache_peer proxy.linethai.co.th parent 8080 3130 no-query
#cache_peer netproxy1.inet.co.th parent 8080 3130 no-query
#cache_peer proxy.idn.co.th parent 8080 3130 no-query
#cache_peer proxy.infonews.co.th parent 8080 3130 no-query
#cache_peer proxy.ji-net.com parent 8080 3130 no-query
#cache_peer proxy.ksc.net.th parent 8080 3130 no-query
#cache_peer proxy.loxinfo.co.th parent 8080 3130 no-query
#cache_peer proxy.roynet.co.th parent 8080 3130 no-query
#cache_peer proxy.samart.co.th parent 8080 3130 no-query
#cache_peer proxy.sgn.net.th parent 8080 3130 no-query
#cache_peer proxy.siamit.co.th parent 8080 3130 no-query
#cache_peer 203.113.0.31 parent 8080 3130 no-query
#cache_peer proxy.wnet.net.th parent 8080 3130 no-query
#cache_peer proxy.sga.net.th parent 8080 3130 no-query
#cache_peer proxy.ksc.co.th sibling 8080 3130 no-query
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
##### หากต้องการใช้ Cache Peer กรุณาเอาเครื่องหมาย # หน้าบรรทัด never_direct allow all ออกด้วยครับ
#never_direct allow all
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#ssl_unclean_shutdown off
pid_filename /squid/squid.pid
cache_access_log /squid/var/logs/access.log
cache_log /squid/var/logs/cache.log
cache_store_log /squid/var/logs/store.log
emulate_httpd_log off
log_mime_hdrs off
forwarded_for on
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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
### บรรทัดนี้เป็นการกำหนด www อนุญาตให้ไอพี 192.168.0.1 ถึง 192.168.0.250 สามารถใช้งานได้ หมายถึงใช้ได้เฉพาะวงเลนในร้านเท่านั้น หรือถ้าใช้อยู่กับบ้านก็ใช้ acl www src 127.0.0.1/255.255.255.255 อันนี้เลย แต่บรรทัดข้างล่างนี้แนะนำในการแชร์กันหลายเครื่องครับเหมาะกับร้าน อินเตอร์ค่าแฟ่###
acl www src 192.168.0.1-192.168.0.250/255.255.255.255http_access allow localhost
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow all
http_reply_access allow all
icp_access allow all
### บรรทัดข้างล่างนี้เป็นการกำหนด www ที่ประกาศครั้งแรกให้ทำงาน###
http_access allow wwwmaximum_object_size 2048 KB
minimum_object_size 128 KB
#หากต้องการ Block ไม่ให้ Download ก็เอา เครื่องหมาย # ออกตามด้านล่างนี้นะครับ
#acl denymp3 urlpath_regex -i \.mp3$ #ห้ามดาวน์โหลดเพลง
#acl denyexe urlpath_regex -i \.exe$ #ห้ามดาวน์โหลดไฟล์นามสกุล exe
#acl denyzip urlpath_regex -i \.zip$ #ห้ามดาวน์โหลด zip
#acl denyrar urlpath_regex -i \.rar$ #ห้ามดาวน์โหลด rar
#acl denyrom urlpath_regex -i \.rom$ #ห้ามดาวน์โหลด rom
#acl denyram urlpath_regex -i \.ram$ #ห้ามดาวน์โหลด ram
#http_access deny denymp3
#http_access deny denyexe
#http_access deny denyzip
#http_access deny denyrar
#http_access deny denyrom
#http_access deny denyram
cache_mem 128 MB
cache_dir ufs c:/squid/cache1 256 16 256
#cache_dir ufs c:/squid/cache2 256 16 256
cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF
maximum_object_size_in_memory 128 KB
cache_swap_low 30
cache_swap_high 50
#cache_dns_program c:/squid/dnsserver.dll
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
coredump_dir c:/squid/var/cache
visible_hostname proxyserver_by_siamcafe.net
cache_mgr
[email protected]cache_effective_user nobody
cache_effective_group nogroup
### สุดท้ายคงเข้าใจนะครับ ถ้าไม่เข้าใจเมลล์มาถามได้
[email protected] ###