要求nginx版本大于1.9,
在nginx.conf添加以下,要求和http{}同级

worker_processes  6;
events { worker_connections 1024; }

stream { upstream cakehouse { server
172.17.210.101:10001 weight=5 max_fails=2 fail_timeout=30s ; } server { listen 8888; proxy_connect_timeout 10s; proxy_timeout 5s; proxy_pass cakehouse; } }

 

前提编译时需要加载--with-stream模块

 # ./configure --with-stream

 

使用Nginx转发tcp请求--四层透明代理

 

相关文章:

  • 2022-01-27
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2022-03-04
  • 2021-08-06
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案