diff --git a/lib/index.js b/lib/index.js index 1975871..9e1d748 100644 --- a/lib/index.js +++ b/lib/index.js @@ -100,7 +100,14 @@ module.exports = { return done(); } - request( host + name ) + var options = { + url: host + name, + }; + if (process.env.http_proxy != null) { + options.proxy = process.env.http_proxy; + }; + + request( options ) .on( 'error', function( err ) { logger.error( 'Error while downloading', name ); logger.error( err );