I don't think that this will help you to prevent DDoS attacks.
Most of them are from normal home PCs that do not pass through any proxy servers.
There is a way of course, for example you may build up a list with proxy servers and script who checks and compare the visitors IP with the proxy IP, if match => ban
I believe that the load caused by this will not be low, and the loading speed (of the sites) will be slow.
Another solution would be to install some kind of proxy detector,which will ban every visitor behind a proxy, but if the customer passes through a CGI proxy, I don`t think that this will help.