Skip to content

Comments

Proxy: Tun: Implement idle connection timeouts#5521

Closed
Owersun wants to merge 1 commit intoXTLS:mainfrom
Owersun:tun-handler-timeouts
Closed

Proxy: Tun: Implement idle connection timeouts#5521
Owersun wants to merge 1 commit intoXTLS:mainfrom
Owersun:tun-handler-timeouts

Conversation

@Owersun
Copy link
Collaborator

@Owersun Owersun commented Jan 11, 2026

Consider PolicyManager configuration

Account for configure PolicyManager policy for connection idle timeouts
@RPRX
Copy link
Member

RPRX commented Jan 11, 2026

从大规模用 DispatchLink() 开始 idle timeout 都是交给 outbound 了

@Owersun
Copy link
Collaborator Author

Owersun commented Jan 11, 2026

ok. perfect, then I'll just implement net.Conn for udp, and depend on that dispatcher will call .Close() on it when idle timeout is reached.

@RPRX
Copy link
Member

RPRX commented Jan 11, 2026

不过 UDP 的话那个“自动清理来源二元组 map”还得留着,因为 outbound 非 UoT 时可能不会把 close 传导过来,我不确定

@Owersun
Copy link
Collaborator Author

Owersun commented Jan 11, 2026

Well, adding more changes don't make sense then... The whole idea was that udp will be pure net.Conn, only implementing Read/Write/Close/... and lifecycle is controlled the handler, which will close connections that don't have any bytes for some time...

@RPRX
Copy link
Member

RPRX commented Jan 11, 2026

可能非 UoT 时也有 idle timeout close 吧,我真的不确定,@yuhan6665 @Fangliding

@Owersun Owersun closed this Jan 12, 2026
@Owersun
Copy link
Collaborator Author

Owersun commented Jan 12, 2026

Tested it with xHTTP outbound, outbound signal the connections to be closed without a need for additional lifecycle handling on inbound side.

@RPRX
Copy link
Member

RPRX commented Jan 12, 2026

我想起来了,DispatchLink() 靠的是 return 来传导 close,所以只要 outbound 有 idle timeout 就能传导过来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants