Your route
Passport, the country you connect through, and your final destination.
Your layover
Rules change the moment you pass through immigration.