Coder Social home page Coder Social logo

vincentcox / go-rest-wol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dabondi/go-rest-wol

1.0 2.0 0.0 52 KB

Simple HTTP Server with WebUI and REST API for Sending WoL Package over the Wire

License: MIT License

Go 66.38% HTML 31.88% Dockerfile 1.74%

go-rest-wol's Introduction

GoLang HTTP Server for Remote WOL Requesting from an CSV Computer List

A HTTP Server who send Wake On Lan Package on an HTTP Request.

Simple Bootstrap UI for the easy Usage.

Screenshot

Simple REST API to let a Machine wake someone up

/api/computer/ - Returns a JSON Object

{
  "success":true,
  "message":"Succesfully Wakeup Computer Computer1 with Mac 64-07-2D-BB-BB-BF on Broadcast IP 192.168.10.254:9",
  "error":null
}

Command Line Arguments

Commandline Argument Example Description
--port --port 80 Define the Port where the Webserver will listen to (Default: 8080)
--file --file comp.csv Path to the CSV File containing the Computerlist

Computer List File CSV layout

Columns

<name of the computer>,<mac address of the computer>,<broadcast ip to send the magic packet>

Example

name,mac,ip
Computer1,64-07-2D-BB-BB-BF,192.168.10.254:9
Computer2,2D-F2-3D-06-17-00,192.168.10.254:9
Computer3,FF-B3-95-62-1C-DD,192.168.10.254:9

Docker

docker build -t go-rest-wol .
docker run go-rest-wol

If you want to run on a different port (i.e.: 6969) and also want to provide the csv file on your host:

docker run -p 6969:8080 -v $(pwd)/externall-file-on-host.csv:/app/computer.csv go-rest-wol

Was a good exercise to learn golang (and refresh my Docker skills)

Thx https://github.com/sabhiram/go-wol for the WOL Code, sorry that i stole it from you, because i got no clue how i can inject it into my program :-(

go-rest-wol's People

Contributors

dabondi avatar vincentcox avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.