like-a-tls-connection
Advanced tools
Comparing version 0.0.5 to 0.0.9
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Duplex } from "stream"; | ||
@@ -3,0 +5,0 @@ import * as tls from "tls"; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Duplex } from "stream"; | ||
@@ -3,0 +4,0 @@ declare class LatcServerSocket extends Duplex { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { PassThrough, Readable, StreamOptions } from 'stream'; | ||
@@ -3,0 +4,0 @@ declare class Mixer extends PassThrough implements Readable { |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { StreamOptions, Writable } from "stream"; | ||
@@ -3,0 +4,0 @@ declare class Separator extends Writable { |
@@ -5,14 +5,2 @@ import { createHmac } from "crypto"; | ||
class Separator extends Writable { | ||
constructor(algorithm, salt, labeledPacketStream, unlabeledPacketStream, tlsApplicationPacketHeader, options) { | ||
super({ | ||
...options, | ||
defaultEncoding: undefined, | ||
objectMode: true, | ||
}); | ||
this.algorithm = algorithm; | ||
this.salt = salt; | ||
this.tlsApplicationPacketHeader = tlsApplicationPacketHeader ? tlsApplicationPacketHeader : Buffer.from([0x17, 0x03, 0x03]); | ||
this.labeledPacketStream = labeledPacketStream; | ||
this.unlabeledPacketStream = unlabeledPacketStream; | ||
} | ||
verifyAndGetRawPacket(rawPacket, labeledPacketCb, unlabeledPacketCb) { | ||
@@ -36,2 +24,14 @@ const maybeApplicationHeader = rawPacket.subarray(0, this.tlsApplicationPacketHeader.byteLength); | ||
} | ||
constructor(algorithm, salt, labeledPacketStream, unlabeledPacketStream, tlsApplicationPacketHeader, options) { | ||
super({ | ||
...options, | ||
defaultEncoding: undefined, | ||
objectMode: true, | ||
}); | ||
this.algorithm = algorithm; | ||
this.salt = salt; | ||
this.tlsApplicationPacketHeader = tlsApplicationPacketHeader ? tlsApplicationPacketHeader : Buffer.from([0x17, 0x03, 0x03]); | ||
this.labeledPacketStream = labeledPacketStream; | ||
this.unlabeledPacketStream = unlabeledPacketStream; | ||
} | ||
_write(chunk, encoding, callback) { | ||
@@ -38,0 +38,0 @@ if (!lodash.isBuffer(chunk)) |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Duplex, StreamOptions, Transform, TransformCallback } from "stream"; | ||
@@ -3,0 +4,0 @@ declare class TlsPacketParser extends Transform { |
{ | ||
"name": "like-a-tls-connection", | ||
"version": "0.0.5", | ||
"version": "0.0.9", | ||
"description": "hiding a connection under a tls connection", | ||
"main": "dist/src/index.js", | ||
"types": "dist/src/index.d.ts", | ||
"scripts": { | ||
"test": "npx tsc --build && npx mocha", | ||
"build": "npx tsc --build" | ||
}, | ||
"engines": { | ||
@@ -53,3 +49,7 @@ "node": ">16.8.0" | ||
"ts/src/*" | ||
] | ||
} | ||
], | ||
"scripts": { | ||
"test": "tsc --build && mocha", | ||
"build": "npx tsc --build" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43773
413
20
2
0