diff --git a/lib/tunnel.js b/lib/tunnel.js index 10cc382..8175648 100644 --- a/lib/tunnel.js +++ b/lib/tunnel.js @@ -119,7 +119,7 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); + Buffer.from(connectOptions.proxyAuth).toString('base64'); } debug('making CONNECT request');