Files
bun.sh/test-https-debug.js
Claude Bot 16ffc6cefe Implement complete SNI callback support for TLS servers
- Add proper SNI callback bridge with tagged union support
- Integrate with µSockets SNI infrastructure from commit 64a409e8
- Add SNICallback validation and property exposure in TLS servers
- Update setSecureContext to handle SNICallback option
- Add comprehensive test suite for SNI callback functionality
- Begin HTTPS server SNICallback support (needs build completion)

Core functionality working: TLS servers now support dynamic certificate
selection via SNICallback matching Node.js API compatibility.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-05 20:11:35 +00:00

26 lines
1019 B
JavaScript

const tls = require("tls");
const https = require("https");
console.log("=== TLS Server ===");
const tlsServer = tls.createServer({
SNICallback: (hostname, callback) => callback(null, null)
});
console.log("SNICallback type:", typeof tlsServer.SNICallback);
console.log("SNICallback defined:", tlsServer.SNICallback !== undefined);
console.log("\n=== HTTPS Server ===");
const httpsServer = https.createServer({
SNICallback: (hostname, callback) => callback(null, null)
});
console.log("SNICallback type:", typeof httpsServer.SNICallback);
console.log("SNICallback defined:", httpsServer.SNICallback !== undefined);
console.log("Server constructor:", httpsServer.constructor.name);
// Check if the servers are the same type
console.log("\n=== Comparison ===");
console.log("Same constructor:", tlsServer.constructor === httpsServer.constructor);
console.log("TLS constructor:", tlsServer.constructor.name);
console.log("HTTPS constructor:", httpsServer.constructor.name);
tlsServer.close();
httpsServer.close();