Phoretic swimmers provide new avenues to study non-equilibrium statistical physics and are also hailed as a promising technology for bioengineering at the cellular scale. Exact solutions for the locomotion of such swimmers have been restricted so far to spheroidal shapes. In this paper we solve for the flow induced by the canonical non-simply connected shape, namely an axisymmetric phoretic torus. The analytical solution takes the form of an infinite series solution, which we validate against boundary element computations. For a torus of uniform chemical activity, confinement effects in the hole allow the torus to act as a pump, which we optimize subject to fixed particle surface area. Under the same constraint, we next characterize the fastest swimming Janus torus for a variety of assumptions on the surface chemistry. Perhaps surprisingly, none of the optimal tori occur in the limit where the central hole vanishes.