After struggling on this for a long time I have finally found the answer.
In knife.rb
another entry for bootstrap-proxy has to made as well.
knife[:bootstrap_proxy] = "http://username:password@proxy:port"
After doing this, run the following bootstrap command -
knife bootstrap <My Node's IP> --sudo -x <username> -P <password> -N <name>
This worked for me!