Commit Graph
16 Commits
Author SHA1 Message Date
fatedier e6e0aaf9d4 fix(vhost): close pending connections when a route listener closes (#5592)
When an HTTPS or tcpmux route listener is closed after a connection has been
resolved to it but before the handoff, Muxer.handle clears the deadline and
then sends on the closed accept channel. The recovered panic returns without
closing the connection, so the peer waits until its own read timeout.

Add a done channel and sync.Once to Listener. Close closes done and is
idempotent; handle and Accept select on accept/done, and a pending connection
is closed when done is closed. Connections already handed to Accept keep their
current ownership. Remove the PanicToError-based control flow.

Cover the pending handoff with net.Pipe and real TCP tests, plus an idempotent
Close test.

Fixes #5573
2026-11-02 14:56:32 +08:00
fatedier a88e0e9a49 refactor: clean up code (#5308) 2026-05-12 11:13:50 +08:00
fatedier 43cf1688e4 update golangci-lint version (#4817) 2025-06-25 11:40:23 +08:00
fatedier 3c8d648ddc vnet: fix issues (#4771) 2025-04-27 15:46:22 +08:00
fatedier e0dd947e6a frps: release resources in service.Close() (#4667) 2025-02-12 12:22:57 +08:00
fatedier e81b36c5ba support responseHeaders.set for proxy type http (#4192) 2024-04-29 15:53:45 +08:00
fatedier 43ba7bd338 use new log package (#4054) 2024-03-12 13:58:53 +08:00
fatedier 69ae2b0b69 optimize some code (#3801) 2023-11-27 15:47:49 +08:00
Zeyu Dong 5c8ea51eb5 return ssl alert unrecognized_name when https domain not registered (#3620) 2023-09-18 14:28:05 +08:00
fatedier 555db9d272 format import package name (#3455) 2023-05-29 14:10:34 +08:00
fatedier 862b1642ba tcpmux: support authentication (#3345) 2023-03-07 19:53:32 +08:00
fatedier cf66ca10b4 improve http group load balancing (#3131) 2022-10-19 12:14:35 +08:00
fatedier 9d077b02cf lint by golangci-lint (#3080) 2022-08-29 01:02:53 +08:00
fatedier 4af85da0c2 type http/tcpmux proxy support route_by_http_user, tcpmux support passthourgh mode (#2932) 2022-05-26 23:57:30 +08:00
XNG c842558ace Reduced log level of "get hostname error" (#2165)
Reduced log level of "get hostname from http/https request error" to debug so that it won't overwhelms the log file when user is using apache/ngix as their own SSL backend
2020-12-25 13:39:26 +08:00
fatedier 3fbdea0f6b rename models to pkg (#2005) 2020-09-23 13:49:14 +08:00