1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 17:25:27 -05:00

fix: wrong source and destination

This commit is contained in:
AkinoKaede
2023-05-28 22:22:59 +08:00
committed by Shelikhoo
parent 54b605ba4c
commit 4b5f788b2f
4 changed files with 52 additions and 33 deletions

View File

@@ -1,31 +1,18 @@
package tun
import (
"github.com/v2fly/v2ray-core/v5/common/net"
"gvisor.dev/gvisor/pkg/tcpip/stack"
tun_net "github.com/v2fly/v2ray-core/v5/app/tun/net"
)
var (
tcpQueue = make(chan TCPConn)
udpQueue = make(chan UDPConn)
tcpQueue = make(chan tun_net.TCPConn)
udpQueue = make(chan tun_net.UDPConn)
)
type TCPConn interface {
net.Conn
ID() *stack.TransportEndpointID
}
type UDPConn interface {
net.Conn
ID() *stack.TransportEndpointID
}
func handleTCP(conn TCPConn) {
func handleTCP(conn tun_net.TCPConn) {
tcpQueue <- conn
}
func handleUDP(conn UDPConn) {
func handleUDP(conn tun_net.UDPConn) {
udpQueue <- conn
}