hub_other.go 391 B

1234567891011121314151617
  1. //go:build !linux && !freebsd
  2. // +build !linux,!freebsd
  3. package udp
  4. import (
  5. "github.com/xtls/xray-core/common/net"
  6. )
  7. func RetrieveOriginalDest(oob []byte) net.Destination {
  8. return net.Destination{}
  9. }
  10. func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) {
  11. nBytes, addr, err := conn.ReadFromUDP(payload)
  12. return nBytes, 0, 0, addr, err
  13. }