walter-tls
v1.0.0
Published
Ultra-fast zero-dependency TLS 1.3 pre-warmed socket pool, 1-RTT session resumption & raw HTTP/1.1 zero-copy sniper engine for Node.js
Maintainers
Readme
walter-tls ⚡
Ultra-fast zero-dependency TLS 1.3 Pre-Warmed Socket Pool, 1-RTT Session Resumption, and Zero-Copy Raw HTTP/1.1 Sniper Engine for Node.js.
Designed to pair directly with walter-ws for ultra-low-latency API requests (fire(buf)), automatic OPTIONS keep-alive warming, direct Cloudflare IP + SNI routing (host + servername), and C++ Buffer body extraction without string-splitting overhead.
Installation
npm i walter-tls@latestQuick Usage (with walter-ws)
import WalterTLS, { buildRawRequest } from 'walter-tls';
import WebSocket, { prepareClientFrame, extractString } from 'walter-ws';
// 1. Pre-warm 2 persistent TLS 1.3 sockets directly to IP with SNI & automatic 4000ms OPTIONS keep-alive
const tlsPool = new WalterTLS({
host: '162.159.135.232',
port: 443,
servername: 'canary.discord.com',
size: 2, // SRQ = 2
minVersion: 'TLSv1.3',
ciphers: 'TLS_AES_256_GCM_SHA384',
keepAliveInterval: 4000,
keepAlivePath: '/api/v9/users/@me',
keepAliveHeaders: { Authorization: TOKEN }
});
// Listen for JSON responses extracted in C++ speed
tlsPool.on('json', (jsonString) => {
console.log(jsonString);
});
// 2. Pre-build a raw HTTP/1.1 PATCH Buffer once
const patchBuffer = tlsPool.buildRequest({
method: 'PATCH',
path: `/api/v9/guilds/${GUILD_ID}/vanity-url`,
headers: {
'Authorization': TOKEN,
'X-Discord-MFA-Authorization': mfa,
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0'
},
body: `{"code":"walter"}`
});
// 3. Fire across all warm TLS sockets simultaneously in 0ms!
tlsPool.fire(patchBuffer);