Options for the TLS connection.
Supports full TLS configuration including custom CA certificates, client certificates, and other TLS settings (same as fetch).
Search the reference...
/
property
Options for the TLS connection.
Supports full TLS configuration including custom CA certificates, client certificates, and other TLS settings (same as fetch).
// Using BunFile for certificates
const ws = new WebSocket("wss:http://example.com", {
tls: {
ca: Bun.file("./ca.pem")
}
});
// Using Buffer
const ws = new WebSocket("wss:http://example.com", {
tls: {
ca: fs.readFileSync("./ca.pem")
}
});
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →