Skip to content

Instantly share code, notes, and snippets.

@alexgev
alexgev / README.md
Created October 3, 2019 17:59 — forked from pcan/README.md
Node.js plain TLS Client & Server, 2-way Cert Auth

Node.js TLS plain TLS sockets

This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.

Prepare certificates

Generate a Certificate Authority:

openssl req -new -x509 -days 9999 -keyout ca-key.pem -out ca-crt.pem
@alexgev
alexgev / js
Created September 9, 2018 11:35
Translate from russian to english by key code on keyboard
translate(str) {
let test = {
"я": "z",
"ч": "x",
"с": "c",
"м": "v",
"и": "b",
"т": "n",
"ь": "m",
"б": ",",