Skip to main content
ActiveVPN Logo

๐Ÿ›ก๏ธ ActiveVPN

The Ultimate Network Privacy & VPN Detection Tool

Report Bug ยท Request Feature

License: MIT Python Rich


๐Ÿ“– Introduction

ActiveVPN is a powerful, cross-platform terminal utility designed to verify your digital privacy status. Whether you are a privacy enthusiast, a sysadmin, or just a casual user, knowing if your VPN is actually working is crucial.

Unlike simple "What is my IP" websites, ActiveVPN dives deeper. It inspects your system's network interfaces, analyzes running processes, checks your external IP against known hosting providers, and performs DNS leak testsโ€”all presented in a beautiful, hacker-style TUI (Terminal User Interface).

๐Ÿš€ How It Works

ActiveVPN operates on three distinct layers to ensure accuracy:

  1. System Layer Inspection ๐Ÿ’ป

    • It scans your operating system (Linux, Windows, macOS, Android/Termux) for network interfaces commonly used by VPN protocols (e.g., tun0, wg0, ppp).
    • It checks for active processes associated with VPN providers (e.g., openvpn, wireguard, nordvpn, tor).
  2. External IP Analysis ๐ŸŒ

    • It queries external APIs to fetch your Public IP.
    • It analyzes the ISP (Internet Service Provider) name. If the ISP is a known Data Center (e.g., DigitalOcean, M247), it flags the connection as "LIKELY VPN/PROXY".
  3. DNS Leak Detection ๐Ÿ•ต๏ธโ€โ™‚๏ธ

    • It compares your Public IP with the IP address resolving your DNS queries. If they are different, it warns you, helping you identify potential DNS leaks where your ISP might still see your requests.

โœจ Features

  • ๐Ÿ–ฅ๏ธ Beautiful TUI: Built with the rich library for a modern, colorful, and easy-to-read terminal interface.
  • ๐Ÿง Cross-Platform: Works seamlessly on Linux, macOS, Windows, and Android (via Termux).
  • ๐Ÿ”Ž Deep Scan: Detects VPNs via Interface names, Process names, and IP reputation.
  • ๐Ÿง… Tor Detection: Specifically checks for active Tor services.
  • โ˜ ๏ธ Kill Switch: Built-in command to terminate running VPN processes instantly (with a --kill-force fallback).
  • ๐Ÿ“ History Logging: Automatically saves scan results to .scan_history.json for your records.
  • ๐Ÿšจ DNS Consistency: Verifies if your DNS requests are being tunneled correctly.
  • ๐ŸŒ IPv6 Leak Check: Reports your external IPv6 address and warns if IPv6 could leak alongside a VPN tunnel.
  • ๐Ÿท๏ธ Overall Verdict: Combines every signal into a single confidence score and verdict (CLEAN / SUSPICIOUS / LIKELY VPN / VPN DETECTED).
  • ๐Ÿ” Watch Mode: Continuously re-scans your network at a configurable interval.
  • ๐Ÿ“ค History Export: Export past scans as JSON, CSV, or plain text.
  • โš™๏ธ Config File: Override patterns, colors, and API URLs without touching the code.

๐Ÿ“‚ Project Structure

Here is how ActiveVPN is organized:

vpnActive/
โ”œโ”€โ”€ main.py               # ๐Ÿš€ Entry point: The script you run to start the tool
โ”œโ”€โ”€ config.py             # โš™๏ธ Configuration: Settings, API URLs, and Colors
โ”œโ”€โ”€ requirements.txt      # ๐Ÿ“ฆ Python dependencies
โ”œโ”€โ”€ pyproject.toml        # ๐Ÿ Packaging & entry point config
โ”œโ”€โ”€ .scan_history.json    # ๐Ÿ“„ Logs: Stores past scan results (Auto-generated)
โ”œโ”€โ”€ .github/              # ๐Ÿšฆ CI workflow + logo
โ””โ”€โ”€ core/                 # ๐Ÿง  Core Logic Folder
    โ”œโ”€โ”€ __init__.py       #    Package initializer
    โ”œโ”€โ”€ logo.py           #    ๐ŸŽจ Generates the ASCII Art Banner
    โ”œโ”€โ”€ help.py           #    โ„น๏ธ Handles the Help Menu display
    โ”œโ”€โ”€ detector.py       #    ๐Ÿ•ต๏ธ Main Logic: Scans IPs, Interfaces & DNS
    โ””โ”€โ”€ logger.py         #    ๐Ÿ’พ Handles saving data to JSON & exports

