Giter Club home page Giter Club logo

wol_api's Introduction

Wake on Lan API

Python REST API that wakes a machine (that supports wol) from outside of the local network.

๐Ÿณ Docker

git clone https://github.com/Urpagin/WoL_Api/
cd WoL_Api
vim .env

Then populate .env with HASHED_KEY=<HASHEDKEY>
Use this webpage to hash your password using the SHA384 hashing algorithm.

docker build -t urpagin/wol-api:0.0.1 .
docker images

Then copy image ID

docker run -d --restart=always --network host --name wol-api <IMAGEID>

It's all good man. Now you can execute docker ps to show all running containers or docker ps -a to show all running and exited containers in case wol-api crashed.

โš™๏ธ API

/(GET): simple static HTTP to check the API
/wake(POST): takes key and ip wakes a machine with pagic packet
/ping(GET): takes key and ip returns the ping response of the machine
/add-machine(PUT): takes key and ip gets the mac address of ip and ands the tuple (ip, mac) into database
/database(GET): takes key returns the database content in the form of a list.

Note: all responses are json {"detail": <RESPONSE>}
Note X2: before using /wake make sure you added the machine's mac address to the database with /add-machine

programming-background-with-person-working-with-codes-computer (1)

Hero-Wodaabe-nomads-in-Chad-Photo-credit-Tariq-Zaidi-Zuma-Press-01

flag-india

Image Credits: Image by www.slon.pics on Freepik

wol_api's People

Contributors

urpagin avatar

Stargazers

 avatar

Watchers

 avatar

wol_api's Issues

Wake

make it so that if mac = 00:00:00:00... cannot wake

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.