There are no special rules for foreign students in the U.S. to transit through Canada.
The circumstances where a visa national can transit Canada without a visa are listed on the government website. A person holding a visa-exempt passport or a U.S. permanent resident does not require special permission to transit (but may need an electronic travel authorization unless they are a U.S. citizen).
No transit without visa program exists for Indian nationals as of May 2022. You will need a visa if you want to transit in Canada to another country.
Currently, exemptions for trips from and to the United States exist, but only for the nationals of the following countries under very specific conditions (only some airports and some airlines participate!):
- China (People's Republic) (special China Transit Program)
- Indonesia (TWOV)
- Philippines (TWOV)
- Thailand (TWOV)
- Taiwan (for nationals without household registration; citizens with household registration do not need visa to visit Canada) (TWOV)