Monitors Windows App and enforces VPN usage.
Project description
VPN Monitor
A Windows background application that monitors specific "Windows App" processes (e.g., msrdc.exe, Windows365.exe) and enforces VPN usage by checking the current region.
Features
- Process Monitoring: Detects if
msrdc.exeorWindows365.exehas a visible window. - Region Check: Verifies if the current public IP is in the allowed country (default: HU).
- Allowed IPs: Supports an optional list of allowed external IPs that bypass the country check.
- Warning System: Displays a custom, topmost warning window if the region is incorrect while the target app is running.
- System Tray:
- Snooze functionality (5m, 15m, 1h, 8h).
- Set Allowed Country.
- Exit.
- Startup Integration: Can register itself to run at Windows startup.
Installation
- Prerequisites: Python 3.8+
- Install Dependencies:
pip install -r requirements.txt
(Orpip install psutil requests pystray Pillow)
Usage
Running from Source
python run.py
Command Line Arguments
--install-startup: Registers the app to run on Windows startup.--remove-startup: Removes the app from Windows startup.
Configuration
Allowed Country
The default allowed country is HU (Hungary). You can change this via the System Tray menu ("Set Country...") or by setting the ALLOWED_COUNTRY environment variable.
Allowed IPs (Bypass)
You can create a file named allowed_ips.txt in the same directory as the executable (or run.py).
Add one IP address per line. If your current external IP matches any IP in this list, the warning will be suppressed regardless of your country.
Example allowed_ips.txt:
203.0.113.1
198.51.100.2
Building Executable
To build a standalone .exe:
pyinstaller --noconsole --onefile --name vpn-monitor run.py
The output will be in the dist folder.
Development
Releasing a New Version
This project uses setuptools-scm — the version is automatically derived from git tags. No version is stored in pyproject.toml.
To release a new version:
git tag v1.0.0
git push --tags
Pushing the tag triggers the release workflow, which builds the executable and creates a GitHub release. The package version is automatically set based on the tag (e.g., tag v1.0.0 → version 1.0.0).
Project details
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 vpn_monitor-0.6.0.tar.gz.
File metadata
- Download URL: vpn_monitor-0.6.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1067651db3137fc1b745cc4950e41624dca4be218208428ae62ab7c2752b6eee
|
|
| MD5 |
e472a5933108f4178bd566de0a5abd74
|
|
| BLAKE2b-256 |
d91689f6b7dc45f26478050532fd487375156eacfdb022aad00848b110512ec2
|
Provenance
The following attestation bundles were made for vpn_monitor-0.6.0.tar.gz:
Publisher:
release.yml on henrykp/vpn_status_monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vpn_monitor-0.6.0.tar.gz -
Subject digest:
1067651db3137fc1b745cc4950e41624dca4be218208428ae62ab7c2752b6eee - Sigstore transparency entry: 731659271
- Sigstore integration time:
-
Permalink:
henrykp/vpn_status_monitor@6062d12ee3f07cab76ba97d024d9d0a8719984f2 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/henrykp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6062d12ee3f07cab76ba97d024d9d0a8719984f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vpn_monitor-0.6.0-py3-none-any.whl.
File metadata
- Download URL: vpn_monitor-0.6.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d5cdff04fde37877cac04d251342dc19f63e22e64144addfcfb1cea160bb0a8
|
|
| MD5 |
e2e252b847101dae6d42289dfc862c21
|
|
| BLAKE2b-256 |
c241ce36a372e45edee5d342088073e245da611b3fd1b497b6b41f6ba1cb6adb
|
Provenance
The following attestation bundles were made for vpn_monitor-0.6.0-py3-none-any.whl:
Publisher:
release.yml on henrykp/vpn_status_monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vpn_monitor-0.6.0-py3-none-any.whl -
Subject digest:
9d5cdff04fde37877cac04d251342dc19f63e22e64144addfcfb1cea160bb0a8 - Sigstore transparency entry: 731659272
- Sigstore integration time:
-
Permalink:
henrykp/vpn_status_monitor@6062d12ee3f07cab76ba97d024d9d0a8719984f2 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/henrykp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6062d12ee3f07cab76ba97d024d9d0a8719984f2 -
Trigger Event:
push
-
Statement type: