In presence of a static pair of sources, the spectrum of low-lying states of any confining gauge theory in D space-time dimensions is described, at large source separations, by an effective string theory. Recently two important advances improved our understanding of this effective theory. First, it was realized that the form of the effective action is strongly constrained by the requirement of the Lorentz invariance of the gauge theory, which is spontaneously broken by the formation of a long confining flux tube in the vacuum. This constraint is strong enough to fix uniquely the first few subleading terms of the action. Second, it has been realized that the first of these allowed terms - a quartic polynomial in the field derivatives - is exactly the composite field $Tbar{T}$, built with the chiral components, $T$ and $bar{T}$, of the energy-momentum tensor of the 2d QFT describing the infrared limit of the effective string. This irrelevant perturbation is quantum integrable and yields, through the thermodynamic Bethe Ansatz (TBA), the energy levels of the string which exactly coincide with the Nambu-Goto spectrum. In this talk we first review the general implications of these two results and then, as a test of the power of these methods, use them to construct the first few boundary corrections to the effective string action.