wol-relay

command module
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

README

Wake-on-LAN Relay

Relay Wake-on-LAN (WOL) packets between multiple networks or interfaces. This is useful for environments where devices are on separate subnets and need to be woken up remotely.

Features

  • Listens for WOL packets on specified interfaces
  • Relays valid WOL packets to all other monitored networks
  • Prevents packet loops and duplicate broadcasts
  • Lightweight and easy to deploy (single binary or Docker image)
  • Accepts both interface names and CIDR notation for target networks

Usage

Docker Compose

Add the following service to your compose.yaml to relay WOL packets between the eno1 and eno2 network interfaces:

services:
  wol-relay:
    image: ghcr.io/danroc/wol-relay:latest
    container_name: wol-relay
    network_mode: host
    command: eno1 eno2
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped

Note: network_mode: host is required for the container to access host network interfaces and broadcast packets.

Standalone

You can also run the relay directly on your host:

# Build the binary
go build

# Run the relay
sudo ./wol-relay eno1 eno2

Replace eno1 and eno2 with the names of your network interfaces.

CIDR Targets

You can also specify networks directly using CIDR notation, including /32 for unicast relay to individual hosts:

# Relay between interface eno1 and a remote subnet
sudo ./wol-relay eno1 10.0.0.0/24

# Unicast relay to a specific host
sudo ./wol-relay eno1 192.168.2.5/32

# Mixed interfaces and CIDRs
sudo ./wol-relay eno1 eno2 10.0.0.0/24 172.16.0.10/32

Requirements

  • Go 1.24+ (for building from source)
  • Sufficient privileges to access network interfaces and send broadcast packets

Development

  • Run tests:

    go test ./...
    
  • Build Docker image:

    docker build -t wol-relay .
    

Documentation

Overview

Package main implements a Wake-on-LAN relay that listens for WOL packets on specified network interfaces and relays them to other networks.

Directories

Path Synopsis
Package wol provides functions to build and parse Wake-on-LAN packets.
Package wol provides functions to build and parse Wake-on-LAN packets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL