haproxy tcp 反向代理

配置如下:

global
   log 127.0.0.1 local3 warning
   nbproc  1
   maxconn 65535
   daemon
defaults
   log global
   option dontlognull
   timeout connect 5000
   timeout client 50000
   timeout server 50000
listen test
   mode tcp #tcp模式
   bind *:1573 #本机绑定的端口
   #balance roundrobin
   timeout server 15s
   timeout connect 15s
   server game 1.1.1.1:1573 check  #代理指向的ip和端口

haproxy -f haproxy.cfg -c   //检查语法

haproxy -f haproxy.cfg //启动

猜你喜欢

转载自www.cnblogs.com/micenote/p/9025986.html
今日推荐