Tons of Solutions Engineering work done today for the rest of the CS team! Headway, Howard Hanna, Engels, Brighton, etc. Also completed Datasnippers auth flow and worked on Anthology's script. Cloned Anthology's courses (900..) and will clone Full Story on Monday.
This commit is contained in:
22
Scripts/node_modules/socks-proxy-agent/dist/index.d.ts
generated
vendored
Normal file
22
Scripts/node_modules/socks-proxy-agent/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { SocksProxy } from 'socks';
|
||||
import { Agent, AgentConnectOpts } from 'agent-base';
|
||||
import * as net from 'net';
|
||||
import * as http from 'http';
|
||||
import { URL } from 'url';
|
||||
export type SocksProxyAgentOptions = Omit<SocksProxy, 'ipaddress' | 'host' | 'port' | 'type' | 'userId' | 'password'> & http.AgentOptions;
|
||||
export declare class SocksProxyAgent extends Agent {
|
||||
static protocols: readonly ["socks", "socks4", "socks4a", "socks5", "socks5h"];
|
||||
readonly shouldLookup: boolean;
|
||||
readonly proxy: SocksProxy;
|
||||
timeout: number | null;
|
||||
constructor(uri: string | URL, opts?: SocksProxyAgentOptions);
|
||||
/**
|
||||
* Initiates a SOCKS connection to the specified SOCKS proxy server,
|
||||
* which in turn connects to the specified remote host and port.
|
||||
*/
|
||||
connect(req: http.ClientRequest, opts: AgentConnectOpts): Promise<net.Socket>;
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
Scripts/node_modules/socks-proxy-agent/dist/index.d.ts.map
generated
vendored
Normal file
1
Scripts/node_modules/socks-proxy-agent/dist/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAe,UAAU,EAAsB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGrD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAkE1B,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACxC,UAAU,EAEV,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAC9D,GACA,IAAI,CAAC,YAAY,CAAC;AAEnB,qBAAa,eAAgB,SAAQ,KAAK;IACzC,MAAM,CAAC,SAAS,+DAML;IAEX,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEX,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,sBAAsB;IAW5D;;;OAGG;IACG,OAAO,CACZ,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,IAAI,EAAE,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;CAsEtB"}
|
||||
182
Scripts/node_modules/socks-proxy-agent/dist/index.js
generated
vendored
Normal file
182
Scripts/node_modules/socks-proxy-agent/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SocksProxyAgent = void 0;
|
||||
const socks_1 = require("socks");
|
||||
const agent_base_1 = require("agent-base");
|
||||
const debug_1 = __importDefault(require("debug"));
|
||||
const dns = __importStar(require("dns"));
|
||||
const net = __importStar(require("net"));
|
||||
const tls = __importStar(require("tls"));
|
||||
const url_1 = require("url");
|
||||
const debug = (0, debug_1.default)('socks-proxy-agent');
|
||||
function parseSocksURL(url) {
|
||||
let lookup = false;
|
||||
let type = 5;
|
||||
const host = url.hostname;
|
||||
// From RFC 1928, Section 3: https://tools.ietf.org/html/rfc1928#section-3
|
||||
// "The SOCKS service is conventionally located on TCP port 1080"
|
||||
const port = parseInt(url.port, 10) || 1080;
|
||||
// figure out if we want socks v4 or v5, based on the "protocol" used.
|
||||
// Defaults to 5.
|
||||
switch (url.protocol.replace(':', '')) {
|
||||
case 'socks4':
|
||||
lookup = true;
|
||||
type = 4;
|
||||
break;
|
||||
// pass through
|
||||
case 'socks4a':
|
||||
type = 4;
|
||||
break;
|
||||
case 'socks5':
|
||||
lookup = true;
|
||||
type = 5;
|
||||
break;
|
||||
// pass through
|
||||
case 'socks': // no version specified, default to 5h
|
||||
type = 5;
|
||||
break;
|
||||
case 'socks5h':
|
||||
type = 5;
|
||||
break;
|
||||
default:
|
||||
throw new TypeError(`A "socks" protocol must be specified! Got: ${String(url.protocol)}`);
|
||||
}
|
||||
const proxy = {
|
||||
host,
|
||||
port,
|
||||
type,
|
||||
};
|
||||
if (url.username) {
|
||||
Object.defineProperty(proxy, 'userId', {
|
||||
value: decodeURIComponent(url.username),
|
||||
enumerable: false,
|
||||
});
|
||||
}
|
||||
if (url.password != null) {
|
||||
Object.defineProperty(proxy, 'password', {
|
||||
value: decodeURIComponent(url.password),
|
||||
enumerable: false,
|
||||
});
|
||||
}
|
||||
return { lookup, proxy };
|
||||
}
|
||||
class SocksProxyAgent extends agent_base_1.Agent {
|
||||
constructor(uri, opts) {
|
||||
super(opts);
|
||||
const url = typeof uri === 'string' ? new url_1.URL(uri) : uri;
|
||||
const { proxy, lookup } = parseSocksURL(url);
|
||||
this.shouldLookup = lookup;
|
||||
this.proxy = proxy;
|
||||
this.timeout = opts?.timeout ?? null;
|
||||
}
|
||||
/**
|
||||
* Initiates a SOCKS connection to the specified SOCKS proxy server,
|
||||
* which in turn connects to the specified remote host and port.
|
||||
*/
|
||||
async connect(req, opts) {
|
||||
const { shouldLookup, proxy, timeout } = this;
|
||||
if (!opts.host) {
|
||||
throw new Error('No `host` defined!');
|
||||
}
|
||||
let { host } = opts;
|
||||
const { port, lookup: lookupFn = dns.lookup } = opts;
|
||||
if (shouldLookup) {
|
||||
// Client-side DNS resolution for "4" and "5" socks proxy versions.
|
||||
host = await new Promise((resolve, reject) => {
|
||||
// Use the request's custom lookup, if one was configured:
|
||||
lookupFn(host, {}, (err, res) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
const socksOpts = {
|
||||
proxy,
|
||||
destination: {
|
||||
host,
|
||||
port: typeof port === 'number' ? port : parseInt(port, 10),
|
||||
},
|
||||
command: 'connect',
|
||||
timeout: timeout ?? undefined,
|
||||
};
|
||||
const cleanup = (tlsSocket) => {
|
||||
req.destroy();
|
||||
socket.destroy();
|
||||
if (tlsSocket)
|
||||
tlsSocket.destroy();
|
||||
};
|
||||
debug('Creating socks proxy connection: %o', socksOpts);
|
||||
const { socket } = await socks_1.SocksClient.createConnection(socksOpts);
|
||||
debug('Successfully created socks proxy connection');
|
||||
if (timeout !== null) {
|
||||
socket.setTimeout(timeout);
|
||||
socket.on('timeout', () => cleanup());
|
||||
}
|
||||
if (opts.secureEndpoint) {
|
||||
// The proxy is connecting to a TLS server, so upgrade
|
||||
// this socket connection to a TLS connection.
|
||||
debug('Upgrading socket connection to TLS');
|
||||
const servername = opts.servername || opts.host;
|
||||
const tlsSocket = tls.connect({
|
||||
...omit(opts, 'host', 'path', 'port'),
|
||||
socket,
|
||||
servername: net.isIP(servername) ? undefined : servername,
|
||||
});
|
||||
tlsSocket.once('error', (error) => {
|
||||
debug('Socket TLS error', error.message);
|
||||
cleanup(tlsSocket);
|
||||
});
|
||||
return tlsSocket;
|
||||
}
|
||||
return socket;
|
||||
}
|
||||
}
|
||||
SocksProxyAgent.protocols = [
|
||||
'socks',
|
||||
'socks4',
|
||||
'socks4a',
|
||||
'socks5',
|
||||
'socks5h',
|
||||
];
|
||||
exports.SocksProxyAgent = SocksProxyAgent;
|
||||
function omit(obj, ...keys) {
|
||||
const ret = {};
|
||||
let key;
|
||||
for (key in obj) {
|
||||
if (!keys.includes(key)) {
|
||||
ret[key] = obj[key];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
Scripts/node_modules/socks-proxy-agent/dist/index.js.map
generated
vendored
Normal file
1
Scripts/node_modules/socks-proxy-agent/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAoE;AACpE,2CAAqD;AACrD,kDAAgC;AAChC,yCAA2B;AAC3B,yCAA2B;AAC3B,yCAA2B;AAE3B,6BAA0B;AAE1B,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAC;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