Add endpoint independent nat support for tun inbound

This commit is contained in:
世界
2022-07-26 19:21:56 +08:00
parent 3a7a4bab12
commit f0a53b5cae
12 changed files with 54 additions and 36 deletions

View File

@@ -39,7 +39,7 @@ func NewTProxy(ctx context.Context, router adapter.Router, logger log.ContextLog
if options.UDPTimeout != 0 {
udpTimeout = options.UDPTimeout
} else {
udpTimeout = 300
udpTimeout = int64(C.UDPTimeout.Seconds())
}
tproxy.connHandler = tproxy
tproxy.oobPacketHandler = tproxy