Traffic management doesn't work for throttling…

  • Hi all!
    My Proxy works well except throttling feature.
    Here is my squid.conf configuration.

    http_port transparent
    icp_port 0

    pid_filename /var/run/
    cache_effective_user proxy
    cache_effective_group proxy
    error_directory /usr/local/etc/squid/errors/Turkish
    icon_directory /usr/local/etc/squid/icons
    visible_hostname localhost
    access_log /dev/null
    cache_log /var/squid/log/cache.log
    cache_store_log none
    logfile_rotate 20
    shutdown_lifetime 3 seconds
    httpd_suppress_version_string on
    uri_whitespace strip

    cache_dir aufs /var/squid/cache 100 16 256
    cache_mem 8 MB
    maximum_object_size 10 KB
    minimum_object_size 0 KB
    cache_replacement_policy heap LFUDA
    memory_replacement_policy heap GDSF
    offline_mode off

    No redirector configured

    Setup some default acls

    acl all src
    acl localhost src
    acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901  3128 1025-65535
    acl sslports port 443 563
    acl manager proto cache_object
    acl purge method PURGE
    acl connect method CONNECT
    acl dynamic urlpath_regex cgi-bin ?
    acl blacklist dstdom_regex -i "/var/squid/acl/blacklist.acl"
    cache deny dynamic
    http_access allow manager localhost

    http_access deny manager
    http_access allow purge localhost
    http_access deny purge
    http_access deny !safeports
    http_access deny CONNECT !sslports

    Always allow localhost connections

    http_access allow localhost

    quick_abort_min 0 KB
    quick_abort_max 0 KB
    request_body_max_size 0 KB
    reply_body_max_size 0 allow all
    delay_pools 1
    delay_class 1 2
    delay_parameters 1 -1/-1 -1/-1
    delay_initial_bucket_level 100

    Throttle extensions matched in the url

    acl throttle_exts urlpath_regex -i "/var/squid/acl/throttle_exts.acl"
    delay_access 1 allow throttle_exts
    delay_access 1 deny all

    Block access to blacklist domains

    http_access deny blacklist

    Default block all to be sure

    http_access deny all

    Any ideas?


  • Try the Traffic shaper->limiter it might be better than squid for that.
    If i understand it correctly you are just sharing the bandwidth equally between hosts
    Just create a limiter and after that create a child of that with mask src address and use it in In/Out part of the rules as the IN that would do the same for incoming traffic.
    For outgoing create the another limiter with another child and use it as the OUT.

  • All i want is blocking file extensions such as exe,rar etc… It doesnt worked with my configuration. Do you think something wrong in my config?

  • You are trying to deny them and a pool as delay 1 -1/-1 …... means no throtling at all, but i might be wrong.
    A http deny throttle_ext would deny them all, iirc.

  • Ok. It works if i edit it manually! Could you please explain meaning of delay and pool?
    It is the confıguration done using webgui. Is there anything wrong with webgui?Is this a bug? Do i have to edit squid.conf manually?

  • Any idea?

Log in to reply