Q:

"Ionic upload" and "ionic package" ignore proxy settings

I am using the Ionic CLI behind a corporate proxy. I have configured CNTLM (0.92.3) to allow the use of command line tools. All Ionic commands work as expected except for two; the Ionic upload and ionic package commands both ignore all proxy settings. I have tried the commands on Ionic Beta and on many other versions of the Ionic framework with the same results:      
There was an error trying to upload your app.
An error occurred uploading the build: The specific error message: Error: socket
hang up

The specific error message: Error: socket hang up (CLI v2.0.0)

My system information:  
Cordova CLI: 6.2.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.2.4
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
OS: Windows 7 SP1
Node Version: v4.4.4'

I’ve also tried several GitHub solutions that suggest modifying the following files and using an npm package named https-proxy-agent. I’ve tried every suggested solution in each of the threads with no success.
form_data.js
package.json
upload.js

https://github.com/driftyco/ionic-cli/issues/290https://github.com/driftyco/ionic-app-lib/pull/58
https://github.com/form-data/form-data/pull/179

A:

did you tried this : 
$ export HTTP_PROXY="http://proxy.example.com:8888" 
$ export HTTPS_PROXY="https://proxy.example.com:8888"
$ export IONIC_HTTP_PROXY="http://proxy.example.com:8888"

$ npm config set proxy http://proxy.company.com:8888
$ npm config set https-proxy https://proxy.company.com:8888

$ git config --global http.proxy http://proxy.example.com:8888

