๐ก๏ธ ActiveVPN
The Ultimate Network Privacy & VPN Detection Tool
ActiveVPN inspects your system's network interfaces, analyzes running processes, checks your external IP against known hosting providers, and performs DNS leak tests โ all in one hacker-style terminal UI. It tells you whether your VPN is actually working.
Screenshot
More screenshots: View all screenshots
Table of Contents
- Key Features
- Installation
- Quick Start
- Usage Examples
- Documentation
- Interface
- Architecture
- Requirements
- Prerequisites
- Development
- Contributing
- Security
- License
- Acknowledgments
Key Features
- Deep scan โ detects VPNs via interface names, process names, and IP reputation in one pass.
- Tor detection โ specifically checks for active Tor services.
- External IP analysis โ queries public IP APIs and flags datacenter/hosting/proxy IPs.
- DNS leak detection โ compares your traffic IP with your DNS resolver IP.
- IPv6 leak check โ reports your external IPv6 address and warns when IPv6 may leak around a tunnel.
- Overall verdict โ combines every signal into a confidence score and a CLEAN / SUSPICIOUS / LIKELY VPN-PROXY / VPN DETECTED label.
- Kill switch โ terminates active VPN processes, with a
--kill-forcefallback. - History & export โ automatically logs scans to
.scan_history.json, viewable with--historyand exportable as JSON, CSV, or TXT. - Watch mode โ continuously re-scans at a configurable interval.
- Configurable โ patterns, colors, and API endpoints can be overridden with a JSON config file.
Installation
Requires Python 3.8 or newer and pip.
pip install activevpn
Or install from source:
git clone https://github.com/rkriad585/ActiveVPN.git
cd ActiveVPN
pip install -r requirements.txt
See docs/installation.md for platform-specific notes (Linux, macOS, Windows, Termux).
Quick Start
# Run a full scan
activevpn
You should see a system check, an external IP analysis, a DNS consistency check, and an overall verdict.
Usage Examples
# Standard network scan (interfaces, processes, IP, DNS)
activevpn
# Kill active VPN processes (requires admin/root)
sudo activevpn --kill
# Force-kill stubborn VPN processes
sudo activevpn --kill-force
# Show past scan results
activevpn --history
# Export scan history as CSV
activevpn --export csv
# Clear all saved history
activevpn --clear-history
# Continuously rescan every 30 seconds
activevpn --watch 30
# Verbose debug logging
activevpn --debug
# Show help
activevpn --help
Exit codes: 0 = no VPN detected, 1 = VPN/Tor/Proxy detected, 2 = offline or error. Full reference in docs/cli.md.
Documentation
| Doc | Description |
|---|---|
| docs/getting-started.md | First steps with ActiveVPN |
| docs/installation.md | Install instructions for every platform |
| docs/usage.md | Daily usage and examples |
| docs/cli.md | Full command-line reference |
| docs/configuration.md | Config file and environment variables |
| docs/architecture.md | How the code is organized |
| docs/development.md | Building, testing, and packaging |
| docs/deployment.md | Running on servers and in containers |
| docs/faq.md | Frequently asked questions |
| docs/troubleshooting.md | Common issues and fixes |
| docs/screenshots.md | All screenshots |
Interface
ActiveVPN is a command-line tool. It is distributed as the activevpn console script (see [project.scripts] in pyproject.toml) and can also be launched with python main.py.
When run without flags it performs a full scan and prints four sections:
- System Internal Check โ detected VPN/Tor interfaces and processes.
- External IP Analysis โ public IP, country, ISP/org, IPv4/IPv6, and a verdict.
- DNS Consistency Check โ traffic IP vs. DNS resolver IP.
- Overall Verdict โ confidence score (
0โ100) and label.
The tool returns meaningful exit codes (0/1/2) so it can be used in scripts and CI.
Architecture
ActiveVPN/
โโโ main.py # Entry point + CLI (argparse) + rich TUI rendering
โโโ config.py # Settings: patterns, API URLs, colors, scoring
โโโ pyproject.toml # Packaging, metadata, console script
โโโ requirements.txt # Runtime dependencies
โโโ .scan_history.json # Scan history log (auto-generated)
โโโ core/
โ โโโ __init__.py
โ โโโ logo.py # ASCII banner generation (pyfiglet + rich)
โ โโโ help.py # Help menu rendering
โ โโโ detector.py # NetworkDetector: interfaces, processes, IP, DNS, IPv6, verdict, kill
โ โโโ logger.py # History persistence, load/clear, and export helpers
โโโ tests/ # pytest suite (mocked psutil/requests)
โโโ logo/ # Brand logo
โโโ docs/ # Documentation
The flow: main.run() parses arguments โ NetworkDetector.scan_network() collects system + online signals โ _compute_verdict() scores them โ save_log() persists the result โ tables/panels are rendered with rich.
See docs/architecture.md for details.
Requirements
| Requirement | Minimum |
|---|---|
| OS | Linux, macOS, Windows, or Android (Termux) |
| Runtime | Python 3.8+ |
| Network | Internet access for the public IP and DNS checks |
No special hardware is required. --kill and --kill-force need administrator/root privileges.
Prerequisites
- Python 3.8+ โ download from python.org or your package manager.
- pip โ bundled with Python on modern installers.
On Linux:
sudo apt update && sudo apt install -y python3 python3-pip
On macOS (Homebrew):
brew install python
Development
# Clone and install dependencies
git clone https://github.com/rkriad585/ActiveVPN.git
cd ActiveVPN
python -m venv .venv
. .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
pip install -r requirements.txt pytest build twine
# Run the test suite
pytest -q
# Build the distributable packages
python -m build
# Verify the built artifacts
python -m twine check dist/*
The CI workflow (.github/workflows/ci.yml) runs pytest on Ubuntu, Windows, and macOS with Python 3.8 and 3.12. See docs/development.md.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for setup, branch rules, commit style, and the pull request workflow. All participants must follow the CODE_OF_CONDUCT.md.
Security
If you find a security issue, please read SECURITY.md before reporting it. Do not open a public issue for vulnerabilities.
License
Distributed under the MIT License. See LICENSE for the full text.
Acknowledgments
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file activevpn-2.2.1.tar.gz.
File metadata
- Download URL: activevpn-2.2.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
564f3cf7046f3bdbe602ca19dda3aa372e17fb5d9e68591f6c5be51a7fd0f9ee
|
|
| MD5 |
abbf4e37f59213cd267d914d6c7e5e8d
|
|
| BLAKE2b-256 |
9dbac1b3b551e03243056f7789dc083f82e5a50db007989c05c7a3ae05e4a146
|
File details
Details for the file activevpn-2.2.1-py3-none-any.whl.
File metadata
- Download URL: activevpn-2.2.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ed2f3a0a8f3cfae5afb82fb7eb0a78a32a472cff2fa3162e474d788947fa08
|
|
| MD5 |
7f171ca981889ede309b4028580067e4
|
|
| BLAKE2b-256 |
ba7755777787ce3b91e98728ecd55f3acb029c5e1d4c9251ee7b51729f0daca6
|