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.
More screenshots: View all screenshots
- Key Features
- Installation
- Quick Start
- Usage Examples
- Documentation
- Interface
- Architecture
- Requirements
- Prerequisites
- Development
- Contributing
- Security
- License
- Acknowledgments
- 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 your platform's data directory, viewable with
--historyand exportable as JSON, CSV, or TXT. - Library API β importable as a Python package (
activevpn.scan(),NetworkDetector, typedScanResult), with silent mode and watch callbacks for developers. - Watch mode β continuously re-scans at a configurable interval.
- Configurable β patterns, colors, and API endpoints can be overridden with a JSON config file.
Requires Python 3.8 or newer and pip.
pip install activevpnOr install from source:
git clone https://github.com/rkriad585/ActiveVPN.git
cd ActiveVPN
pip install -r requirements.txtSee docs/installation.md for platform-specific notes (Linux, macOS, Windows, Termux).
# Run a full scan
activevpnYou should see a system check, an external IP analysis, a DNS consistency check, and an overall verdict.
# 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 --helpExit codes: 0 = no VPN detected, 1 = VPN/Tor/Proxy detected, 2 = offline or error. Full reference in docs/cli.md.
| 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 |
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.
ActiveVPN/
βββ main.py # Entry point + CLI (argparse) + rich TUI rendering
βββ config.py # Legacy shim β re-exports activevpn.config
βββ pyproject.toml # Packaging, metadata, console script
βββ requirements.txt # Runtime dependencies
βββ activevpn/ # The library (importable as a package)
β βββ __init__.py # Public API: scan(), NetworkDetector, ScanResult, ...
β βββ config.py # Config dataclass, platformdirs paths, load_config()
β βββ detector.py # NetworkDetector + typed data model (ScanResult, Verdict, IPInfo, ...)
β βββ logger.py # History persistence, load/clear, and export helpers
β βββ logo.py # ASCII banner generation (pyfiglet + rich)
β βββ help.py # Help menu rendering
βββ core/ # Backward-compatible shim (deprecated, use activevpn)
βββ 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.
import activevpn
# One-shot scan (silent β no TUI)
result = activevpn.scan(console=None)
print(result.verdict.label, result.verdict.score) # CLEAN 0
print(result.to_json()) # serializable output
# Programmatic configuration (stored under ~/.config/neostore/ActiveVPN/)
cfg = activevpn.load_config()
cfg.vpn_process_names.append("my-vpn-daemon")
# Continuous watch with callbacks
detector = activevpn.NetworkDetector(console=None, config=cfg)
for r in detector.watch(interval=60, on_change=lambda r: print("Verdict changed!", r.verdict.label)):
passSee docs/architecture.md for details.
| 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.
- 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-pipOn macOS (Homebrew):
brew install python# 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.
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.
If you find a security issue, please read SECURITY.md before reporting it. Do not open a public issue for vulnerabilities.
Distributed under the MIT License. See LICENSE for the full text.
