I finally figured it out. It's a problem with setting environment variables in powershell. The set command from cmd used to work but not any more. I have checked $Env:http_proxy and it's empty even when I just set it. So, what you should do is to use the native powershell way of setting the environment variable for the current session by $Env:http_proxy = "protocol://server:port". I would suggest using With-Env here to get a better experience of setting environment variable for the current command only like one tend to do in Linux.
Unfortunately, Onedrive doesn't seem to be maxing out my upload bandwidth though.