We report constraints on the dark photon effective kinetic mixing parameter (κ) with data taken from two p-type point-contact germanium detectors of the CDEX-10 experiment at the China Jinping Underground Laboratory. The 90% confidence level upper limits on κ of solar dark photon from 205.4 kg-day exposure are derived, probing new parameter space with masses (m_{V}) from 10 to 300 eV/c^{2} in direct detection experiments. Considering dark photon as the cosmological dark matter, limits at 90% confidence level with m_{V} from 0.1 to 4.0 keV/c^{2} are set from 449.6 kg-day data, with a minimum of κ=1.3×10^{-15} at m_{V}=200 eV/c^{2}.