EP2PeerServer
(optional)
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.
npm i @ep2/peerserver
import { EP2Peer } from "@ep2/peerserver";
EP2PeerServer(await EP2Key.create("some seed value"), {});
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.