This commit is contained in:
v2ray
2016-06-30 00:08:20 +02:00
parent 98cc28a4c4
commit f050113925
3 changed files with 18 additions and 2 deletions
+5 -1
View File
@@ -14,7 +14,11 @@ import (
const SO_ORIGINAL_DST = 80
func GetOriginalDestination(conn internet.Connection) v2net.Destination {
tcpConn := conn.(*tcp.Connection)
tcpConn, ok := conn.(internet.SysFd)
if !ok {
log.Info("Dokodemo: Failed to get sys fd.")
return nil
}
fd, err := tcpConn.SysFd()
if err != nil {
log.Info("Dokodemo: Failed to get original destination: ", err)