  We present a comprehensive investigation of cosmological constraints on the
class of vector field formulations of modified gravity called Generalized
Einstein-Aether models. Using linear perturbation theory we generate cosmic
microwave background and large-scale structure spectra for general parameters
of the theory, and then constrain them in various ways. We investigate two
parameter regimes: a dark-matter candidate where the vector field sources
structure formation, and a dark-energy candidate where it causes late-time
acceleration. We find that the dark matter candidate does not fit the data, and
identify five physical problems that can restrict this and other theories of
dark matter. The dark energy candidate does fit the data, and we constrain its
fundamental parameters; most notably we find that the theory's kinetic index
parameter $n_{\mathrm{ae}}$ can differ significantly from its $\Lambda$CDM
value.
