Luttinger hydrodynamics of confined one-dimensional Bose gases with dipolar interactions