首页
下载
文档
社区
视频
捐赠
源代码
赞助商
AOT 编译器
AI 助理
商业产品
PHP AOT 原生编译器
Swoole-Compiler 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
nginx转发tcp请求
各位大佬,tcp转发swoole 的 tcp 客户端来的数据怎么操作,按网上的教程一直不行。 tcp服务端一直收不到。 events { use epoll; worker_connections 1024; } stream { log_format proxy '$remote_addr [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$session_time "$upstream_addr" ' '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"'; access_log /var/log/nginx/access_tcp.log proxy ; open_log_file_cache off; upstream backend { hash $remote_addr consistent; server 0.0.0.0:1235 weight=5; } server { listen 12345; proxy_connect_timeout 1s; proxy_timeout 3s; proxy_pass backend; tcp_nodelay on; } } 上面是nginx的配置,看遍全网都是这么配置的,但tcp客户端发消息,经过nginx,tcp服务端收不到啊
发布于6年前 · 3 次浏览 · 来自
提问
C
Caption
各位大佬,tcp转发swoole 的 tcp 客户端来的数据怎么操作,按网上的教程一直不行。 tcp服务端一直收不到。 events { use epoll; worker_connections 1024; } stream { log_format proxy '$remote_addr [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$session_time "$upstream_addr" ' '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"'; access_log /var/log/nginx/access_tcp.log proxy ; open_log_file_cache off; upstream backend { hash $remote_addr consistent; server 0.0.0.0:1235 weight=5; } server { listen 12345; proxy_connect_timeout 1s; proxy_timeout 3s; proxy_pass backend; tcp_nodelay on; } } 上面是nginx的配置,看遍全网都是这么配置的,但tcp客户端发消息,经过nginx,tcp服务端收不到啊
赞
0
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
登录
后参与评论
评论
2020-07-18
R
Ray
看最后:https://vsdevelop.com/archives/62
赞
0
回复