[英]Read TCP-Destination via Socket
I'm programming an Android application. 我正在编写一个Android应用程序。 I forward a port to my app and listen on it with a socket.
我将端口转发到我的应用程序,并使用套接字进行监听。 I'm receiving data but only the data on the layers OVER the TCP-layer.
我正在接收数据,但仅接收TCP层上各层的数据。 That would not be a problem, but now I need the original destination-IP but it should be in the TCP-Layer.
那不是问题,但是现在我需要原始的目标IP,但它应该在TCP层中。 So do you know, is there an easy way to get this IP?
那么您知道吗,有没有一种简单的方法来获取此IP? Or is there an easy way to set up a socket to get more layers than only that ones over TCP?
还是有一种简单的方法来设置套接字以获取比仅基于TCP的层更多的层?
如果要在NAT设备上转发TCP端口,则要查找的信息在NAT版本的目标位置不可用,因为目标地址需要在IP标头中重写为专用地址才能正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.