diff --git a/.gitignore b/.gitignore index d5236fb..82299f4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,7 @@ # Go workspace file go.work +# Custom config.toml + +!example/** diff --git a/README.md b/README.md index 35aba20..9904811 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,16 @@ # miniwol -Small web server to send Wake-on-LAN requests to its local network \ No newline at end of file +Small web server to send Wake-on-LAN requests to its local network + +## Features +- Fully static frontend without JS +- Binary includes everything except config + +## Usage +Add an empty config, the program checks for `./config.toml`, `./config/config.toml` and `/etc/miniwol/config.toml`. Make sure miniwol can write to it. + +Set a password and write its hash to the config using `miniwol setpass `. This will also add the other default fields to the config. + +Configure the devices you want to be able to wake up as per the [example](./example/config.toml) + +Now you can run the webserver using `miniwol` or `miniwol web` diff --git a/example/config.toml b/example/config.toml new file mode 100644 index 0000000..7ac5149 --- /dev/null +++ b/example/config.toml @@ -0,0 +1,13 @@ +Server = ":8080" # The address the webserver should bind to +PassHash = "$2a$10$I.26oCzkjZ8qwfhbmeYM3.kppBjxtPsxkeE1Y.ULjVvA1IBPcQP42" # "password" +SessionTTL = 60 # How many minutes sessions last for + +[[Device]] + Alias = "SomeDevice" + MAC = "DE-AD-BE-EF-F0-05" # Delimiter dashes/colons, upper/lowercase + IP = "192.168.178.255" # Broadcast for most home networks + +[[Device]] + Alias = "Another Device" + MAC = "" + IP = "" \ No newline at end of file