  We find that quasiperiodicity-induced transitions between extended and
localized phases in generic 1D systems are associated with hidden dualities
that generalize the well-known duality of the Aubry-Andr\'e model. These
spectral and eigenstate dualities are locally defined near the transition and
can, in many cases, be explicitly constructed by considering relatively small
commensurate approximants. The construction relies on auxiliary 2D Fermi
surfaces obtained as functions of the phase-twisting boundary conditions and of
the phase-shifting real-space structure. We show that, around the critical
point of the limiting quasiperiodic system, the auxiliary Fermi surface of a
high-enough-order approximant converges to a universal form. This allows us to
devise a highly-accurate method to obtain mobility edges and duality
transformations for generic 1D quasiperiodic systems through their commensurate
approximants. To illustrate the power of this approach, we consider several
previously studied systems, including generalized Aubry-Andr\'e models and
coupled Moir\'e chains. Our findings bring a new perspective to examine
quasiperiodicity-induced extended-to-localized transitions in 1D, provide a
working criterion for the appearance of mobility edges, and an explicit way to
understand the properties of eigenstates close to and at the transition.
