I did it as a tourist. Not sure if it's different for a Pakistani passport holder, but you can email them and ask. They replied pretty fast when I asked them.
I did mine in HK. Completely online. You have to be in HK to apply, but you can leave as soon as you've sent the application (or at least I left and got my visa while in Vietnam)