  Dark photon not only provides a portal linking dark sector particles and
ordinary matter but also is a well-motivated dark matter candidate. We propose
to detect the dark photon dark matter through the inverse Compton-like
scattering process $p+\gamma^\prime \to p+\gamma$. Thanks to the ultra-high
energy primary cosmic rays, we find that such a method is able to probe the
dark photon mass from $10^{-2}$ eV down to $10^{-19}$ eV with the expected
sensitivity of eROSITA $X$-ray telescope, which can extend the current lower
limit of dark photon mass from Jupiter's magnetic fields experiment by about
three orders of magnitude.
