You cannot apply from your country of origin. To apply from outside of Canada, you need to be living outside of your country of origin and also need to have been recognized as a refugee by UNHCR or a similar referral organization.
You can apply but make sure you have consulted a competent immigration lawyer before applying. You would need to be organized and well prepared, if you want to succeed.