Repository navigation
v20261018
KcpTun v20261018 — prompt EOF and reliable half-close
Fixes
- Server
closewaitnow defaults to 0, matching the client. Target EOF is forwarded immediately instead of being held for an additional 30 seconds. Explicit positiveclosewaitvalues retain their existing behavior. - Keep unread smux data alive after both peers send FIN. Previously, automatic stream cleanup could discard the buffered response or reverse upload. The caller now releases the stream with
Closeafter consuming its data. - Preserve
CloseWritethrough the QPP wrapper, so receiving EOF in one direction does not terminate the other direction. - Abort both pipe directions on a copy error, including TCP reset, instead of leaving the reverse copy blocked or sleeping for
closewait.
Upgrade
Upgrade the server on the VPS to remove its old 30-second default. Upgrade both client and server for the half-close fixes. An existing JSON setting such as "closewait": 30 overrides the new default; remove it or set it to 0 on each endpoint.
closewait controls EOF forwarding; it is not a TCP idle timeout. This release does not shorten established TCP idle timeouts. The separate SSR timeout: 120 setting can remain unchanged.
Verification and downloads
Regression tests exercise real loopback KCP tunnels with smux 1 and 2, QPP on and off, complete payload delivery, EOF forwarding, and reverse traffic after half-close. Go tests also cover buffered data after both FINs and TCP reset cleanup. The release workflow runs the full Go test suite with the race detector before publishing.
Each platform archive contains both client and server binaries. SHA256SUMS contains archive checksums. The linux/amd64 binaries are executed in CI; the other targets are cross-compiled and packaged, without runtime testing on those platforms.