Sign inSign up

siteworxpro/ysf-reflector-go

By siteworxpro

•Updated 6 months ago

Image
Integration & delivery
Internet of things
0

1.1K

siteworxpro/ysf-reflector-go repository overview

⁠ysf-reflector-go

A Yaesu System Fusion (YSF)⁠ UDP reflector written in Go. It links multiple YSF nodes and hotspots together, relaying voice and data frames between all connected clients.

⁠Features

  • Handles the full YSF UDP protocol: YSFP (poll/keepalive), YSFD (voice/data), YSFU (unlink), and YSFS (status query)
  • Relays incoming frames to all connected nodes except the sender
  • Proactively polls clients every 5 seconds to detect drops early
  • Evicts idle clients after a configurable timeout
  • Transmission watchdog — logs when a transmission starts and ends
  • Periodic status dumps every 2 minutes
  • Optional per-packet debug logging
  • HTTP dashboard showing connected nodes in real time
  • /api/clients JSON endpoint for programmatic access

⁠Requirements

  • Go 1.21+

⁠Docker

Pre-built images are published to Docker Hub at siteworxpro/ysf-reflector-go⁠.

⁠Quick start

Create a config.yaml (see Configuration⁠ below), then run:

docker run -d \
  --name ysf-reflector \
  -v /path/to/config.yaml:/etc/ysf-reflector/config.yaml \
  -p 42000:42000/udp \
  -p 8080:8080 \
  siteworxpro/ysf-reflector-go
⁠Docker Compose
services:
  ysf-reflector:
    image: siteworxpro/ysf-reflector-go:latest
    restart: unless-stopped
    volumes:
      - ./config.yaml:/etc/ysf-reflector/config.yaml
    ports:
      - "42000:42000/udp"
      - "8080:8080"
⁠Building the image locally
docker build -t ysf-reflector .

# With a version label
docker build --build-arg VERSION=1.2.3 -t ysf-reflector:1.2.3 .

The config file is expected at /etc/ysf-reflector/config.yaml inside the container.

⁠Building

go build -o ysf-reflector .

⁠Configuration

Copy and edit config_example.yaml to config.yaml:

callsign: K8RON          # Your reflector callsign (max 10 characters)
port: 42000              # UDP port to listen on (standard YSF port is 42000)
http_port: 8080          # HTTP dashboard port
timeout: 240             # Seconds before an idle client is disconnected
debug: false             # Log every packet (verbose)

# Reported in YSFS status query responses
id: 0                    # Numeric reflector ID (reported to querying nodes)
name: K8RON Reflector    # Reflector name (max 16 characters)
description: YSF Ref     # Short description (max 14 characters)
FieldRequiredDefaultDescription
callsignYes—Reflector callsign, max 10 characters
portNo42000UDP port to listen on
http_portNo8080HTTP dashboard port
timeoutNo240Client idle timeout in seconds
debugNofalseLog every packet
idNo0Numeric ID included in YSFS status responses
nameNo—Reflector name, max 16 characters
descriptionNo—Short description, max 14 characters

⁠Running

./ysf-reflector -config config.yaml

The -config flag defaults to config.yaml in the current directory.

⁠Web dashboard

When the reflector is running, a live dashboard is available at http://localhost:8080 (or whatever http_port is set to). It lists all currently connected nodes with their callsign, IP address, and time since last heard.

A JSON API is also available for programmatic access:

GET /api/clients
[
  {
    "callsign": "K8RON",
    "addr": "1.2.3.4:42000",
    "last_seen": "2026-04-10T17:00:00Z"
  }
]

⁠Protocol overview

MagicDirectionDescription
YSFPnode ↔ reflectorKeepalive poll / registration
YSFDnode → reflector → all othersVoice/data frame relay
YSFUnode → reflectorUnlink / disconnect request
YSFSnode → reflectorStatus query; reflector replies with ID, name, description, and node count

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:39e046f47…

Size

4.3 MB

Last updated

6 months ago

docker pull siteworxpro/ysf-reflector-go