设备使用1883端口通过nginx 的TCP/UDP 代理转发到后台服务器,
后台服务器查看设备的socket的ip 是代理服务器的ip,而不是设备的实际IP,
怎么实现透明代理,让nginx 代理把设备的实际ip连接后台服务器呢?
备注:
设备连接时拿不到自己的ip,所以不要往这点去想
是TCP/UDP代理,不是http
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
Nginx Stream Module
The ngx_stream_core_module module is available since version 1.9.0. This module is not built by default, it should be enabled with the --with-stream configuration parameter.
这个模块不在默认构建之前,安装nginx时需要增加
--with-stream
配置。示例程序