-1

I have a squid 2.7 proxy and i'm letting some friends use it for fun in school etc. However since i got a bandwidth limit on my vps that is hosting the proxy I need somehow to throttle the amount of bandwidth. Currently all my friends authenticate using basic access authentication protocol (I think it's called you just enter username and password in a popup box). So do you think it's possible somehow? I'm using webmin to administrate my server.

Thanks in advance!

(Changed the question a little)

Eric
  • 31
  • 2
  • 5
  • 2
    We really can't condone assisting with projects like this, since it's bypassing the work and security of another system/network administrator. Also, this site is designed for professionals in the field. – Hyppy Jul 17 '12 at 14:28
  • Ok, forget that I said anything about bypassing security, they just want to go on facebook and play games on recess but if they go over the amount of bandwidth I have to pay A LOT of extra money so I'm just wondering if there's a quick way of doing this. Thanks! – Eric Jul 17 '12 at 14:33
  • Ask the question about rate-limiting, but reword your question. Perhaps you're providing low-bandwidth proxy services for those under oppressive 3rd world government regimes, or maybe we don't even need to hear why. – Jeff Ferland Jul 17 '12 at 14:43
  • Reword the question, but also consider implementing a billing system, and get a paypal for business account, then charge your friends^H^H^HCustomers and then use that money to offset the hosting costs / make a profit! – Tom O'Connor Jul 17 '12 at 15:50

1 Answers1

2

Ignoring the reason why you want to do it:

You can use DelayPools to limit the BW. This is more along the lines of limiting speed, as opposed to limiting the the amount of data transferred.

http://wiki.squid-cache.org/Features/DelayPools

For more information, but if you only want to limit certain users I think something along these lines would work:

acl friends proxy_auth user1 user2 user2
delay_pools 1
delay_class 1 1 
# 256 Kbit/s fill rate, 1024 Kbit/s reserve
delay_parameters 1 32000/128000
delay_access 1 allow friends  
delay_access 1 deny all

You will need to tweak the settings to figure out the optimal amount of BW to give them though.

Doon
  • 1,441
  • 9
  • 9