We want to have requests to the Squid cache checked against an external MySQL database of valid IP addresses. If the IP address is present the request should be passed through, otherwise blocked. This can be cached for up to 12 hours at a time.
We envision this being a custom redirector for Squid, which connects to SQL and checks the IPs passed from Squid. It should function as other redirectors would: returning the same URL if the IP is present (so the user can continue to browse) or returning an alternate customizable "block url" for non-present IP addresses. Due to the amount of requests for a single page caching is a requirement.
Ideally I would like the proxy username that squid places in its logfiles to be populated with the username held against that IP address in the mySQL record.