Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 1.43 KB

README.md

File metadata and controls

76 lines (49 loc) · 1.43 KB

Auto Captive Portal Login

This project is a Rust application that automatically handles IIT Mandi captive portal authentication. It runs as a background service that checks for captive portals every 10 seconds, performs automatic login, and sends desktop notifications on successful authentication.

Prerequisites

  • Rust and Cargo
  • Google Chrome
  • macOS or Linux

Installation

  1. Clone the repository:
git clone https://github.com/amansikarwar/auto-captive-portal.git
cd auto-captive-portal
  1. Build the project:
cargo build --release
  1. Run the setup:
./target/release/acp-script setup

This will:

  • Prompt for your LDAP credentials
  • Store credentials securely in the system keychain
  • Create and start the background service

Platform-specific Details

macOS

The service runs as a LaunchAgent and will start automatically on login.

To manually manage the service:

# Start
launchctl load ~/Library/LaunchAgents/com.user.acp.plist

# Stop
launchctl unload ~/Library/LaunchAgents/com.user.acp.plist

# View logs
log show --predicate 'processImagePath contains "acp-script"'

Linux

The service runs as a systemd user service.

To manually manage the service:

# Start
systemctl --user start acp

# Stop
systemctl --user stop acp

# View logs
journalctl --user -u acp

License

This project is licensed under the MIT License - see the LICENSE file for details.