Refactor: manager -> statistic

This commit is contained in:
xjasonlyu
2021-02-07 10:54:29 +08:00
parent 84b7c17268
commit 035504020e
7 changed files with 34 additions and 46 deletions

View File

@@ -11,12 +11,17 @@ import (
"github.com/xjasonlyu/tun2socks/common/pool"
"github.com/xjasonlyu/tun2socks/log"
"github.com/xjasonlyu/tun2socks/proxy"
"github.com/xjasonlyu/tun2socks/tunnel/statistic"
)
const (
tcpWaitTimeout = 5 * time.Second
)
func newTCPTracker(conn net.Conn, metadata *adapter.Metadata) net.Conn {
return statistic.NewTCPTracker(conn, metadata, statistic.DefaultManager)
}
func handleTCP(localConn adapter.TCPConn) {
defer localConn.Close()