Proxy detection improvment, still blocked on output buffering