Patent ID: 8874785

Claim:
A method for establishing a peer-to-peer communication session between first and second endpoints, the method comprising: determining, by a first endpoint, that a first message protocol is not available for use in sending a first message to the second endpoint, wherein the determining identifies that none of a private interface, a public interface, and a relay interface of the first endpoint are available in response to not receiving a response to the first message sent using the first message protocol via the private interface, the public interface, and the relay interface, wherein the private interface corresponds to a local address assigned to the first endpoint by a network address translation (NAT) device in a local network, the public interface corresponds to a public address of the NAT device that represents the first endpoint in networks outside of the local network, and the relay interface corresponds to a reflector located outside of the local network, and wherein the determining identifies that the NAT device blocks all messages transmitted using the first message protocol; in response to the determining, sending, by the first endpoint, a request for a first connection with a tunneling server, wherein the first connection uses a second message protocol allowed by the NAT device and provides a first tunnel between the first endpoint and the tunneling server; sending, by the first endpoint, a request to the tunneling server via the first tunnel, provided by the first connection, for at least first and second shadow ports on the tunneling server; receiving, by the first endpoint, a shadow Internet Protocol (IP) address and the first and second shadow ports from the tunneling server via the first tunnel; and sending, by the first endpoint via the public interface, the first message to the second endpoint via the shadow IP address and the first and second shadow ports of the first tunnel.