Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试找到一种方法来在 Android 设备和服务器之间建立 TCP 连接(套接字),而无需设置服务器的路由器 NAT。
ANDROID DEVICE -> INTERNET -> ROUTER(具有固定的外部 ip 地址)-> SERVER(具有固定的 LAN ip 地址)
类似于:“在端口 5000 上连接到 200.111.222.333(本地地址为 192.168.1.1) ”。
您必须使用 TURN 或 STUN 或其他一些中间连接解决方案,但通常不可能在 NAT 设备后面为任何平台(不仅仅是 Android)上的通用 TCP 连接声明性地指定内部目标。