
 |
|
 |
 |
|
| 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | |
|
|
|
|
 |
 |
|
|
squid delay pool ลองสรุปดู
โจทย์
ต้องการ delay pools เวปพวก file sharing เช่น mediafire, rapid, 4shared
คำตอบ...
สร้าง pattern format มาก่อนเลย
acl compress urlpath_regex -i .3gp .7z .ra[mrw] .zip # สร้าง pattern ชื่อ compress โดยมีนามสกุลที่สนใจคือ *.3gp, *.7z *.ram *.rar *.raw *.zip
ประกาศใช้งานบีบบบบ ตาม pattern ที่เรากำหนด
delay_pools 1 #<< มี delay pools อันเดียวนะ... เติม s ทำไมเนอะ delay_class 1 3 #<< pool 1 เป็น class 3 delay_parameters 1 2000000(2Mbps)/2000000(2M) -1/-1 120000(120k)/8000000(8M) delay_access 1 allow compress delay_access 1 deny all
# class 3 Everything is limited by a single aggregate # bucket as well as a "network" bucket chosen # from bits 17 through 24 of the IP address and # a "individual" bucket chosen from bits 17 through # 32 of the IP address.
โดยในตัวอย่างจะมี #Example: # delay_pools 4 # 4 delay pools # delay_class 1 2 # pool 1 is a class 2 pool # delay_class 2 3 # pool 2 is a class 3 pool # delay_class 3 4 # pool 3 is a class 4 pool # delay_class 4 5 # pool 4 is a class 5 pool
และคำอธิบาย class จะมีดังนี้
# The delay pool classes are: # # class 1 Everything is limited by a single aggregate # bucket. # # class 2 Everything is limited by a single aggregate # bucket as well as an "individual" bucket chosen # from bits 25 through 32 of the IP address. # # class 3 Everything is limited by a single aggregate # bucket as well as a "network" bucket chosen # from bits 17 through 24 of the IP address and # a "individual" bucket chosen from bits 17 through # 32 of the IP address. # # class 4 Everything in a class 3 delay pool, with an # additional limit on a per user basis. This # only takes effect if the username is established # in advance - by forcing authentication in your # http_access rules. # # class 5 Requests are grouped according their tag # (see external_acl's tag= reply). # # NOTE: If an IP address is a.b.c.d # -> bits 25 through 32 are "d" # -> bits 17 through 24 are "c" # -> bits 17 through 32 are "c * 256 + d"
 
Create Date : 11 พฤศจิกายน 2554 |
Last Update : 5 มีนาคม 2555 0:03:21 น. |
|
0 comments
|
Counter : 970 Pageviews. |
|
 |
|
|
| |
|
dokawa |
 |
|
 |
|