๐Ÿ› ๏ธ Installation & Usage

Prerequisites

  • Python 3.8 or higher
  • Pip (Python Package Manager)

Step 1: Clone the Repository

git clone https://github.com/rkriad585/vpnActive.git
cd vpnActive

Step 2: Install Dependencies

pip install -r requirements.txt
# Or manually:
pip install psutil rich pyfiglet requests

Step 3: Run the Tool

python main.py

๐ŸŽฎ Command Usage Examples

1. Standard Network Scan

Performs a full check of interfaces, processes, and external IP.

python main.py

2. Kill Active VPNs โ˜ ๏ธ

Requires Administrator/Root privileges. Attempts to terminate known VPN processes.

# Linux/Mac
sudo python main.py --kill

# Windows (Run cmd as Admin)
python main.py --kill

3. Help Menu โ„น๏ธ

Displays all available commands and flags.

python main.py --help

4. Scan History & Export ๐Ÿ“Š

Shows past scans, exports them, or clears them.

python main.py --history
python main.py --export csv        # json | csv | txt
python main.py --clear-history

5. Watch Mode ๐Ÿ”

Continuously re-scans every N seconds (default 10). Press Ctrl+C to stop.

python main.py --watch 30

6. Exit Codes ๐Ÿค–

Useful for scripting and automation.

Code Meaning
0 No VPN detected (or clean exit)
1 VPN / Tor / Proxy detected
2 Offline, error, or invalid usage

โš™๏ธ Configuration

You can customize the tool by editing config.py or by creating an optional JSON config file (.activevpn.json in the project root, or any path via the ACTIVEVPN_CONFIG environment variable). Keys in the file must match the uppercase constants in config.py.

{
  "VPN_INTERFACE_PATTERNS": ["tun", "tap", "wg"],
  "VPN_PROCESS_NAMES": ["openvpn", "mullvad"],
  "COLOR_SUCCESS": "bold cyan"
}
  • Add new VPNs: Add process names to VPN_PROCESS_NAMES or interface prefixes to VPN_INTERFACE_PATTERNS.
  • Change Colors: Modify the COLOR_* constants to theme the UI to your liking.
  • Change APIs: Override IP_API_URLS, DNS_LEAK_API_URL, or the IP version endpoints.

๐Ÿค Contributing & Issues

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Found a bug? Open an Issue to help us fix it!

๐ŸŒ Connect with Me

If you like this project, feel free to connect!

Platform Username Link
GitHub @rkriad585 github.com/rkriad585
YouTube @rkriad585 youtube.com/@rkriad585
X (Twitter) @rk_riad585 x.com/rk_riad585
Facebook @rkriad585 facebook.com/rkriad585
Instagram @rkriad585 instagram.com/rkriad585
Threads @rkriad585 threads.net/@rkriad585
Email rkriad585 mailto:rkriad585@gmail.com

๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.


Built with โค๏ธ by rkriad585

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

activevpn-2.2.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

activevpn-2.2.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file activevpn-2.2.0.tar.gz.

File metadata

  • Download URL: activevpn-2.2.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.7

File hashes

Hashes for activevpn-2.2.0.tar.gz
Algorithm Hash digest
SHA256 c1ccfb2c61b6259bab18a0e6ef24183458840979f4d8c30e0906fa10adf9949c
MD5 95c7fc43f4946196744b4278648295e7
BLAKE2b-256 a38a909a5e65c9ecbb3432d48412cb93b96dd2a5db791172bd4e593effb7faa7

See more details on using hashes here.

File details

Details for the file activevpn-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: activevpn-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.7

File hashes

Hashes for activevpn-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 872267cc21ead6d80a881886446a26b04a748bdcb99ad62bb8567e9dbe047f08
MD5 6a2b3301c4724bded82e0713bb9c18cf
BLAKE2b-256 b444726a4dae40354c106a96aa41a4f51f2b0ebadf6db3f8f147faf733fb561b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page