mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-23 01:56:48 +08:00
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
This commit is contained in:
@@ -6,13 +6,14 @@ import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/xtls/xray-core/transport/internet/stat"
|
||||
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
)
|
||||
|
||||
const SO_ORIGINAL_DST = 80
|
||||
|
||||
func GetOriginalDestination(conn internet.Connection) (net.Destination, error) {
|
||||
func GetOriginalDestination(conn stat.Connection) (net.Destination, error) {
|
||||
sysrawconn, f := conn.(syscall.Conn)
|
||||
if !f {
|
||||
return net.Destination{}, newError("unable to get syscall.Conn")
|
||||
|
Reference in New Issue
Block a user