Relativistic generalization of formation and ion-reflection conditions in electrostatic shocks