We present a theory for the three-dimensional evolution of tubes with expandable walls conveying fluid. Our theory can accommodate arbitrary deformations of the tube, arbitrary elasticity of the walls, and both compressible and incompressible flows inside the tube. We also present the theory of propagation of shock waves in such tubes and derive the conservation laws and Rankine-Hugoniot conditions in arbitrary spatial configuration of the tubes, and compute several examples of particular solutions. The theory is derived from a variational treatment of Cosserat rod theory extended to incorporate expandable walls and moving flow inside the tube. The results presented here are useful for biological flows and industrial applications involving high speed motion of gas in flexible tubes.