xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
3.14k stars 434 forks source link

UDP delayed when session is enabled #1

Closed xjasonlyu closed 4 years ago

xjasonlyu commented 4 years ago

First UDP packets from source would be delayed several milliseconds if session is enabled. It's a problem of lsof, it would take about 30 ms - 60 ms (depends on os) to inspect source address information.

xjasonlyu commented 4 years ago

New lsof has implemented for linux for reducing latency, auto bypass traffic if not local requests. see https://github.com/xjasonlyu/tun2socks/commit/024cb5b85425b610b0230e0a0431eb8748797532