Xray-core/transport/internet
yuhan6665 340234166b
Add TCPKeepAliveIdle in Sockopt option (#1166)
* Add TCP keep alive idle setting

* Add TCP keep alive idle setting: auto generated

* Add TCP keep alive support in Linux

* Add TCP keep alive support in MacOS, FreeBSD

* Add TCP keep alive support in Windows

* fix bug introduced in adding tcp keep alive adjustment

* embed macOS const to avoid platform inconsistency

* embed macOS const to avoid platform inconsistency(again)

* add TCP Keep Alive support in config

* use sys/unix instead of syscall

Suggestion from:
https://github.com/v2fly/v2ray-core/pull/1395#issuecomment-974761647

* use sys/unix instead of syscall

Suggestion from:
https://github.com/v2fly/v2ray-core/pull/1395#issuecomment-974761647

* Separate TcpKeepAliveIdle and TcpKeepAliveInterval check logic

* Disable tcp keepAlive when TcpKeepAliveIdle < 0 and  TcpKeepAliveInterval <= 0

Co-authored-by: xqzr <34030394+xqzr@users.noreply.github.com>

Co-authored-by: ValdikSS <iam@valdikss.org.ru>
Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
Co-authored-by: xqzr <34030394+xqzr@users.noreply.github.com>
2022-07-31 09:55:40 -04:00
..
domainsocket Reformat code 2022-05-18 15:29:01 +08:00
grpc Reformat code 2022-05-18 15:29:01 +08:00
headers Reformat code 2022-05-18 15:29:01 +08:00
http Reformat code 2022-05-18 15:29:01 +08:00
kcp Reformat code 2022-05-18 15:29:01 +08:00
quic Fix new Quic lib: KeepAlivePeriod (#1139) 2022-07-10 21:38:39 -04:00
stat Fix: CounterConnection with ReadV/WriteV (#720) 2021-09-20 20:11:21 +08:00
tagged Fix some tests and format code (#830) 2021-12-14 19:28:47 -05:00
tcp Reformat code 2022-05-18 15:29:01 +08:00
tls Reformat code 2022-05-18 15:29:01 +08:00
udp Remove useless error log 2022-06-01 11:11:53 +08:00
websocket Reformat code 2022-05-18 15:29:01 +08:00
xtls Reformat code 2022-05-18 15:29:01 +08:00
config.go v1.1.0 2020-12-04 09:36:16 +08:00
config.pb.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
config.proto Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
dialer.go Fix some tests and format code (#830) 2021-12-14 19:28:47 -05:00
dialer_test.go Reformat code 2022-05-18 15:29:01 +08:00
errors.generated.go v1.1.0 2020-12-04 09:36:16 +08:00
filelocker.go v1.0.0 2020-11-25 19:01:53 +08:00
filelocker_other.go Style: format code 2021-09-20 21:00:55 +08:00
filelocker_windows.go v1.0.0 2020-11-25 19:01:53 +08:00
header.go v1.1.0 2020-12-04 09:36:16 +08:00
header_test.go v1.1.0 2020-12-04 09:36:16 +08:00
internet.go v1.1.0 2020-12-04 09:36:16 +08:00
memory_settings.go v1.0.0 2020-11-25 19:01:53 +08:00
sockopt.go Fix: TFO AsIs bug (#452) 2021-03-30 16:42:02 +00:00
sockopt_darwin.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
sockopt_freebsd.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
sockopt_linux.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
sockopt_linux_test.go v1.1.0 2020-12-04 09:36:16 +08:00
sockopt_other.go Style: format code 2021-09-20 21:00:55 +08:00
sockopt_test.go Reformat code 2022-05-18 15:29:01 +08:00
sockopt_windows.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
system_dialer.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
system_listener.go Add TCPKeepAliveIdle in Sockopt option (#1166) 2022-07-31 09:55:40 -04:00
system_listener_test.go v1.1.0 2020-12-04 09:36:16 +08:00
tcp_hub.go Fix some tests and format code (#830) 2021-12-14 19:28:47 -05:00