Multiple Remotes
Configuration
proto tcp-client
# 服务器地址和端口
remote xxx xxx
remote xxx xxx
# 设置 remote 连接超时时间
connect-timeout 5
# 保持活动的配置
keepalive 10 60
参数 | 生效阶段 | 功能 | 是否重连 |
---|---|---|---|
keepalive |
已连接后 | 心跳检测、保持连接活跃,断开后自动重连 | 是 |
connect-timeout |
连接建立阶段 | 尝试连接服务器的超时 | 否(仅切换 remote) |
keepalive 10 60
- Send a heartbeat every 10s.
- No response for 60s
→-> reconnect.
Conntrack
iptables
删除规则只影响新连接,已经建立的连接依赖 conntrack
表,下面的命令可以断开原有的连接。
conntrack -D -p tcp --dport 59478