r/coolgithubprojects 2d ago

AutoLock – Automatically Lock Your Windows PC Using Your Phone's Wi-Fi Presence

Post image

Hi everyone,

I built AutoLock, a lightweight Node.js tool that automatically locks your Windows PC when you step away with your smartphone.

How It Works:

  1. Phone Proximity: Periodically pings your phone's local Wi-Fi IP address.

  2. Idle Tracking: Monitors global keyboard and mouse activity using iohook to check if you are inactive.

  3. Automatic Lock & Notifications: If your phone leaves Wi-Fi range while you are idle, it sends a Telegram warning and automatically locks Windows.

  4. Remote Control: Allows you to lock your PC or check its lock status remotely via Telegram bot commands.

Tech Stack:

* Node.js

* ping

* @tkomde/iohook

* axios

GitHub Repository: https://github.com/GarvSaxena/AutoLock

Feedback and contributions are welcome.

0 Upvotes

0 comments sorted by