Reputation: 7310
I'm trying to find a way to establish a TCP connection (socket) between an Android device and a server without having to setup server's router NAT.
ANDROID DEVICE -> INTERNET -> ROUTER (with fixed external ip address) -> SERVER (with fixed LAN ip address)
Something like: "connect to 200.111.222.333 (with local address 192.168.1.1) on port 5000".
Upvotes: 1
Views: 406
Reputation: 64700
You would have to use TURN or STUN or some other intermediate connectivity solution, but in general it isn't possible to declaratively specify an internal target behind a NAT device for a generic TCP connection on any platform (not just Android).
Upvotes: 2