code: func readRequest(conn net.Conn) (string, error) {
  	// Read in the version and reject anything other than SOCKS5.
  	version, err := readByte(conn)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  	if version != socks5Version {
  		return "", trace.BadParameter("only SOCKS5 is supported")
  	}
  
  	// Read in the command the client is requesting. Only CONNECT is supported.
  	command, err := readByte(conn)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  	if command != socks5CommandConnect {
  		return "", trace.BadParameter("only CONNECT command is supported")
  	}
  
  	// Read in and throw away the reserved byte.
  	_, err = readByte(conn)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  
  	// Read in the address type and determine how many more bytes need to be
  	// read in to read in the remote host address.
  	addrLen, err := readAddrType(conn)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  
  	// Read in the destination address.
  	destAddr := make([]byte, addrLen)
  	_, err = io.ReadFull(conn, destAddr)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  
  	// Read in the destination port.
  	var destPort uint16
  	err = binary.Read(conn, binary.BigEndian, &destPort)
  	if err != nil {
  		return "", trace.Wrap(err)
  	}
  
  	return net.JoinHostPort(string(destAddr), strconv.Itoa(int(destPort))), nil
  }
docs: // readRequest reads in the SOCKS5 request from the client and returns the
  // host:port the client wants to connect to.