Switching is handled transparently. If Syncthing detects known peers in the local network it'll connect locally only, and avoid public internet altogether.