Diffraction at HERA and the confinement problem