@altronix/tls-terminate

Terminate encrypted traffic from port 33248 and forward to port 33247. Terminate plain text traffic from port 33247 and forward and encrypt traffic to port 33248

Usage no npm install needed!

<script type="module">
  import altronixTlsTerminate from 'https://cdn.skypack.dev/@altronix/tls-terminate';
</script>

README

USAGE

Terminate encrypted traffic from port 33248 and forward to port 33247. Terminate plain text traffic from port 33247 and forward and encrypt traffic to port 33248

import {listen} from "@altronix/tls-terminate"

(async () => {
  listen({
    cert: await fs.readFile("./path/to/cert"),
    key: await fs.readFile("./path/to/key"),
    tcp: 33247,
    tcps: 33248
  })
})()