๐ 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:
-
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).
- It scans your operating system (Linux, Windows, macOS, Android/Termux) for network interfaces commonly used by VPN protocols (e.g.,
-
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".
-
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
richlibrary 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-forcefallback). - ๐ History Logging: Automatically saves scan results to
.scan_history.jsonfor 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_NAMESor interface prefixes toVPN_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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - 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 |
| @rkriad585 | facebook.com/rkriad585 | |
| @rkriad585 | instagram.com/rkriad585 | |
| Threads | @rkriad585 | threads.net/@rkriad585 |
| rkriad585 | mailto:rkriad585@gmail.com |
๐ License
Distributed under the MIT License. See LICENSE for more information.
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1ccfb2c61b6259bab18a0e6ef24183458840979f4d8c30e0906fa10adf9949c
|
|
| MD5 |
95c7fc43f4946196744b4278648295e7
|
|
| BLAKE2b-256 |
a38a909a5e65c9ecbb3432d48412cb93b96dd2a5db791172bd4e593effb7faa7
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
872267cc21ead6d80a881886446a26b04a748bdcb99ad62bb8567e9dbe047f08
|
|
| MD5 |
6a2b3301c4724bded82e0713bb9c18cf
|
|
| BLAKE2b-256 |
b444726a4dae40354c106a96aa41a4f51f2b0ebadf6db3f8f147faf733fb561b
|