Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

closed as off topic by Hyppy, Ladadadada, Jeff Ferland, Dan, Tom O'Connor Jul 17 '12 at 15:49

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

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 Answer 1

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.

share|improve this answer
    
I don't want to limit the speed just the BW, any idea? –  Eric Jul 17 '12 at 16:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.