0.4.4 • Published 1 month ago

@hazae41/echalote v0.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago
npm i @hazae41/echalote

Node Package 📦Online Demo 🌐Next.js CodeSandbox 🪣

Use at your own risk

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
  • Works in the browser
  • All cryptography use either WebCrypto or reproducible WebAssembly ports of Rust implementations
  • Unsafe Tor protocol (with Ed25519, ntor, kdf-tor)
  • Meek (HTTP) transport (without domain-fronting)
  • Snowflake (WebRTC/WebSocket) transport (without domain-fronting)
  • Unsafe TLS using Cadenas
  • HTTP and WebSocket messaging using Fleche

Upcoming features

  • Better security

Usage

import { createWebSocketSnowflakeStream, TorClientDuplex, Consensus } from "@hazae41/echalote"
import { Ciphers, TlsClientDuplex } from "@hazae41/cadenas"

const tcp = await createWebSocketSnowflakeStream("wss://snowflake.bamsoftware.com/")
const tor = new TorClientDuplex()

tcp.outer.readable.pipeTo(tor.inner.writable).catch(() => {})
tor.inner.readable.pipeTo(tcp.outer.writable).catch(() => {})

await tor.waitOrThrow()

using circuit = await tor.createOrThrow()
const consensus = await Consensus.fetchOrThrow(circuit)

const middles = consensus.microdescs.filter(it => true
  && it.flags.includes("Fast")
  && it.flags.includes("Stable")
  && it.flags.includes("V2Dir"))

const exits = consensus.microdescs.filter(it => true
  && it.flags.includes("Fast")
  && it.flags.includes("Stable")
  && it.flags.includes("Exit")
  && !it.flags.includes("BadExit"))

const middle = middles[Math.floor(Math.random() * middles.length)]
const middle2 = await Consensus.Microdesc.fetchOrThrow(circuit, middle)
await circuit.extendOrThrow(middle2, AbortSignal.timeout(5000))

const exit = exits[Math.floor(Math.random() * middles.length)]
const exit2 = await Consensus.Microdesc.fetchOrThrow(circuit, exit)
await circuit.extendOrThrow(exit2, AbortSignal.timeout(5000))

const ttcp = await circuit.openOrThrow("twitter.com", 443)

const ciphers = [Ciphers.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
const ttls = new TlsClientDuplex({ host_name: url.hostname, ciphers })

ttcp.outer.readable.pipeTo(ttls.inner.writable).catch(() => { })
ttls.inner.readable.pipeTo(ttcp.outer.writable).catch(() => { })

const response = await fetch("https://twitter.com", { stream: ttls.outer })
const text = await response.text()
0.4.4

1 month ago

0.4.3

1 month ago

0.4.2

2 months ago

0.4.1

2 months ago

0.4.0

2 months ago

0.3.9

3 months ago

0.3.12

3 months ago

0.3.11

3 months ago

0.3.10

3 months ago

0.3.8-0

5 months ago

0.3.8

5 months ago

0.3.7

5 months ago

0.3.6

5 months ago

0.3.5

5 months ago

0.3.2

5 months ago

0.3.4

5 months ago

0.3.3

5 months ago

0.3.2-1

5 months ago

0.3.2-0

5 months ago

0.3.0

5 months ago

0.3.1

5 months ago

0.2.84

6 months ago

0.2.83

7 months ago

0.2.82

7 months ago

0.2.81

7 months ago

0.2.80

7 months ago

0.2.74

8 months ago

0.2.73

8 months ago

0.2.72

8 months ago

0.2.71

8 months ago

0.2.70

8 months ago

0.2.66-0

8 months ago

0.2.79

7 months ago

0.2.78

7 months ago

0.2.77

7 months ago

0.2.76

7 months ago

0.2.75

7 months ago

0.2.63

8 months ago

0.2.62

8 months ago

0.2.61

8 months ago

0.2.60

9 months ago

0.2.69

8 months ago

0.2.68

8 months ago

0.2.67

8 months ago

0.2.65

8 months ago

0.2.64

8 months ago

0.2.67-3

8 months ago

0.2.67-2

8 months ago

0.2.67-5

8 months ago

0.2.67-4

8 months ago

0.2.59

9 months ago

0.2.67-1

8 months ago

0.2.58

9 months ago

0.2.57

9 months ago

0.2.56

10 months ago

0.2.55

10 months ago

0.2.54

10 months ago

0.2.53-2

11 months ago

0.2.53-1

11 months ago

0.2.53-0

11 months ago

0.2.52

11 months ago

0.2.51

11 months ago

0.2.50

11 months ago

0.2.53

11 months ago

0.2.41

11 months ago

0.2.40

11 months ago

0.2.49

11 months ago

0.2.48

11 months ago

0.2.47

11 months ago

0.2.46

11 months ago

0.2.45

11 months ago

0.2.44

11 months ago

0.2.43

11 months ago

0.2.42

11 months ago

0.2.39

12 months ago

0.2.38

12 months ago

0.2.37

12 months ago

0.2.27

1 year ago

0.2.25

1 year ago

0.2.24

1 year ago

0.2.24-1

1 year ago

0.2.30

1 year ago

0.2.24-0

1 year ago

0.2.36

1 year ago

0.2.35

1 year ago

0.2.33

1 year ago

0.2.31

1 year ago

0.2.29

1 year ago

0.2.28

1 year ago

0.2.23

1 year ago

0.2.22

1 year ago

0.2.21

1 year ago

0.2.20

1 year ago

0.2.19

1 year ago

0.2.23-2

1 year ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.23-0

1 year ago

0.2.16

1 year ago

0.2.23-1

1 year ago

0.2.15

1 year ago

0.2.14

1 year ago

0.2.13

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

2 years ago