Despite my earlier answer, using Varnish is actually not a bad idea because there are a lot of static files within the Q2A folder that Varnish can cache, and I think it will bypass any caching for Q2A due to the headers Q2A outputs.
To solve the problem of everyone having the same IP, you can do it at the server level. This guide for nginx looks good. Change the IP to be whatever your Varnish is.
Alternatively, you can override the qa_remote_ip_address function. See docs here. It would need to be something along the lines of
function qa_remote_ip_address()
{
if ($_SERVER['REMOTE_ADDR'] === '127.0.0.1') {
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
return $_SERVER['REMOTE_ADDR'];
}
Replace '127.0.0.1' with your Varnish IP.