Skip to content

slpuk/scoperta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scoperta

A lightweight network service discovery protocol

Node.js Version Status License

Run

1. Copy the repository

git clone https://github.com/slpuk/scoperta.git

2. Launch the main script

npm start

About

Scoperta is an open-source service for network device discovery. It serves as a lightweight alternative to services like Apple's Bonjour or the Linux community's Avahi.

Architecture

The service operates over the UDP transport protocol using multicast transmission. It runs on the address 224.0.112.80 via port 57620.

1. Packet Format

The service utilizes binary packets with minimal per-packet overhead.

Packet cheme:

[ Magic          ] - 1 Byte
[ ID             ] - 2 Bytes
[ Name Length    ] - 1 Byte
[ Name           ] - up to 255 Bytes
[ Payload Length ] - 1 Byte
[ Payload        ] - up to 255 Bytes
[ CRC-32         ] - 4 Bytes

Field Descriptions:

  • Magic - A unique version identifier used to implicitly filter out network noise and legacy packets. CRC-8-ROHC hash of "Scoperta/{version}", where version is the protocol version string (e.g., "1", "2").This provides both versioning and noise filtering.
  • ID - A unique client identifier generated randomly.
  • Name Length - The length of the client’s name (Name).
  • Name - A user-defined client name, UTF-8 encoded, up to 255 bytes.
  • Payload Length - The length of the Payload.
  • Payload - A user-defined data, up to 255 Bytes.
  • CRC-32 - The packet's checksum for error detection.

Example Payload (JSON):

{"type":"temperature", "port":5678, "protocol":"udp"}

Note: Multi-byte integers (ID, CRC-32) are transmitted in network byte order (big-endian).

License

This project is licensed under the Apache 2.0 License.

About

A lightweight network service discovery protocol

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors