From 6d0df876cf22ad4e7d33cbd753d2bb1375ac8c85 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sun, 7 Feb 2021 12:47:14 -0500 Subject: [PATCH] upnp, stop hammering outgoing connections --- lib/STP.js | 81 ++++++++++++-- lib/title.js | 52 ++++----- package.json | 2 + relay/index.js | 37 +------ test.js | 39 +++++++ upnp.js | 165 +++++++++++++++++++++++++++ yarn.lock | 295 ++++++++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 598 insertions(+), 73 deletions(-) create mode 100644 test.js create mode 100644 upnp.js diff --git a/lib/STP.js b/lib/STP.js index 08630cc..f4ce3eb 100644 --- a/lib/STP.js +++ b/lib/STP.js @@ -2,10 +2,46 @@ const net = require('net'); const EventEmitter = require('events'); const NodeRSA = require('node-rsa'); const log = require('signale').scope('stp'); +const natUpnp = require('nat-upnp'); +const client = natUpnp.createClient(); +client.map = function(port) { + return new Promise((res, rej) => { + this.portMapping({ + private: port, + public: port, + ttl: 10, + description: 'valnet' + }, (err) => { + if(err) rej(err); + res(); + }); + }); +} +client.unmap = function(port) { + return new Promise((res, rej) => { + this.portUnmapping({ + private: port, + public: port + }, (err) => { + if(err) rej(err); + res(); + }); + }); +} +client.mappings = function() { + return new Promise((res, rej) => { + this.getMappings((err, mappings) => { + if(err) rej(err); + res(mappings); + }); + }); +} +const { config } = require('./../package.json'); -module.exports.createServer = function(keys, onConnect) { - const server = new Server(keys); - server.on('connection', onConnect); + +module.exports.createServer = function(keys, port) { + const server = new Server(keys, port); + // server.on('connection'); return server; // return 5; } @@ -18,23 +54,40 @@ module.exports.connect = function(identity, port, ip) { class Server extends EventEmitter { tcpServer; identity; + port; - constructor(identity) { + constructor(identity, port) { super(); this.identity = identity; + this.port = port; + + (async () => { + try { + log.debug('first upnp mapping attempt...'); + await client.map(this.port); + this.openServer(); + } catch (e) { + log.warn(`Could not open upnp port ${this.port}`); + log.warn('Check your router is configured to allow upnp.'); + log.warn('Valnet will continue to operate, but incomming') + log.warn('peer connections will not be possible.') + } + })(); + } + + openServer() { + log.success(`opened upnp port ${this.port}`); this.tcpServer = net.createServer(this.tcpConnectClient.bind(this)); + this.tcpServer.listen(this.port); } tcpConnectClient(tcpSocket) { + log.debug('incomming TCP connection! ' + tcpSocket.remoteAddress); const socket = new STPSocket(tcpSocket, this.identity); socket.on('ready', () => { this.emit('connection', socket); }) } - - listen(...args) { - this.tcpServer.listen(...args); - } } class STPSocket extends EventEmitter { @@ -146,4 +199,14 @@ class AckPacket extends STPPacket { super(); this.cmd = 'ACK'; } -} \ No newline at end of file +} + + +// client.getMappings(function(err, results) { +// }); + +// client.getMappings({ local: true }, function(err, results) { +// }); + +// client.externalIp(function(err, ip) { +// }); \ No newline at end of file diff --git a/lib/title.js b/lib/title.js index c27fcd0..a52ec0f 100644 --- a/lib/title.js +++ b/lib/title.js @@ -33,32 +33,32 @@ module.exports.title = function(component, cls = true) { if(bigDisplay) centerString(` ______________________ /\\ __________________ \\ - /XX\\ \\________________/\\ \\ - /X/\\X\\ \\ /X/\\X\\ \\ - /X/ /\\X\\ \\ /X/ /\\X\\ \\ - /X/ / \\X\\ \\________/_/_/__\\_\\ \\____________________ - /X/ / \\X\\____________________ __________________ \\ - /X/ / /X/ __________________/\\ \\________________/\\ \\ - /X/ /_____/X/ /_____/X/ /_____/X/\\X\\ \\____ /X/\\X\\ \\ - /X/_/_____/X/ /______\\/_/_____/X/ /\\X\\ \\__ \\ /X/ /\\X\\ \\ - \\X\\ \\____/X/ /_______/\\ \\____/X/ /__\\X\\ \\/\\ \\____/_/_/__\\_\\ \\ - \\X\\ \\ /X/ / /X/\\X\\ \\ /X/ / \\X\\_____________________\\ - \\X\\ \\/X/ / /X/ /\\X\\_\\/X/ / /X/ __________________ / - \\X\\/X/ /_____/_/_/__\\_\\/X/_/_____/X/ /__\\_\\/X/_/ /X/ / - \\XX/_/________________\\/_/_____/X/ /______\\/_/ /X/ / - /XX\\ \\________________/\\ \\____/X/ /______ /\\ \\ /X/ / - /X/\\X\\ \\ /X/ /_____/X/\\X\\ \\__/X/ / /X/\\X\\ \\ /X/ / - /X/ /\\X\\ \\/X/_/_____/X/ /\\X\\ \\/X/ / /X/ /\\X\\ \\/X/ / - /X/ / \\X\\ \\_\\_\\____/_/_/__\\_\\/X/ /\\____/_/_/__\\_\\/X/ / - /X/ / \\X\\___________________\\/ /________________\\/ / - /X/ / /X/ __________________ ____________________/ - /X/ /_____/X/ /__\\_\\/X/ /_____/X/ /__\\_\\/X/ / -/X/_/_____/X/ /______\\/_/_____/X/ /______\\/ / -\\X\\ \\____/X/ /_______/\\ \\____/X/ /_________/ - \\X\\ \\ /X/ / \\X\\ \\ /X/ / - \\X\\ \\/X/ / \\X\\ \\/X/ / - \\X\\/X/ /____________\\_\\/X/ / - \\XX/ /________________\\/ / + //\\\\ \\________________/\\ \\ + ///\\\\\\ \\ ///\\\\\\ \\ + /// /\\\\\\ \\ /// /\\\\\\ \\ + /// / \\\\\\ \\________/_/_/__\\_\\ \\____________________ + /// / \\\\\\____________________ __________________ \\ + /// / /// __________________/\\ \\________________/\\ \\ + /// /_____/// /_____/// /_____///\\\\\\ \\____ ///\\\\\\ \\ + ///_/_____/// /______\\/_/_____/// /\\\\\\ \\__ \\ /// /\\\\\\ \\ + \\\\\\ \\____/// /_______/\\ \\____/// /__\\\\\\ \\/\\ \\____/_/_/__\\_\\ \\ + \\\\\\ \\ /// / ///\\\\\\ \\ /// / \\\\\\_____________________\\ + \\\\\\ \\/// / /// /\\\\\\_\\/// / /// __________________ / + \\\\\\/// /_____/_/_/__\\_\\///_/_____/// /__\\_\\///_/ /// / + \\\\//_/________________\\/_/_____/// /______\\/_/ /// / + //\\\\ \\________________/\\ \\____/// /______ /\\ \\ /// / + ///\\\\\\ \\ /// /_____///\\\\\\ \\__/// / ///\\\\\\ \\ /// / + /// /\\\\\\ \\///_/_____/// /\\\\\\ \\/// / /// /\\\\\\ \\/// / + /// / \\\\\\ \\_\\_\\____/_/_/__\\_\\/// /\\____/_/_/__\\_\\/// / + /// / \\\\\\___________________\\/ /________________\\/ / + /// / /// __________________ ____________________/ + /// /_____/// /__\\_\\/// /_____/// /__\\_\\/// / +///_/_____/// /______\\/_/_____/// /______\\/ / +\\\\\\ \\____/// /_______/\\ \\____/// /_________/ + \\\\\\ \\ /// / \\\\\\ \\ /// / + \\\\\\ \\/// / \\\\\\ \\/// / + \\\\\\/// /____________\\_\\/// / + \\\\// /________________\\/ / \\/_____________________/`); console.log(); diff --git a/package.json b/package.json index d7d379a..5ca805b 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,10 @@ "font-ascii": "^1.2.1", "gradient-string": "^1.2.0", "human-readable-ids": "^1.0.4", + "ip": "^1.1.5", "keyv": "^4.0.3", "keyv-file": "^0.2.0", + "nat-upnp": "^1.1.1", "nedb": "^1.8.0", "node-rsa": "^1.1.1", "printable-characters": "^1.0.42", diff --git a/relay/index.js b/relay/index.js index 3ff22bf..6930109 100644 --- a/relay/index.js +++ b/relay/index.js @@ -10,43 +10,10 @@ const identity = await new Identity('relay', 'default'); const clients = []; -// ==================================== [STP CLIENT] -let client = null; -(function tryConnect() { - client = stp.connect(identity, config.ports.relay, config.addresses.relay); - client.on('ready', () => { - log.success(`connected to ${config.addresses.relay}`); - }) - client.on('error', () => { - log.error(`connection error on ${config.addresses.relay}`) - client = null; - setTimeout(tryConnect, 1000); - }); - client.on('close', () => { - log.error(`connection closed on ${config.addresses.relay}`) - client = null; - setTimeout(tryConnect, 1000); - }); - client.on('data', (data) => { - log.debug(data.toString()); - }) -})(); +// const client = stp.connect(identity, config.ports.relay, '127.0.0.1'); // ==================================== [STP SERVER] -const server = stp.createServer(identity, (client) => { - log.info(`incomming connection from ${client.remoteAddress} - ${client.remoteIdentity}`); - - clients.push(client); - - client.on('close', pruneClients); -}); -server.listen(config.ports.relay); -log.success(`STP server listening on ${config.ports.relay}`); - -function pruneClients() { - clients = clients.filter(client => client.open); -} +const server = stp.createServer(identity, config.ports.relay); // ==================================== [EXPRESS] const express = require('express'); diff --git a/test.js b/test.js new file mode 100644 index 0000000..6fec677 --- /dev/null +++ b/test.js @@ -0,0 +1,39 @@ +// var upnp = require("./upnp"); + +// var myIp = require("ip").address(); + +// var timeout = 30000; //ms + +// upnp.searchGateway(timeout, function(err, gateway) { + +// if (err) throw err; + +// console.log("Found Gateway!"); +// console.log("Fetching External IP ... "); + +// gateway.getExternalIP(function(err, ip) { + +// if (err) throw err; + +// console.log(ip); +// console.log("Mapping port 8888->"+myIp+":8888 ... "); + +// gateway.AddPortMapping( +// "TCP" // or "UDP" +// , 8888 // External port +// , 8888 // Internal Port +// , myIp // Internal Host (ip address of your pc) +// , "YOUR DESCRIPTION" // Description. +// , function(err) { + +// if (err) throw err; + +// console.log("Success"); +// console.log("Done."); + +// }); + +// }); + +// }); + diff --git a/upnp.js b/upnp.js new file mode 100644 index 0000000..5d638a9 --- /dev/null +++ b/upnp.js @@ -0,0 +1,165 @@ +/* node UPNP port forwarding PoC +This is a simple way to forward ports on NAT routers with UPNP. +This is a not-for-production hack that I found useful when testing apps +on my home network behind ny NAT router. +-satori / edited by smolleyes for freebox v6 +usage: (install/clone node-ip from https://github.com/indutny/node-ip) +================================================================================ + +================================================================================ +*/ +var url = require("url"); +var http = require("http"); +var dgram = require("dgram"); +var Buffer = require("buffer").Buffer; + +// some const strings - dont change +const SSDP_PORT = 1901; +const bcast = "239.255.255.250"; +const ST = "urn:schemas-upnp-org:device:InternetGatewayDevice:1"; +const req = "M-SEARCH * HTTP/1.1\r\nHost:239.255.255.250:1900\r\n\ +ST:"+ST+"\r\nMan:\"ssdp:discover\"\r\nMX:3\r\n\r\n"; +const WANIP = "urn:schemas-upnp-org:service:WANIPConnection:1"; +const OK = "HTTP/1.1 200 OK"; +const SOAP_ENV_PRE = "\n\n"; +const SOAP_ENV_POST = "\n\n"; + +function searchGateway(timeout, callback) { + + var self = this; + var reqbuf = new Buffer(req, "ascii"); + var socket = new dgram.Socket('udp4'); + var clients = {}; + var t; + + if (timeout) { + t = setTimeout(function() { + onerror(new Error("searchGateway() timed out")); + }, timeout); + } + + var onlistening = function() { + + console.log('listening?') + + socket.setBroadcast(socket.fd, true); + // send a few packets just in case. + socket.send(reqbuf, 0, reqbuf.length, SSDP_PORT,bcast); + + } + + var onmessage = function(message, rinfo) { + + console.log('message?') + message = message.toString(); + + if (message.substr(0, OK.length) !== OK || + !message.indexOf(ST) || + !message.indexOf("location:")) return; + + var l = url.parse(message.match(/location:(.+?)\r\n/i)[1].trim()); + if (clients[l.href]) return; + + var client = clients[l.href] = http.createClient(l.port, l.hostname); + var request = client.request("GET", l.pathname, {"host": l.hostname}); + request.end(); + request.addListener('response', function (response) { + if (response.statusCode !== 200) return; + var resbuf = ""; + response.addListener('data', function (chunk) { resbuf += chunk }); + response.addListener("end", function() { + resbuf = resbuf.substr(resbuf.indexOf(WANIP) + WANIP.length); + var ipurl = resbuf.match(/(.+?)<\/controlURL>/i)[1].trim() + socket.close(); + clearTimeout(t); + callback(null, new Gateway(l.port, l.hostname, ipurl)); + }); + }); + } + + var onerror = function(err) { + socket.close() ; + clearTimeout(t); + callback(err); + } + + var onclose = function() { + socket.removeListener("listening", onlistening); + socket.removeListener("message", onmessage); + socket.removeListener("close", onclose); + socket.removeListener("error", onerror); + } + + socket.addListener("listening", onlistening); + socket.addListener("message", onmessage); + socket.addListener("close", onclose); + socket.addListener("error", onerror); + + socket.bind(SSDP_PORT); + +} +exports.searchGateway = searchGateway; + +function Gateway(port, host, path) { + this.port = port; + this.host = host; + this.path = path; +} + +Gateway.prototype.getExternalIP = function(callback) { + + var s = + "\ + \n"; + + this._getSOAPResponse(s, "GetExternalIPAddress", function(err, xml) { + if (err) callback(err); + else callback(null, + xml.match(/(.+?)<\/NewExternalIPAddress>/i)[1]); + }); + +} + +Gateway.prototype.AddPortMapping = function(protocol + , extPort + , intPort + , host + , description + , callback) { + var s = + "\ + \ + "+extPort+"\ + "+protocol+"\ + "+intPort+"\ + "+host+"\ + 1\ + "+description+"\ + 0\ + "; + this._getSOAPResponse(s, "AddPortMapping", callback); +} + +Gateway.prototype._getSOAPResponse = function(soap, func, callback) { + var s = [SOAP_ENV_PRE, soap, SOAP_ENV_POST].join(""); + var client = http.createClient(this.port, this.host); + var hdrs = { "host" : this.host + , "SOAPACTION" : "\"" + WANIP + "#" + func + "\"" + , "content-type" : "text/xml" + , "content-length" : s.length }; + var request = client.request("POST", this.path, hdrs); + request.end(s); + request.addListener('response', function (response) { + if (response.statusCode !== 200) { + response.close(); + callback(new Error("Invalid SOAP action")); + return; + } + var buf = ""; + response.addListener('data', function (chunk) { buf += chunk }); + response.addListener('end', function () { callback(null, buf) }); + }); +} diff --git a/yarn.lock b/yarn.lock index d3d3d87..a3f0bed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,6 +17,15 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" @@ -58,20 +67,48 @@ array.prototype.flat@^1.2.3: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -asn1@^0.2.4: +asn1@^0.2.4, asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" dependencies: safer-buffer "~2.1.0" +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + async@0.2.10: version "0.2.10" resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" +async@^2.1.5: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + dependencies: + tweetnacl "^0.14.3" + binary-search-tree@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/binary-search-tree/-/binary-search-tree-0.2.5.tgz#7dbb3b210fdca082450dad2334c304af39bdc784" @@ -111,6 +148,10 @@ call-bind@^1.0.0: function-bind "^1.1.1" get-intrinsic "^1.0.0" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + chalk@^2.3.2, chalk@^2.4.1: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -172,6 +213,12 @@ colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + dependencies: + delayed-stream "~1.0.0" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -198,6 +245,16 @@ cookie@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + debug@2.6.9, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -216,6 +273,10 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -231,6 +292,13 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -417,6 +485,10 @@ express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -425,6 +497,22 @@ external-editor@^3.0.3: iconv-lite "^0.4.24" tmp "^0.0.33" +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -468,6 +556,18 @@ font-ascii@^1.2.1: inquirer "^7.0.0" ramda "^0.26.1" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + forwarded@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" @@ -500,6 +600,12 @@ get-intrinsic@^1.0.0: has "^1.0.3" has-symbols "^1.0.1" +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" @@ -511,6 +617,17 @@ gradient-string@^1.2.0: chalk "^2.4.1" tinygradient "^0.4.1" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -553,6 +670,14 @@ http-errors@~1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + human-readable-ids@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/human-readable-ids/-/human-readable-ids-1.0.4.tgz#41b3a2a6966636e104e41e0673b984b36dfde202" @@ -599,6 +724,10 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" +ip@^1.1.4, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" @@ -645,10 +774,22 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + isarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -657,6 +798,18 @@ json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -669,6 +822,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + keyv-file@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/keyv-file/-/keyv-file-0.2.0.tgz#3442b07a00c1d7bd0242f4a91bcf498afbd6ea6a" @@ -724,7 +886,7 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash@^4.17.19: +lodash@^4.17.14, lodash@^4.17.19: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" @@ -744,6 +906,16 @@ mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + dependencies: + mime-db "1.45.0" + mime-types@~2.1.24: version "2.1.27" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" @@ -790,6 +962,15 @@ mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" +nat-upnp@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/nat-upnp/-/nat-upnp-1.1.1.tgz#b18365e4faf44652549bb593c69e6b690df22043" + dependencies: + async "^2.1.5" + ip "^1.1.4" + request "^2.79.0" + xml2js "~0.1.14" + nedb@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/nedb/-/nedb-1.8.0.tgz#0e3502cd82c004d5355a43c9e55577bd7bd91d88" @@ -819,6 +1000,10 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + object-inspect@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" @@ -912,6 +1097,10 @@ path-type@^2.0.0: dependencies: pify "^2.0.0" +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -944,10 +1133,22 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + qs@6.7.0: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + ramda@^0.26.1: version "0.26.1" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" @@ -984,6 +1185,31 @@ regexpp@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" +request@^2.79.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -1016,10 +1242,18 @@ safe-buffer@5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@~2.1.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" +sax@>=0.1.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + "semver@2 || 3 || 4 || 5": version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -1093,6 +1327,20 @@ spdx-license-ids@^3.0.0: version "3.0.6" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz#c80757383c28abf7296744998cbc106ae8b854ce" +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + "statuses@>= 1.5.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" @@ -1170,6 +1418,13 @@ toidentifier@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + tsconfig-paths@^3.9.0: version "3.9.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" @@ -1183,6 +1438,16 @@ tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + type-fest@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" @@ -1206,10 +1471,20 @@ unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + dependencies: + punycode "^2.1.0" + utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -1221,6 +1496,14 @@ vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -1229,6 +1512,12 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +xml2js@~0.1.14: + version "0.1.14" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.1.14.tgz#5274e67f5a64c5f92974cd85139e0332adc6b90c" + dependencies: + sax ">=0.1.1" + y18n@^5.0.2: version "5.0.5" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18"