mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 22:45:13 +00:00
massive refactoring for kcp
This commit is contained in:
1 parent
22ce652a25
commit
9b6dc6bcea
55 files changed
+1047
-1057
No files matched your search
@@ -7,13 +7,15 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
"github.com/v2ray/v2ray-core/transport/hub"
|
||||
"github.com/v2ray/v2ray-core/transport/internet"
|
||||
"github.com/v2ray/v2ray-core/transport/internet/tcp"
|
||||
)
|
||||
|
||||
const SO_ORIGINAL_DST = 80
|
||||
|
||||
func GetOriginalDestination(conn *hub.Connection) v2net.Destination {
|
||||
fd, err := conn.SysFd()
|
||||
func GetOriginalDestination(conn internet.Connection) v2net.Destination {
|
||||
tcpConn := conn.(*tcp.Connection)
|
||||
fd, err := tcpConn.SysFd()
|
||||
if err != nil {
|
||||
log.Info("Dokodemo: Failed to get original destination: ", err)
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user