Search code examples
androidgprsijetty

Android Peer-to-Peer Connection


I need to make a peer-to-peer connection between two android phones running i-jetty web server through gprs channel.But many mobile operators block the inbound connections to the phones.Is there any way around it?


Solution

  • NAT penetration is complex enough that you really shouldn't mess with it until you're quite familiar with the internals of networking. The autonomous NAT traversal used by pwnat is pretty much the state of the art these days.

    The basic idea is to use the fact that a router might have any IP address and as far as a NAT knows, any source IP address is valid for an ICMP error message, which the NAT will forward to its client.

    Note that you can usually only get UDP through. So you'll have to implement your own byte-stream protocol.