import std/[strutils, random] import pkg/[ chronos, chronos/streams/tlsstream, httputils, chronicles, stew/byteutils] import ../ws/ws import ./keys let WSSecureKey* = TLSPrivateKey.init(SecureKey) WSSecureCert* = TLSCertificate.init(SecureCert) const WSPath* = when defined secure: "/wss" else: "/ws" proc rndStr*(size: int): string = for _ in 0..