适配新版本https-proxy-agent #72

This commit is contained in:
yeyang
2024-03-10 19:36:58 +08:00
parent cb1b933262
commit 7b65bb2f95

View File

@@ -4,7 +4,7 @@ export class HttpsProxyAgent extends HttpsProxyAgentOrig.HttpsProxyAgent {
constructor (opts) {
super(opts)
this.tlsConnectionOptions = opts.tls
const callback = this.callback.bind(this)
this.callback = (req, opts) => callback(req, Object.assign(opts, this.tlsConnectionOptions))
const connect = this.connect.bind(this)
this.connect = (req, opts) => connect(req, Object.assign(opts, this.tlsConnectionOptions))
}
}