Skip to main content

ActiveVPN logo

๐Ÿ›ก๏ธ ActiveVPN

The Ultimate Network Privacy & VPN Detection Tool

Python 3.8+ CI status PyPI version MIT license Made by rkriad585

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

home screen

More screenshots: View all screenshots

Table of Contents

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-force fallback.
  • History & export โ€” automatically logs scans to your platform's data directory, viewable with --history and exportable as JSON, CSV, or TXT.
  • Library API โ€” importable as a Python package (activevpn.scan(), NetworkDetector, typed ScanResult), 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.

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:

  1. System Internal Check โ€” detected VPN/Tor interfaces and processes.
  2. External IP Analysis โ€” public IP, country, ISP/org, IPv4/IPv6, and a verdict.
  3. DNS Consistency Check โ€” traffic IP vs. DNS resolver IP.
  4. 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             # 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.

Using as a Library

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)):
    pass

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

  • Built with rich for the terminal UI and pyfiglet for the ASCII banner.
  • Public IP and DNS data provided by the ip-api.com, ipinfo.io, ipapi.co, and ipify.org APIs.
  • Made 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.3.0.tar.gz (27.1 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.3.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for activevpn-2.3.0.tar.gz
Algorithm Hash digest
SHA256 1cc1d28fb6c39b0d24859227abf2cf200fc996af5852c9871d9c7dc1140bbf46
MD5 f40b4ada43edaa80bfedbbbf8d399751
BLAKE2b-256 0b11b8e96a9df3201a676ab341c02458c6c650efa311be1f07de42e680639676

See more details on using hashes here.

File details

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

File metadata

  • Download URL: activevpn-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 23.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eedb501ad72942e78e59eea1be5d153df92f548ed12097ba55cd23a08c2d2dca
MD5 7ab3f4b90d8dab1dcab7ae185bdad8e1
BLAKE2b-256 c33975602731c91d3d1e9a9e78950377ea5ebf7d1aa2105139530e641205a28a

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