  We use boundary triples to find a parametrization of all self-adjoint
extensions of the magnetic Schr\"odinger operator, in a quasi-convex
domain~$\Omega$ with compact boundary, and magnetic potentials with components
in $\textrm{W}^{1}_{\infty}(\overline{\Omega})$. This gives also a new
characterization of all self-adjoint extensions of the Laplacian in nonregular
domains. Then we discuss gauge transformations for such self-adjoint extensions
and generalize a characterization of the gauge equivalence of the Dirichlet
magnetic operator for the Dirichlet Laplacian; the relation to the
Aharonov-Bohm effect, including irregular solenoids, is also discussed. In
particular, in case of (bounded) quasi-convex domains it is shown that if some
extension is unitarily equivalent (through the multiplication by a smooth unit
function) to a realization with zero magnetic potential, then the same occurs
for all self-adjoint realizations.
