refactor: 获取远程目的从tunnel中剔除,移至tracker

This commit is contained in:
Skyxim
2022-05-27 08:58:36 +08:00
parent 72fb153fe0
commit ac36473d13
3 changed files with 30 additions and 22 deletions

View File

@ -59,6 +59,7 @@ func (tt *tcpTracker) Close() error {
func NewTCPTracker(conn C.Conn, manager *Manager, metadata *C.Metadata, rule C.Rule) *tcpTracker {
uuid, _ := uuid.NewV4()
metadata.RemoteDst = conn.RemoteDestination()
t := &tcpTracker{
Conn: conn,
@ -116,6 +117,7 @@ func (ut *udpTracker) Close() error {
func NewUDPTracker(conn C.PacketConn, manager *Manager, metadata *C.Metadata, rule C.Rule) *udpTracker {
uuid, _ := uuid.NewV4()
metadata.RemoteDst = conn.RemoteDestination()
ut := &udpTracker{
PacketConn: conn,