Sometimes proxies will be configured to pass certain variables in http headers that give them away as being proxies. I know http_x_forwarded_for and http_proxy_connection can do this. I think that this is what samair does to check proxies.
There are lots of other ways to break a proxy as well, like cookies, javascript and flash.