Skip to content

Latest commit

 

History

History

peerserver

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

EP2PeerServer (optional)

Introduction

This package extends the peerjs server library, adding identity verification for connecting clients. Online clients can choose to connect to any normal peer server and rely on the SecureChannel between peers, but this server prevents clients from using any ID without first verifying a secure handshake.

Installation

npm i @ep2/peerserver
import { EP2Peer } from "@ep2/peerserver";
EP2PeerServer(await EP2Key.create("some seed value"), {});

Configuration

The configuration is identical to that of the original peerserver. Please refer to their documentation for details. The only exception is generateClientIds, which does not make sense in this context and is ignored if configured.