Added proxy support (#1260)

This commit is contained in:
Tomas Della Vedova
2020-08-03 11:39:24 +02:00
committed by GitHub
parent 629894adba
commit 26238634a7
15 changed files with 344 additions and 6 deletions

View File

@ -35,6 +35,7 @@ class BaseConnectionPool {
this.auth = opts.auth || null
this._ssl = opts.ssl
this._agent = opts.agent
this._proxy = opts.proxy || null
}
getConnection () {
@ -69,6 +70,8 @@ class BaseConnectionPool {
if (opts.ssl == null) opts.ssl = this._ssl
/* istanbul ignore else */
if (opts.agent == null) opts.agent = this._agent
/* istanbul ignore else */
if (opts.proxy == null) opts.proxy = this._proxy
const connection = new this.Connection(opts)