In the current Internet picture more than 70% of the hosts are located behind Network Address Translators (NATs). This is not a problem in the client/server paradigm. However, the Internet has evolved and nowadays the major portion of the traffic is due to peer-to-peer (p2p) applications, and in such scenario, two hosts behind NATs (NATed hosts) cannot establish direct communications. The easiest way to solve this problem is by using a third entity, called Relay, that forwards the traffic between the NATed hosts. Although many efforts have been devoted to avoid the use of Relays, they are still needed in many situations. Hence, the selection of a suitable Relay becomes critical to many p2p applications. In this paper we propose the Gradual Proximity Algorithm (GPA): a simple algorithm that guarantees the selection of the topologically closest Relay. We present a measurement-based analysis showing that the GPA minimizes both the delay of the relayed communication and the transit traffi...