ginuerzh
722dde5cfc
fix(handler/forward): split readTimeout from pipe idleTimeout to prevent 15s download abort
...
The readTimeout field (default 15s) was being applied via xnet.Pipe to both
directions of a bidirectional proxy connection. During asymmetric transfers
(e.g. HTTP file download), the direction reading from the tunnel sees no
data after the initial request is forwarded, causing SetReadDeadline to fire
after 15s and abort the entire transfer.
Fix: add a separate idleTimeout field (default 0=disabled) to the metadata
structs in both forward/local and forward/remote handlers, and switch
xnet.Pipe to use idleTimeout instead of readTimeout. The readTimeout field
now only applies to the initial protocol sniffing/handshake phase.
Also document readTimeout vs idleTimeout semantics across all 24 locations
in the x/ module where these timeouts appear:
- readTimeout: handshake sniffing deadline (handlers), upstream response
header timeout (http.Transport), or transport-level read deadline
- idleTimeout: idle read deadline per Pipe direction (0=disabled)
- ReadTimeout on Sniffer/SnifferBuilder: upstream response header/TLS
handshake read timeout during sniffing
2026-05-31 17:05:21 +08:00
ginuerzh
c7d16962ec
add service option for plugin
2025-08-29 23:36:31 +08:00
ginuerzh
52289bea6c
add network param for sniffing
2025-08-13 21:25:35 +08:00
ginuerzh
b597467858
add context for conn
2025-08-04 19:29:38 +08:00
ginuerzh
f71351f5ef
add interface xnet.SrcAddr/DstAddr
2025-08-03 10:15:53 +08:00
ginuerzh
208d18125c
replace xnet.Transport by xnet.Pipe
2025-07-28 20:52:15 +08:00
ginuerzh
d9a2f44a78
add src field for logger and recorder
2025-07-02 21:35:02 +08:00
ginuerzh
06d993023f
add traffic reset for stats
2024-12-24 20:11:22 +08:00
zhangchunyun
ff6807815f
consider byte order for IPv6 original dst address
2024-12-11 22:00:03 +08:00
ginuerzh
6b932e35bf
sniffing websocket frame
2024-10-19 19:36:06 +08:00
ginuerzh
a0cbee8817
use http.transport for non-connect http tunnel
2024-10-17 21:57:20 +08:00
ginuerzh
618d042001
add input/ouput fields for log
2024-10-16 22:16:34 +08:00
ginuerzh
27242d0b66
recorder: add input/output traffic stats for handler recorder object
2024-10-11 20:32:56 +08:00
ginuerzh
8f994ab632
add handle options for sniffer
2024-10-10 22:49:56 +08:00
ginuerzh
c42a44abb6
add sniffer utility
2024-10-02 22:51:23 +08:00
ginuerzh
3c8add4b82
add traffic sniffing for handler
2024-09-27 15:55:28 +08:00
ginuerzh
e22aa91571
add route for recorder
2024-09-24 20:20:15 +08:00
ginuerzh
8934cb6b1c
add tls handshake for recorder
2024-09-20 21:26:21 +08:00
ginuerzh
e37213ac01
add http body for handler recorder
2024-09-16 19:44:15 +08:00
ginuerzh
a618c5556e
fix tls host for handler recorder
2024-09-15 21:12:10 +08:00
ginuerzh
b39aa63f75
add clientIP for handler recorder object
2024-09-15 18:28:24 +08:00
ginuerzh
f681f7aa03
update handler recorder object
2024-09-15 10:51:23 +08:00
ginuerzh
69455ace9d
add handler recorder
2024-09-14 23:21:25 +08:00
ginuerzh
e7581f0a9e
add sniffing.fallback option for red handler
2024-09-04 22:44:05 +08:00
ginuerzh
c0a80400d2
add support for icmpv6
2024-07-15 20:34:59 +08:00
ginuerzh
4a4c64cc66
fix host parsing
2024-07-10 22:57:49 +08:00
ginuerzh
c1d0887a9b
add port range support for service
2024-07-08 22:38:21 +08:00
Christian Groschupp
7bf0537243
feat: add redirect darwin support
2024-04-16 20:56:21 +02:00
ginuerzh
e1ae379048
fix tls handshake sniffing
2023-12-27 19:24:31 +08:00
ginuerzh
28824885ab
add entrypoint for tunnel handler
2023-10-20 19:12:09 +08:00
ginuerzh
5dfbb59f8a
update forward handler
2023-10-16 23:16:47 +08:00
ginuerzh
836cf6eade
add network for bypass
2023-09-30 17:51:55 +08:00
ginuerzh
46db8480fa
add timeout for sniffing
2023-05-21 15:47:51 +08:00
ginuerzh
32c8188351
add plugin system
2023-04-18 20:52:56 +08:00
ginuerzh
1cb719f694
fix tcp redirect
2022-12-17 22:42:05 +08:00
ginuerzh
c1b2d3b086
add http3 reverse proxy
2022-11-12 17:14:11 +08:00
ginuerzh
1a1c038fd7
update chain route
2022-09-20 11:48:51 +08:00
ginuerzh
01d7dc77c6
update limiter
2022-09-14 20:00:35 +08:00
ginuerzh
09dbdbb03c
add backup filter
2022-09-02 11:52:44 +08:00
ginuerzh
f3f3acd4e1
more fine-grained log level
2022-08-18 11:34:57 +08:00
ginuerzh
24f90c1ce3
fix tcp redirect when sniffing tls
2022-04-12 19:29:37 +08:00
ginuerzh
1444ebc1ee
add metrics
2022-04-05 17:56:36 +08:00
ginuerzh
a3346ad246
add pkgs from core
2022-04-04 12:44:35 +08:00
ginuerzh
066e6b90e6
fix redirect with wrong target port
2022-04-01 21:41:19 +08:00
ginuerzh
37fed3f372
add tproxy
2022-03-31 11:14:44 +08:00
ginuerzh
303f46f843
fix transparent proxy
2022-03-29 23:02:32 +08:00