This Repository implements an Authenticated Websocket Server built in Node Js along ws library.

Overview

websockets-authentication-server

This Repository implements an Authenticated Websocket Server built in Node Js along ws library.

Features

Authenticated connections only

This server only allows authenticated clients to make a WebSocket connection. If an unauthenticated client attempts to connect, the server will destroy the socket connection request and send a 401 Unauthorized response.

Ping messages

To ensure that the connection is still alive, the server sends ping messages to connected clients after regular intervals. This helps to prevent the connection from being terminated due to inactivity.

Heartbeat monitoring

The server monitors the heartbeat status of clients and terminates the connection if it does not receive any response from the client after a certain interval. This ensures that the server can free up resources and prevent idle connections from consuming unnecessary resources.

Getting started

To get started with this server, you'll need to have Node.js and npm installed on your machine. You'll also need to clone this repository to your local machine.

Once you have the repository cloned, you can install the necessary dependencies by running:

npm install

You can then start the server by running:

npm run dev

You might also like...

How to build a chat using Lambda + WebSocket + API Gateway? (nodejs)

How to build a chat using Lambda + WebSocket + API Gateway? (nodejs)

Description Source code for the lambda function from the screencast How to build a chat using Lambda + WebSocket + API Gateway? (nodejs) The reactjs c

Dec 28, 2022

A tiny Nuxt.js module for WebSocket interactions

@deepsource/nuxt-websocket A tiny Nuxt.js module for WebSocket interactions. This module is only compatible with Nuxt v2 at the moment. Setup Add @dee

Dec 6, 2022

A websocket-based reverse shell for XSS attacks.

A websocket-based reverse shell for XSS attacks.

CrossSiteShell A javascript/nodejs "reverse shell" that makes it easier to interact with the victim's browser during XSS attacks. Usage Run the follow

Oct 7, 2022

Um bot feito utilizando a API baileys em WebSocket para o Whatsapp Multi-Devices.

Um bot feito utilizando a API baileys em WebSocket para o Whatsapp Multi-Devices.

Informação 📀 O BaileysBot foi feito utilzando a API Baileys Caso encontre algum BUG, faça um Novo Issue! Requisitos 📝 NodeJS Git Instalação 💾 Para

Dec 3, 2022

Sse-example - SSE (server-sent events) example using Node.js

sse-example SSE (server-sent events) example using Node.js SSE is a easy way to commutate with the client side in a single direction. it has loss cost

Mar 11, 2022

Node.js library to receive live stream chat events like comments and gifts in realtime from TikTok LIVE.

TikTok-Live-Connector A Node.js library to receive live stream events such as comments and gifts in realtime from TikTok LIVE by connecting to TikTok'

Jan 4, 2023

Super-Resolution-CNN - web server for super-resolution CNN

Super-Resolution-CNN - web server for super-resolution CNN

Web Server for Image Super-Resolution This project showcases the Super-Resolution CNN (SRCNN). The model is pretrained following this tutorial. The or

Jan 3, 2022

soketi is your simple, fast, and resilient open-source WebSockets server

soketi is your simple, fast, and resilient open-source WebSockets server

soketi soketi is your simple, fast, and resilient open-source WebSockets server. 📣 Blazing fast speed ⚡ The server is built on top of uWebSockets.js

Jan 4, 2023

🚀🚀🚀 Nuxt3 client and server communication

Nuxt 3 Minimal Starter Look at the nuxt 3 documentation to learn more. Setup Make sure to install the dependencies: # yarn yarn install # npm npm ins

Dec 19, 2022
Owner
M.Abdullah Ch
Microsoft Student Learn Ambassador - Google Developer Student Clubs Lead - MERN STACK
M.Abdullah Ch
WebSocket emulation - Node.js server

SockJS-node SockJS for enterprise Available as part of the Tidelift Subscription. The maintainers of SockJS and thousands of other packages are workin

SockJS 2.1k Dec 29, 2022
Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js

ws: a Node.js WebSocket library ws is a simple to use, blazing fast, and thoroughly tested WebSocket client and server implementation. Passes the quit

WebSockets 19.2k Jan 4, 2023
This server is made to serve the MSN-Messenger app develop by Gabriel Godoy. This applications is capable to register users and messages in order implements a real time chat.

?? MSN-Messenger-Server Node.js server for real time chat About | Installations | How to Use | Documentation | Technologies | License ?? About This se

Guilherme Feitosa 7 Dec 20, 2022
Standards-compliant WebSocket client and server

faye-websocket This is a general-purpose WebSocket implementation extracted from the Faye project. It provides classes for easily building WebSocket s

null 588 Dec 23, 2022
A WebSocket Implementation for Node.JS (Draft -08 through the final RFC 6455)

WebSocket Client & Server Implementation for Node Overview This is a (mostly) pure JavaScript implementation of the WebSocket protocol versions 8 and

Brian McKelvey 3.6k Dec 30, 2022
Mini Projeto de um chat-app usando o protocolo WebSocket através da lib 'ws' do node.js

CHAT-APP-WEBSOCKET Mini Projeto de um chat-app usando o protocolo WebSocket através da lib 'ws' do node.js Obs o intuito deste projeto não é o fronten

Vinicius dos Santos Rodrigues 4 Jul 14, 2022
Lightweight WebSocket lib with socket.io-like event handling, requests, and channels

ws-wrapper Lightweight and isomorphic Web Socket lib with socket.io-like event handling, Promise-based requests, and channels. What? Much like Socket.

Blake Miner 70 Dec 23, 2022
The cutest little WebSocket wrapper! 🧦

Sockette The cutest little WebSocket wrapper! ?? Sockette is a tiny (367 bytes) wrapper around WebSocket that will automatically reconnect if the conn

Luke Edwards 2.4k Jan 2, 2023
A Develop Tool to Test WebSocket, Socket.IO, Stomp, Bayeux, HTTP, TCP, UDP, WebRTC, DNS API.

A Develop Tool to Test WebSocket, Socket.IO, Stomp, Bayeux, HTTP, TCP, UDP, WebRTC, DNS API.

York Yao 24 Sep 6, 2022
WebSocket cat

WebSocket cat

WebSockets 1.6k Jan 2, 2023