Skip to content

LegendaryB/go-wake-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



go-wake-server

forthebadge forthebadge

GitHub license

Simple HTTP to Wake-on-LAN bridge.

Built with ❤︎ by Daniel Belz


Configuration

The application can be configured via the conf.json file. A typical configuration looks like this:

{
    "port": "81",
    "mac_regex_pattern": "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$",
    "broadcast": {
        "address": "255.255.255.255",
        "port": "9"
    }
}
Property Description
port Port on which the application should listen for requests.
mac_regex_pattern The regex pattern is used to check if the given request parameter is valid.
broadcast.address The broadcast address to which the magic packet should be send.
broadcast.port The broadcast port on which the magic packet should be send.

Command-line arguments

At the moment you can only specify a custom configuration file via the command-line options:

sudo ./go-wake-server -c myconf.json

Sending a magic packet

You can trigger sending a Wake-on-LAN packet by sending a GET request to the http endpoint. On Unix based systems you can use wget or curl for that purpose.

curl

curl 127.0.0.1:81/wake/00:80:41:ae:fd:7e

wget

wget 127.0.0.1:81/wake/00:80:41:ae:fd:7e