Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Zero-copy TLS protocol for the web 🏎️ (JS + WebAssembly)

NotificationsYou must be signed in to change notification settings

hazae41/cadenas

Repository files navigation

npm i @hazae41/cadenas

Node Package 📦

DO NOT USE

This is experimental software in early development

  1. It has security issues
  2. Things change quickly

Features

Current features

  • 100% TypeScript and ESM
  • Zero-copy reading and writing
  • Transport agnostic (HTTP, WebSocket)
  • WebStreams based backpressure
  • Common CA Database certificates
  • TLS 1.2
  • TLS 1.3
  • Zero RTT

Usage

import{TlsClientDuplex,Ciphers}from"@hazae41/cadenas"functionencrypt(tcp:ReadableWritablePair<Opaque,Writable>):ReadableWritablePair<Opaque,Writable>{constciphers=[Ciphers.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]consttls=newTlsClientDuplex({host_name:"example.com", ciphers})tcp.readable.pipeTo(tls.inner.writable).catch(()=>{})tls.inner.readable.pipeTo(tcp.writable).catch(()=>{})returntls.outer}

[8]ページ先頭

©2009-2025 Movatter.jp