ginuerzh
ef58909fb7
fix(dialer): correct inverted setMark on FreeBSD/OpenBSD
...
Fix setMark early-return conditions that were inverted relative to
Linux: on FreeBSD (SO_USER_COOKIE) and OpenBSD (SO_RTABLE), a
non-zero mark was short-circuited instead of applied, disabling
socket marking entirely.
Also fix GetClientIP to trim leading whitespace from X-Forwarded-For
entries (per RFC 7239), and fix Body.Read to subtract len(b) instead
of n from recordSize when a single read exceeds the remaining quota.
Add unit tests for internal/net/ (addr, dialer, http, ip, net, pipe,
transport, resolve, proxyproto, udp).
2026-05-21 20:58:48 +08:00
ginuerzh
d189dc7967
fix(pipe): prevent error swallowing and goroutine leak in Pipe/Transport
...
Pipe: remove context.WithCancel that caused premature ctx.Done()
before the second pipeHalf could return its error. Replace with a
completed counter that drains both errors even on cancellation.
Transport: increase error channel buffer from 1 to 2 to prevent
goroutine leak when both CopyBuffer goroutines complete.
2026-05-21 10:28:55 +08:00
misakydrip
6c32dda058
fix a udp bug
...
fix udp bug error: use of closed network connection
2026-04-21 21:07:00 +08:00
21paradox
180145189f
add SetReadDeadline in Pipe, to prevent memory not auto release in mws/mtcp
2026-04-21 20:02:32 +08:00
ginuerzh
c7d16962ec
add service option for plugin
2025-08-29 23:36:31 +08:00
ginuerzh
fd9dc6408a
fix ws listener
2025-08-05 00:13:48 +08:00
ginuerzh
b597467858
add context for conn
2025-08-04 19:29:38 +08:00
ginuerzh
ad5cf6fd61
add proxyProtocol support for dialer
2025-08-03 15:36:29 +08:00
ginuerzh
f71351f5ef
add interface xnet.SrcAddr/DstAddr
2025-08-03 10:15:53 +08:00
ginuerzh
db21de831a
fix xnet.Pipe
2025-08-01 23:00:50 +08:00
ginuerzh
a5309eee97
add buffer size option for udp connection
2025-07-30 21:40:53 +08:00
ginuerzh
87e454a6f1
tungo: additional metadata options
2025-07-30 10:07:18 +08:00
ginuerzh
208d18125c
replace xnet.Transport by xnet.Pipe
2025-07-28 20:52:15 +08:00
ginuerzh
35a049fb03
rename vtun to tungo
2025-07-26 16:17:04 +08:00
ginuerzh
e0915affda
use fixed buffer size
2025-02-18 17:38:27 +08:00
ginuerzh
355c72477a
add router handler & connector
2025-02-07 15:44:31 +08:00
ginuerzh
a5d4774682
add ip range matcher for bypass
2024-12-23 21:06:55 +08:00
ginuerzh
24547b4332
add ClientAddr for websocket conn
2024-10-16 20:46:45 +08:00
ginuerzh
c42a44abb6
add sniffer utility
2024-10-02 22:51:23 +08:00
ginuerzh
e37213ac01
add http body for handler recorder
2024-09-16 19:44:15 +08:00
ginuerzh
b39aa63f75
add clientIP for handler recorder object
2024-09-15 18:28:24 +08:00
ginuerzh
69455ace9d
add handler recorder
2024-09-14 23:21:25 +08:00
ginuerzh
22e522e933
fix udp connection timeout
2024-08-06 18:33:29 +08:00
ginuerzh
12ef82e41f
fix ssu handler port exhaustion
2024-07-31 20:55:24 +08:00
ginuerzh
c1d0887a9b
add port range support for service
2024-07-08 22:38:21 +08:00
ginuerzh
949c98adc0
netns: add support for specifying network namespace by path
2024-07-08 10:59:03 +08:00
ginuerzh
f9bfca76ed
fix netns for socks5 and relay handler
2024-06-24 21:18:04 +08:00
ginuerzh
a465210bd6
fix forwarding node address parsing
2023-11-16 20:38:16 +08:00
ginuerzh
d7b7ac6357
add range port support for forwarder node
2023-11-14 19:41:57 +08:00
ginuerzh
cc4310106b
fix race condition
2023-10-19 23:47:47 +08:00
ginuerzh
836cf6eade
add network for bypass
2023-09-30 17:51:55 +08:00
ginuerzh
30c705ffe5
increase transport buffer size
2023-05-01 14:05:18 +08:00
ginuerzh
32c8188351
add plugin system
2023-04-18 20:52:56 +08:00
ginuerzh
416405b1f0
add UDP support for reverse proxy tunnel
2023-02-02 19:18:10 +08:00
ginuerzh
43036f8e64
fix http traffic forwarding
2023-01-29 23:32:13 +08:00
ginuerzh
efd8838c18
added proxy protocol
2022-09-08 21:31:11 +08:00
ginuerzh
4c2131ca6d
add rate limiter
2022-09-05 22:47:51 +08:00
ginuerzh
470d229c58
fix transport
2022-08-31 20:18:52 +08:00
ginuerzh
a1a2ea59d4
fix double copy in transport
2022-08-18 13:18:59 +08:00
ginuerzh
f3f3acd4e1
more fine-grained log level
2022-08-18 11:34:57 +08:00
ginuerzh
f7be171df5
add ipv4-only support for listener
2022-07-27 15:17:03 +08:00
ginuerzh
1415462d23
update core pkg
2022-04-05 22:55:19 +08:00
ginuerzh
1444ebc1ee
add metrics
2022-04-05 17:56:36 +08:00