import "github.com/v2ray/v2ray-core/common/net" ip := net.IP{192, 168, 0, 1} port := net.Port(80) dest := net.Destination{ Network: net.Network_TCP, Address: net.IPAddress(ip), Port: net.Port(port), }
import "github.com/v2ray/v2ray-core/common/net" destString := "tcp://192.168.0.1:80" dest, err := net.ParseDestination(destString) if err != nil { // handle error }In both examples, we can see that the package library is "net", which is a common package for handling network-related functionality in Go.