[英]TPROXY - Get the accurate destination/remote IP address
Using the latest TPROXY with the Linux Kernel, how would I get the IP address of the remote/destination machine? 在Linux内核上使用最新的TPROXY,我如何获得远程/目标计算机的IP地址? I am assuming that the local/source endpoint is returned from
accept()
. 我假设本地/源端点是从
accept()
返回的。
The original (before rerouting) remote destination will be in getsockname()
. 原始(重新路由之前)的远程目标将位于
getsockname()
。 accept()
will return the local (local enough BUT NOT an interface on the computer) source address. accept()
将返回本地(本地足够,但不是计算机上的接口)源地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.