People are often confused about which Canada Immigration Office to apply at when they are not living in their country of birth.
The rule is that you may apply in one of two places: the Canada Immigration Office responsible for your country of citizenship or your country of residence.
However there is a catch: you have to be legally admitted to your country of residence for at least twelve months to apply to the office responsible for that country.
This rule has some great advantages. For example, if your country of citizenship has long wait times, it would be prudent to get a work permit for a country with much shorter wait times.
A good strategy would be to get a twelve month work permit for Canada which would allow you to apply through Buffalo, New York, where wait times are generally shorter than any other office.
Why would you apply through the US if you are resident in Canada? As strange as it seems, no permanent resident applications are processed in Canada.