aboutsummaryrefslogtreecommitdiff
path: root/node_modules/global-agent/dist/classes/HttpProxyAgent.js
diff options
context:
space:
mode:
authorPriyansh <[email protected]>2020-12-22 17:49:59 +0530
committerPriyansh <[email protected]>2020-12-22 17:49:59 +0530
commite93da8b04da86773247aadb1cbb1912e4f4526b2 (patch)
treeeb4ef3203a92ed3dbd2252ddb1ea23bd2d670c98 /node_modules/global-agent/dist/classes/HttpProxyAgent.js
parenta5743c293dcb435e4b159a4df791f8955a4110ec (diff)
downloadstyx-e93da8b04da86773247aadb1cbb1912e4f4526b2.tar.xz
styx-e93da8b04da86773247aadb1cbb1912e4f4526b2.zip
Rewriting Project
Diffstat (limited to 'node_modules/global-agent/dist/classes/HttpProxyAgent.js')
-rw-r--r--node_modules/global-agent/dist/classes/HttpProxyAgent.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/node_modules/global-agent/dist/classes/HttpProxyAgent.js b/node_modules/global-agent/dist/classes/HttpProxyAgent.js
new file mode 100644
index 0000000..6d1c831
--- /dev/null
+++ b/node_modules/global-agent/dist/classes/HttpProxyAgent.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _net = _interopRequireDefault(require("net"));
+
+var _Agent = _interopRequireDefault(require("./Agent"));
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+class HttpProxyAgent extends _Agent.default {
+ // @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-486980290
+ // eslint-disable-next-line unicorn/prevent-abbreviations
+ constructor(...args) {
+ super(...args);
+ this.protocol = 'http:';
+ this.defaultPort = 80;
+ }
+
+ createConnection(configuration, callback) {
+ const socket = _net.default.connect(configuration.proxy.port, configuration.proxy.hostname);
+
+ callback(null, socket);
+ }
+
+}
+
+var _default = HttpProxyAgent;
+exports.default = _default;
+//# sourceMappingURL=HttpProxyAgent.js.map \ No newline at end of file