Use proxy only when direct connection is not possible.