Add more tcp keep alive options

Also update default TCP keep-alive initial period from 10 minutes to 5 minutes.
This commit is contained in:
世界
2026-01-17 05:47:04 +08:00
parent e92938364d
commit cd56eaaba2
9 changed files with 164 additions and 24 deletions
+1
View File
@@ -65,6 +65,7 @@ type ListenOptions struct {
RoutingMark FwMark `json:"routing_mark,omitempty"`
ReuseAddr bool `json:"reuse_addr,omitempty"`
NetNs string `json:"netns,omitempty"`
DisableTCPKeepAlive bool `json:"disable_tcp_keep_alive,omitempty"`
TCPKeepAlive badoption.Duration `json:"tcp_keep_alive,omitempty"`
TCPKeepAliveInterval badoption.Duration `json:"tcp_keep_alive_interval,omitempty"`
TCPFastOpen bool `json:"tcp_fast_open,omitempty"`