【已解决】TcpConnection getRemoteIp()为什么获取的是内网ip地址?

小W

bug描述

在onConnect()中通过$connection->getRemoteIp()获取到的是客户端的内网ip

程序代码或配置

服务器

$task = new Worker('text://0.0.0.0:8123');

客户端

 $client = stream_socket_client("tcp://服务端外网ip:8123",$errno,$errmsg)

期待的结果及实际结果

如何获取客户端的真实外网ip

系统环境及workerman/webman等具体版本

workerman v4.1.4

505 0 0
0个回答

年代过于久远,无法发表回答
🔝