There are several alternative ways to implement a traffic quota system.
I do think all involve at least some script/software development. It is far out of scope to help you with that here. However we can point you in the general direction.
In the general term, that involves accounting somehow the traffic used, and after x traffic, either modifying squid configuration on the fly or applying firewall rules in the source IPs of the customers. However, be aware that blocking than may create problems at the applicational level at least if you block them completely.
There are several ways of doing that accounting.
On the linux side, you can do it either:
parse squid logs for the traffic used per user;
create firewall rules on the ports the client arrive, and accounting for the traffic used (probably easier). see Traffic stats per network port . Just be aware that a server reboot resets the iptable stats, so it would be wiser to save them to an SQL database. (on a controlled reboot maybe iptables saves the traffic stats, however you can have a crash or power failure).
On the infra-structure side, you can also capture netflows on a router they go through if your equipment support it. There are open source solutions to use netflows, but then again it involves some script/software development. The solution will be more professional, but also more difficult to implement.
Again on the infra-structure side, one of the other ways to do it, is to capture SNMP data traffic from a switch port on your side where they go through.
Needless to say, that if you were doing it with netflows or SNMP, in a remote future, if using only networks, and not users as a source of traffic, you could probably do without the proxy, and just blocking the switch ports when the monthly quota is used up.
Disclaimer:
- I used to run an ISP in Mozambique;
- I used netflow data from my border routers that connected to the Internet;
- when the customer exceed their monthly quota, their modem was blocked by my provisioning software;
- nowadays I work somewhere else, still using netflows+Linux.
Some clues about neflows: How to gather full network usage statistics on a freebsd router?