v0.3.4
Highlights
Connection Leak Fix
Discovered that gnet's SetReadDeadline is epoll-based and only fires on read attempts. Connections that never send data (probes, scanners, bots) stayed open indefinitely, accumulating until the proxy stopped accepting new connections.
Fixed with an active time.AfterFunc timer that closes any connection still in pre-auth state after the handshake deadline.
Per-IP Limiting Covers All Connections
max-connections-per-ip previously only applied after authentication. Now enforced at TCP accept time — unauthenticated floods from a single IP are blocked before any protocol work begins.
Splice Idle Timeout
Spliced (unrecognized) connections now have a dedicated shorter idle timeout (default 30s) instead of sharing the authenticated connection timeout (5m).
What's Changed
Fixes
- Silent connections (no data sent) are now actively killed after handshake timeout
- Per-IP connection limit enforced in
OnOpenbefore authentication - Splice path now clears handshake deadline and sets its own idle timeout
New Config Options
handshake-timeout— max time for handshake before dropping (default5s, was hardcoded30s)splice-idle-timeout— idle timeout for spliced connections (default30s)
Full Changelog: v0.3.3...v0.3.4