From ead3de4d31b36ddf36656d80dd126f8e40f0ed27 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Sat, 26 Aug 2023 18:03:09 -0400 Subject: [PATCH] Fix fdConn unix.Connect err with go 1.20+ --- libv2ray_support.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libv2ray_support.go b/libv2ray_support.go index 4f77a49..6d6631f 100644 --- a/libv2ray_support.go +++ b/libv2ray_support.go @@ -289,7 +289,7 @@ func (d *ProtectedDialer) fdConn(ctx context.Context, ip net.IP, port int, fd in sa := &unix.SockaddrInet6{ Port: port, } - copy(sa.Addr[:], ip) + copy(sa.Addr[:], ip.To16()) if err := unix.Connect(fd, sa); err != nil { log.Printf("fdConn unix.Connect err, Close Fd: %d Err: %v", fd, err)