From LedHed's Wiki
Jump to: navigation, search
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
This feature allows you to cap download speeds based upon different criteria, for example on URL or Mime Type.<br>
 
This feature allows you to cap download speeds based upon different criteria, for example on URL or Mime Type.<br>
 
To utilize this feature you must edit the file /var/smoothwall/proxy/acl<br>
 
To utilize this feature you must edit the file /var/smoothwall/proxy/acl<br>
'''(Do not edit squid.conf directly because Smoothwall rebuilds it everytime squid is restarted!)'''
+
'''(Do not edit squid.conf directly because Smoothwall rebuilds it everytime squid is restarted!)'''<br>
 
The Advanced Proxy mod for Smoothwall has a primitive WebUI for employing delay pools.
 
The Advanced Proxy mod for Smoothwall has a primitive WebUI for employing delay pools.
  
Line 42: Line 42:
  
  
== Example Delay_Pool ==
+
== Example Delay Pool ==
 
  # Number of Delay Pools
 
  # Number of Delay Pools
 
  delay_pools 1
 
  delay_pools 1
 
   
 
   
  #First delay class (1) of second type (3).
+
  #First delay class (1) of type (3)
 
  delay_class 1 3
 
  delay_class 1 3
 
   
 
   
  # Speed Control (Pool#,Network,Individual) Rate/Bucket Size
+
  # Speed Control
  # 384Kbit or 48KByte / 768Kbit or 96KByte
+
# Class 1
 +
# Network limit -1/-1 (Unlimited)
 +
  # Individual limit 48000Kbps / 96000Kbps  (Rate / Bucket Size)
 
  delay_parameters 1 -1/-1 48000/96000
 
  delay_parameters 1 -1/-1 48000/96000
 
   
 
   
Line 61: Line 63:
  
  
 +
== References ==
 +
*[http://www.visolve.com/squid/squid24s1/delaypool.php Delay Pools] - Squid Proxy Server Delay Pool Parameters
 +
*[http://www.visolve.com/squid/squid24s1/access_controls.php Access Control Lists] - Squid Proxy Server Access Controls
 +
*[http://www.faqs.org/docs/Linux-HOWTO/Bandwidth-Limiting-HOWTO.html#AEN78 Delay Pool HowTo] Some good Delay Pool Examples here
 +
*[http://www.advproxy.net/ Advanced Proxy add-on] - Advanced Proxy Mod for Smoothwall 2.0 and 3.0
  
[[Category:Smoothwall]]
+
 
 +
[[Category:Smoothwall]][[Category:Squid]]

Latest revision as of 18:44, 21 October 2011

Smoothwall Express (Ver. 2 & 3) support squids download throttling AKA delay_pools.
This feature allows you to cap download speeds based upon different criteria, for example on URL or Mime Type.
To utilize this feature you must edit the file /var/smoothwall/proxy/acl
(Do not edit squid.conf directly because Smoothwall rebuilds it everytime squid is restarted!)
The Advanced Proxy mod for Smoothwall has a primitive WebUI for employing delay pools.


ACLs

ACLs or Access Control Lists can be thought of categories or groups. These groups are then used to match against access rules.
Group A = Access
Group B = Deny
You can also invert the groups with a "!"
Group !A = Deny (Groups other than A Deny)

There are many types of ACLs such as Source IP, Destination IP, Port, Protocol, Time, and URL just to name a few.

NOTE: ACLs have many options and many uses which are far beyond the scope of this article. For more info on ACLs see the ACL link in the References section.


ACL Example

# LunchTime ACL
acl lunchtime time 11:30-1:30

# Video Files ACL
acl video req_mime_type -i .avi .mpeg .mpe .mpg .qt .ram .rm .mov .fla .swf

# Audio Files ACL
acl audio req_mime_type -i .mp3 .wav .ogg .wma

# Youtube ACL
acl youtube url_regex -i www.youtube.com


Delay Pools

Delay Pools create buckets much like a HTB Quality of Service. This bucket is filled and then refilled at a given interval.
Think of it as a glass of beer and when ever the glass is half empty a bartender tops it off, but he pours slowly.
Initially the beer is filled up quickly, but after the beer is half gone the flow of beer is controlled.


Example Delay Pool

# Number of Delay Pools
delay_pools 1

#First delay class (1) of type (3)
delay_class 1 3

# Speed Control
# Class 1
# Network limit -1/-1 (Unlimited)
# Individual limit 48000Kbps / 96000Kbps  (Rate / Bucket Size)
delay_parameters 1 -1/-1 48000/96000

# Apply throttling
delay_access 1 lunchtime deny    # Deny Throttling at lunch time
delay_access 1 !lunchtime allow  # Allow Throttling any time other than lunch time
delay_access 1 allow youtube     # Allow Throttling to www.youtube.com
delay_access 1 allow video       # Allow Throttling of video files
delay_access 1 allow audio       # Allow Throttling of audio files


References