diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-11-17 23:25:29 +0100 |
commit | 953ddd82e48dd206cef5ac94456549aed13b3ad5 (patch) | |
tree | 8f003106ee2e7f422e5a22d2ee04d0db302e66c0 /includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js | |
parent | 62a9199846b0c07c03218703b33e8385764f42d9 (diff) | |
download | pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.gz pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.tar.bz2 pluralconnect-953ddd82e48dd206cef5ac94456549aed13b3ad5.zip |
Updated 30 files and deleted 2976 files (automated)
Diffstat (limited to 'includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js')
-rw-r--r-- | includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js b/includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js deleted file mode 100644 index 0f5a104..0000000 --- a/includes/external/addressbook/node_modules/http2-wrapper/source/proxies/h2-over-hx.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; -const {Agent} = require('../agent.js'); -const JSStreamSocket = require('../utils/js-stream-socket.js'); -const UnexpectedStatusCodeError = require('./unexpected-status-code-error.js'); -const initialize = require('./initialize.js'); - -class Http2OverHttpX extends Agent { - constructor(options) { - super(options); - - initialize(this, options.proxyOptions); - } - - async createConnection(origin, options) { - const authority = `${origin.hostname}:${origin.port || 443}`; - - const [stream, statusCode, statusMessage] = await this._getProxyStream(authority); - if (statusCode !== 200) { - throw new UnexpectedStatusCodeError(statusCode, statusMessage); - } - - if (this.proxyOptions.raw) { - options.socket = stream; - } else { - const socket = new JSStreamSocket(stream); - socket.encrypted = false; - socket._handle.getpeername = out => { - out.family = undefined; - out.address = undefined; - out.port = undefined; - }; - - return socket; - } - - return super.createConnection(origin, options); - } -} - -module.exports = Http2OverHttpX; |