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:
114
Scripts/node_modules/socks/build/common/constants.js
generated
vendored
Normal file
114
Scripts/node_modules/socks/build/common/constants.js
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SOCKS5_NO_ACCEPTABLE_AUTH = exports.SOCKS5_CUSTOM_AUTH_END = exports.SOCKS5_CUSTOM_AUTH_START = exports.SOCKS_INCOMING_PACKET_SIZES = exports.SocksClientState = exports.Socks5Response = exports.Socks5HostType = exports.Socks5Auth = exports.Socks4Response = exports.SocksCommand = exports.ERRORS = exports.DEFAULT_TIMEOUT = void 0;
|
||||
const DEFAULT_TIMEOUT = 30000;
|
||||
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
|
||||
// prettier-ignore
|
||||
const ERRORS = {
|
||||
InvalidSocksCommand: 'An invalid SOCKS command was provided. Valid options are connect, bind, and associate.',
|
||||
InvalidSocksCommandForOperation: 'An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.',
|
||||
InvalidSocksCommandChain: 'An invalid SOCKS command was provided. Chaining currently only supports the connect command.',
|
||||
InvalidSocksClientOptionsDestination: 'An invalid destination host was provided.',
|
||||
InvalidSocksClientOptionsExistingSocket: 'An invalid existing socket was provided. This should be an instance of stream.Duplex.',
|
||||
InvalidSocksClientOptionsProxy: 'Invalid SOCKS proxy details were provided.',
|
||||
InvalidSocksClientOptionsTimeout: 'An invalid timeout value was provided. Please enter a value above 0 (in ms).',
|
||||
InvalidSocksClientOptionsProxiesLength: 'At least two socks proxies must be provided for chaining.',
|
||||
InvalidSocksClientOptionsCustomAuthRange: 'Custom auth must be a value between 0x80 and 0xFE.',
|
||||
InvalidSocksClientOptionsCustomAuthOptions: 'When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.',
|
||||
NegotiationError: 'Negotiation error',
|
||||
SocketClosed: 'Socket closed',
|
||||
ProxyConnectionTimedOut: 'Proxy connection timed out',
|
||||
InternalError: 'SocksClient internal error (this should not happen)',
|
||||
InvalidSocks4HandshakeResponse: 'Received invalid Socks4 handshake response',
|
||||
Socks4ProxyRejectedConnection: 'Socks4 Proxy rejected connection',
|
||||
InvalidSocks4IncomingConnectionResponse: 'Socks4 invalid incoming connection response',
|
||||
Socks4ProxyRejectedIncomingBoundConnection: 'Socks4 Proxy rejected incoming bound connection',
|
||||
InvalidSocks5InitialHandshakeResponse: 'Received invalid Socks5 initial handshake response',
|
||||
InvalidSocks5IntiailHandshakeSocksVersion: 'Received invalid Socks5 initial handshake (invalid socks version)',
|
||||
InvalidSocks5InitialHandshakeNoAcceptedAuthType: 'Received invalid Socks5 initial handshake (no accepted authentication type)',
|
||||
InvalidSocks5InitialHandshakeUnknownAuthType: 'Received invalid Socks5 initial handshake (unknown authentication type)',
|
||||
Socks5AuthenticationFailed: 'Socks5 Authentication failed',
|
||||
InvalidSocks5FinalHandshake: 'Received invalid Socks5 final handshake response',
|
||||
InvalidSocks5FinalHandshakeRejected: 'Socks5 proxy rejected connection',
|
||||
InvalidSocks5IncomingConnectionResponse: 'Received invalid Socks5 incoming connection response',
|
||||
Socks5ProxyRejectedIncomingBoundConnection: 'Socks5 Proxy rejected incoming bound connection',
|
||||
};
|
||||
exports.ERRORS = ERRORS;
|
||||
const SOCKS_INCOMING_PACKET_SIZES = {
|
||||
Socks5InitialHandshakeResponse: 2,
|
||||
Socks5UserPassAuthenticationResponse: 2,
|
||||
// Command response + incoming connection (bind)
|
||||
Socks5ResponseHeader: 5,
|
||||
Socks5ResponseIPv4: 10,
|
||||
Socks5ResponseIPv6: 22,
|
||||
Socks5ResponseHostname: (hostNameLength) => hostNameLength + 7,
|
||||
// Command response + incoming connection (bind)
|
||||
Socks4Response: 8, // 2 header + 2 port + 4 ip
|
||||
};
|
||||
exports.SOCKS_INCOMING_PACKET_SIZES = SOCKS_INCOMING_PACKET_SIZES;
|
||||
var SocksCommand;
|
||||
(function (SocksCommand) {
|
||||
SocksCommand[SocksCommand["connect"] = 1] = "connect";
|
||||
SocksCommand[SocksCommand["bind"] = 2] = "bind";
|
||||
SocksCommand[SocksCommand["associate"] = 3] = "associate";
|
||||
})(SocksCommand || (SocksCommand = {}));
|
||||
exports.SocksCommand = SocksCommand;
|
||||
var Socks4Response;
|
||||
(function (Socks4Response) {
|
||||
Socks4Response[Socks4Response["Granted"] = 90] = "Granted";
|
||||
Socks4Response[Socks4Response["Failed"] = 91] = "Failed";
|
||||
Socks4Response[Socks4Response["Rejected"] = 92] = "Rejected";
|
||||
Socks4Response[Socks4Response["RejectedIdent"] = 93] = "RejectedIdent";
|
||||
})(Socks4Response || (Socks4Response = {}));
|
||||
exports.Socks4Response = Socks4Response;
|
||||
var Socks5Auth;
|
||||
(function (Socks5Auth) {
|
||||
Socks5Auth[Socks5Auth["NoAuth"] = 0] = "NoAuth";
|
||||
Socks5Auth[Socks5Auth["GSSApi"] = 1] = "GSSApi";
|
||||
Socks5Auth[Socks5Auth["UserPass"] = 2] = "UserPass";
|
||||
})(Socks5Auth || (Socks5Auth = {}));
|
||||
exports.Socks5Auth = Socks5Auth;
|
||||
const SOCKS5_CUSTOM_AUTH_START = 0x80;
|
||||
exports.SOCKS5_CUSTOM_AUTH_START = SOCKS5_CUSTOM_AUTH_START;
|
||||
const SOCKS5_CUSTOM_AUTH_END = 0xfe;
|
||||
exports.SOCKS5_CUSTOM_AUTH_END = SOCKS5_CUSTOM_AUTH_END;
|
||||
const SOCKS5_NO_ACCEPTABLE_AUTH = 0xff;
|
||||
exports.SOCKS5_NO_ACCEPTABLE_AUTH = SOCKS5_NO_ACCEPTABLE_AUTH;
|
||||
var Socks5Response;
|
||||
(function (Socks5Response) {
|
||||
Socks5Response[Socks5Response["Granted"] = 0] = "Granted";
|
||||
Socks5Response[Socks5Response["Failure"] = 1] = "Failure";
|
||||
Socks5Response[Socks5Response["NotAllowed"] = 2] = "NotAllowed";
|
||||
Socks5Response[Socks5Response["NetworkUnreachable"] = 3] = "NetworkUnreachable";
|
||||
Socks5Response[Socks5Response["HostUnreachable"] = 4] = "HostUnreachable";
|
||||
Socks5Response[Socks5Response["ConnectionRefused"] = 5] = "ConnectionRefused";
|
||||
Socks5Response[Socks5Response["TTLExpired"] = 6] = "TTLExpired";
|
||||
Socks5Response[Socks5Response["CommandNotSupported"] = 7] = "CommandNotSupported";
|
||||
Socks5Response[Socks5Response["AddressNotSupported"] = 8] = "AddressNotSupported";
|
||||
})(Socks5Response || (Socks5Response = {}));
|
||||
exports.Socks5Response = Socks5Response;
|
||||
var Socks5HostType;
|
||||
(function (Socks5HostType) {
|
||||
Socks5HostType[Socks5HostType["IPv4"] = 1] = "IPv4";
|
||||
Socks5HostType[Socks5HostType["Hostname"] = 3] = "Hostname";
|
||||
Socks5HostType[Socks5HostType["IPv6"] = 4] = "IPv6";
|
||||
})(Socks5HostType || (Socks5HostType = {}));
|
||||
exports.Socks5HostType = Socks5HostType;
|
||||
var SocksClientState;
|
||||
(function (SocksClientState) {
|
||||
SocksClientState[SocksClientState["Created"] = 0] = "Created";
|
||||
SocksClientState[SocksClientState["Connecting"] = 1] = "Connecting";
|
||||
SocksClientState[SocksClientState["Connected"] = 2] = "Connected";
|
||||
SocksClientState[SocksClientState["SentInitialHandshake"] = 3] = "SentInitialHandshake";
|
||||
SocksClientState[SocksClientState["ReceivedInitialHandshakeResponse"] = 4] = "ReceivedInitialHandshakeResponse";
|
||||
SocksClientState[SocksClientState["SentAuthentication"] = 5] = "SentAuthentication";
|
||||
SocksClientState[SocksClientState["ReceivedAuthenticationResponse"] = 6] = "ReceivedAuthenticationResponse";
|
||||
SocksClientState[SocksClientState["SentFinalHandshake"] = 7] = "SentFinalHandshake";
|
||||
SocksClientState[SocksClientState["ReceivedFinalResponse"] = 8] = "ReceivedFinalResponse";
|
||||
SocksClientState[SocksClientState["BoundWaitingForConnection"] = 9] = "BoundWaitingForConnection";
|
||||
SocksClientState[SocksClientState["Established"] = 10] = "Established";
|
||||
SocksClientState[SocksClientState["Disconnected"] = 11] = "Disconnected";
|
||||
SocksClientState[SocksClientState["Error"] = 99] = "Error";
|
||||
})(SocksClientState || (SocksClientState = {}));
|
||||
exports.SocksClientState = SocksClientState;
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
Scripts/node_modules/socks/build/common/constants.js.map
generated
vendored
Normal file
1
Scripts/node_modules/socks/build/common/constants.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";;;AAIA,MAAM,eAAe,GAAG,KAAK,CAAC;AA4M5B,0CAAe;AAxMjB,kBAAkB;AAClB,MAAM,MAAM,GAAG;IACb,mBAAmB,EAAE,wFAAwF;IAC7G,+BAA+B,EAAE,oGAAoG;IACrI,wBAAwB,EAAE,8FAA8F;IACxH,oCAAoC,EAAE,2CAA2C;IACjF,uCAAuC,EAAE,uFAAuF;IAChI,8BAA8B,EAAE,4CAA4C;IAC5E,gCAAgC,EAAE,8EAA8E;IAChH,sCAAsC,EAAE,2DAA2D;IACnG,wCAAwC,EAAE,oDAAoD;IAC9F,0CAA0C,EAAE,kKAAkK;IAC9M,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,uBAAuB,EAAE,4BAA4B;IACrD,aAAa,EAAE,qDAAqD;IACpE,8BAA8B,EAAE,4CAA4C;IAC5E,6BAA6B,EAAE,kCAAkC;IACjE,uCAAuC,EAAE,6CAA6C;IACtF,0CAA0C,EAAE,iDAAiD;IAC7F,qCAAqC,EAAE,oDAAoD;IAC3F,yCAAyC,EAAE,mEAAmE;IAC9G,+CAA+C,EAAE,6EAA6E;IAC9H,4CAA4C,EAAE,yEAAyE;IACvH,0BAA0B,EAAE,8BAA8B;IAC1D,2BAA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EAAsB,CAAA;IACtB,6EAAwB,CAAA;IACxB,+DAAiB,CAAA;IACjB,iFAA0B,CAAA;IAC1B,iFAA0B,CAAA;AAC5B,CAAC,EAVI,cAAc,KAAd,cAAc,QAUlB;AAgIC,wCAAc;AA9HhB,IAAK,cAIJ;AAJD,WAAK,cAAc;IACjB,mDAAW,CAAA;IACX,2DAAe,CAAA;IACf,mDAAW,CAAA;AACb,CAAC,EAJI,cAAc,KAAd,cAAc,QAIlB;AAyHC,wCAAc;AAvHhB,IAAK,gBAcJ;AAdD,WAAK,gBAAgB;IACnB,6DAAW,CAAA;IACX,mEAAc,CAAA;IACd,iEAAa,CAAA;IACb,uFAAwB,CAAA;IACxB,+GAAoC,CAAA;IACpC,mFAAsB,CAAA;IACtB,2GAAkC,CAAA;IAClC,mFAAsB,CAAA;IACtB,yFAAyB,CAAA;IACzB,iGAA6B,CAAA;IAC7B,sEAAgB,CAAA;IAChB,wEAAiB,CAAA;IACjB,0DAAU,CAAA;AACZ,CAAC,EAdI,gBAAgB,KAAhB,gBAAgB,QAcpB;AA2GC,4CAAgB"}
|
||||
128
Scripts/node_modules/socks/build/common/helpers.js
generated
vendored
Normal file
128
Scripts/node_modules/socks/build/common/helpers.js
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateSocksClientChainOptions = exports.validateSocksClientOptions = void 0;
|
||||
const util_1 = require("./util");
|
||||
const constants_1 = require("./constants");
|
||||
const stream = require("stream");
|
||||
/**
|
||||
* Validates the provided SocksClientOptions
|
||||
* @param options { SocksClientOptions }
|
||||
* @param acceptedCommands { string[] } A list of accepted SocksProxy commands.
|
||||
*/
|
||||
function validateSocksClientOptions(options, acceptedCommands = ['connect', 'bind', 'associate']) {
|
||||
// Check SOCKs command option.
|
||||
if (!constants_1.SocksCommand[options.command]) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommand, options);
|
||||
}
|
||||
// Check SocksCommand for acceptable command.
|
||||
if (acceptedCommands.indexOf(options.command) === -1) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandForOperation, options);
|
||||
}
|
||||
// Check destination
|
||||
if (!isValidSocksRemoteHost(options.destination)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options);
|
||||
}
|
||||
// Check SOCKS proxy to use
|
||||
if (!isValidSocksProxy(options.proxy)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options);
|
||||
}
|
||||
// Validate custom auth (if set)
|
||||
validateCustomProxyAuth(options.proxy, options);
|
||||
// Check timeout
|
||||
if (options.timeout && !isValidTimeoutValue(options.timeout)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options);
|
||||
}
|
||||
// Check existing_socket (if provided)
|
||||
if (options.existing_socket &&
|
||||
!(options.existing_socket instanceof stream.Duplex)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsExistingSocket, options);
|
||||
}
|
||||
}
|
||||
exports.validateSocksClientOptions = validateSocksClientOptions;
|
||||
/**
|
||||
* Validates the SocksClientChainOptions
|
||||
* @param options { SocksClientChainOptions }
|
||||
*/
|
||||
function validateSocksClientChainOptions(options) {
|
||||
// Only connect is supported when chaining.
|
||||
if (options.command !== 'connect') {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksCommandChain, options);
|
||||
}
|
||||
// Check destination
|
||||
if (!isValidSocksRemoteHost(options.destination)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsDestination, options);
|
||||
}
|
||||
// Validate proxies (length)
|
||||
if (!(options.proxies &&
|
||||
Array.isArray(options.proxies) &&
|
||||
options.proxies.length >= 2)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxiesLength, options);
|
||||
}
|
||||
// Validate proxies
|
||||
options.proxies.forEach((proxy) => {
|
||||
if (!isValidSocksProxy(proxy)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsProxy, options);
|
||||
}
|
||||
// Validate custom auth (if set)
|
||||
validateCustomProxyAuth(proxy, options);
|
||||
});
|
||||
// Check timeout
|
||||
if (options.timeout && !isValidTimeoutValue(options.timeout)) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsTimeout, options);
|
||||
}
|
||||
}
|
||||
exports.validateSocksClientChainOptions = validateSocksClientChainOptions;
|
||||
function validateCustomProxyAuth(proxy, options) {
|
||||
if (proxy.custom_auth_method !== undefined) {
|
||||
// Invalid auth method range
|
||||
if (proxy.custom_auth_method < constants_1.SOCKS5_CUSTOM_AUTH_START ||
|
||||
proxy.custom_auth_method > constants_1.SOCKS5_CUSTOM_AUTH_END) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthRange, options);
|
||||
}
|
||||
// Missing custom_auth_request_handler
|
||||
if (proxy.custom_auth_request_handler === undefined ||
|
||||
typeof proxy.custom_auth_request_handler !== 'function') {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
|
||||
}
|
||||
// Missing custom_auth_response_size
|
||||
if (proxy.custom_auth_response_size === undefined) {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
|
||||
}
|
||||
// Missing/invalid custom_auth_response_handler
|
||||
if (proxy.custom_auth_response_handler === undefined ||
|
||||
typeof proxy.custom_auth_response_handler !== 'function') {
|
||||
throw new util_1.SocksClientError(constants_1.ERRORS.InvalidSocksClientOptionsCustomAuthOptions, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Validates a SocksRemoteHost
|
||||
* @param remoteHost { SocksRemoteHost }
|
||||
*/
|
||||
function isValidSocksRemoteHost(remoteHost) {
|
||||
return (remoteHost &&
|
||||
typeof remoteHost.host === 'string' &&
|
||||
typeof remoteHost.port === 'number' &&
|
||||
remoteHost.port >= 0 &&
|
||||
remoteHost.port <= 65535);
|
||||
}
|
||||
/**
|
||||
* Validates a SocksProxy
|
||||
* @param proxy { SocksProxy }
|
||||
*/
|
||||
function isValidSocksProxy(proxy) {
|
||||
return (proxy &&
|
||||
(typeof proxy.host === 'string' || typeof proxy.ipaddress === 'string') &&
|
||||
typeof proxy.port === 'number' &&
|
||||
proxy.port >= 0 &&
|
||||
proxy.port <= 65535 &&
|
||||
(proxy.type === 4 || proxy.type === 5));
|
||||
}
|
||||
/**
|
||||
* Validates a timeout value.
|
||||
* @param value { Number }
|
||||
*/
|
||||
function isValidTimeoutValue(value) {
|
||||
return typeof value === 'number' && value > 0;
|
||||
}
|
||||
//# sourceMappingURL=helpers.js.map
|
||||
1
Scripts/node_modules/socks/build/common/helpers.js.map
generated
vendored
Normal file
1
Scripts/node_modules/socks/build/common/helpers.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/common/helpers.ts"],"names":[],"mappings":";;;AAKA,iCAAwC;AACxC,2CAMqB;AACrB,iCAAiC;AAEjC;;;;GAIG;AACH,SAAS,0BAA0B,CACjC,OAA2B,EAC3B,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAEnD,8BAA8B;IAC9B,IAAI,CAAC,wBAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAClC,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;KACjE;IAED,6CAA6C;IAC7C,IAAI,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;QACpD,MAAM,IAAI,uBAAgB,CAAC,kBAAM,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;KAC7E;I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EAAE;YACjD,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,0CAA0C,EACjD,OAAO,CACR,CAAC;SACH;QAED,+CAA+C;QAC/C,IACE,KAAK,CAAC,4BAA4B,KAAK,SAAS;YAChD,OAAO,KAAK,CAAC,4BAA4B,KAAK,UAAU,EACxD;YACA,MAAM,IAAI,uBAAgB,CACxB,kBAAM,CAAC,0CAA0C,EACjD,OAAO,CACR,CAAC;SACH;KACF;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,sBAAsB,CAAC,UAA2B;IACzD,OAAO,CACL,UAAU;QACV,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;QACnC,UAAU,CAAC,IAAI,IAAI,CAAC;QACpB,UAAU,CAAC,IAAI,IAAI,KAAK,CACzB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAAiB;IAC1C,OAAO,CACL,KAAK;QACL,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC;QACvE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;QAC9B,KAAK,CAAC,IAAI,IAAI,CAAC;QACf,KAAK,CAAC,IAAI,IAAI,KAAK;QACnB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CACvC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;AAChD,CAAC"}
|
||||
43
Scripts/node_modules/socks/build/common/receivebuffer.js
generated
vendored
Normal file
43
Scripts/node_modules/socks/build/common/receivebuffer.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReceiveBuffer = void 0;
|
||||
class ReceiveBuffer {
|
||||
constructor(size = 4096) {
|
||||
this.buffer = Buffer.allocUnsafe(size);
|
||||
this.offset = 0;
|
||||
this.originalSize = size;
|
||||
}
|
||||
get length() {
|
||||
return this.offset;
|
||||
}
|
||||
append(data) {
|
||||
if (!Buffer.isBuffer(data)) {
|
||||
throw new Error('Attempted to append a non-buffer instance to ReceiveBuffer.');
|
||||
}
|
||||
if (this.offset + data.length >= this.buffer.length) {
|
||||
const tmp = this.buffer;
|
||||
this.buffer = Buffer.allocUnsafe(Math.max(this.buffer.length + this.originalSize, this.buffer.length + data.length));
|
||||
tmp.copy(this.buffer);
|
||||
}
|
||||
data.copy(this.buffer, this.offset);
|
||||
return (this.offset += data.length);
|
||||
}
|
||||
peek(length) {
|
||||
if (length > this.offset) {
|
||||
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
|
||||
}
|
||||
return this.buffer.slice(0, length);
|
||||
}
|
||||
get(length) {
|
||||
if (length > this.offset) {
|
||||
throw new Error('Attempted to read beyond the bounds of the managed internal data.');
|
||||
}
|
||||
const value = Buffer.allocUnsafe(length);
|
||||
this.buffer.slice(0, length).copy(value);
|
||||
this.buffer.copyWithin(0, length, length + this.offset - length);
|
||||
this.offset -= length;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
exports.ReceiveBuffer = ReceiveBuffer;
|
||||
//# sourceMappingURL=receivebuffer.js.map
|
||||
1
Scripts/node_modules/socks/build/common/receivebuffer.js.map
generated
vendored
Normal file
1
Scripts/node_modules/socks/build/common/receivebuffer.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"receivebuffer.js","sourceRoot":"","sources":["../../src/common/receivebuffer.ts"],"names":[],"mappings":";;;AAAA,MAAM,aAAa;IAKjB,YAAY,IAAI,GAAG,IAAI;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM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CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;QAEtB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAEO,sCAAa"}
|
||||
25
Scripts/node_modules/socks/build/common/util.js
generated
vendored
Normal file
25
Scripts/node_modules/socks/build/common/util.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.shuffleArray = exports.SocksClientError = void 0;
|
||||
/**
|
||||
* Error wrapper for SocksClient
|
||||
*/
|
||||
class SocksClientError extends Error {
|
||||
constructor(message, options) {
|
||||
super(message);
|
||||
this.options = options;
|
||||
}
|
||||
}
|
||||
exports.SocksClientError = SocksClientError;
|
||||
/**
|
||||
* Shuffles a given array.
|
||||
* @param array The array to shuffle.
|
||||
*/
|
||||
function shuffleArray(array) {
|
||||
for (let i = array.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[array[i], array[j]] = [array[j], array[i]];
|
||||
}
|
||||
}
|
||||
exports.shuffleArray = shuffleArray;
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
Scripts/node_modules/socks/build/common/util.js.map
generated
vendored
Normal file
1
Scripts/node_modules/socks/build/common/util.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/common/util.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,MAAM,gBAAiB,SAAQ,KAAK;IAClC,YACE,OAAe,EACR,OAAqD;QAE5D,KAAK,CAAC,OAAO,CAAC,CAAC;QAFR,YAAO,GAAP,OAAO,CAA8C;IAG9D,CAAC;CACF;AAuBuB,4CAAgB;AArBxC;;;GAGG;AACH,SAAS,YAAY,CAAC,KAAgB;IACpC,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC9C,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAYyC,oCAAY"}
|
||||
Reference in New Issue
Block a user