PowerDaemon is a lightweight HTTP server that enables remote execution of power operations—such as sleep, hibernate, shutdown, and restart—on your Windows device. By sending specific HTTP GET requests from an authorized IP address, you can control these operations conveniently.
- Remote Control: Execute power operations on your device via simple HTTP GET requests.
- IP Whitelisting: Restrict access to a specific IP address using an
allowed_ip.txt
file. - System Tray Integration: Provides a system tray icon with an exit option for easy termination.
- Operating System: Windows
- Dependencies:
psshutdown.exe
from Sysinternals (included in the releases)
-
Download PowerDaemon: Obtain the latest
powerdaemon.exe
andpsshutdown.exe
from the Releases section. -
Configure Allowed IP:
- Create a file named
allowed_ip.txt
in the same directory aspowerdaemon.exe
. - Add the IP address permitted to send requests. For example:
Note: Using
192.168.1.100
0.0.0.0
to allow all IPs is untested and not recommended.
- Create a file named
-
Run PowerDaemon:
- Place
psshutdown.exe
alongsidepowerdaemon.exe
. - Execute
powerdaemon.exe
. An icon will appear in the system tray.
- Place
Send HTTP GET requests to the following endpoints to perform power operations:
/sleep
: Puts the device to sleep./hibernate
: Hibernates the device./shutdown
: Shuts down the device./restart
: Restarts the device.
Example:
To put the device to sleep from an authorized IP (192.168.1.100
):
GET http://192.168.1.100:8000/sleep
Note: The default port is 8000
. To change this, modify the source code accordingly.
To build PowerDaemon from source:
- Download Source Code: Clone or download the repository.
- Open in Visual Studio: Load the solution file in Visual Studio.
- Build the Solution: Press
F6
to compile.
Contributions are welcome to enhance PowerDaemon's functionality and reliability. Feel free to submit pull requests to improve the codebase.
This project was initially created for personal use and may contain unrefined code. Use it at your own discretion.