Add timeout handling to proxy.