A simple Bash script that identifies exactly which network interface your VPN is using by comparing system states before and after connection. This tool is perfect for configuring VPN Binding in BitTorrent clients (like qBittorrent).
You can install this tool with a single command. This will download the script and allow you to run it globally by typing vpn-detect.
bash <(curl -sSL https://github.com/DD00031/vpn-detect/raw/refs/heads/main/install.sh)Usage: Once installed, simply open your terminal and type:
vpn-detectIf you prefer to install it manually without the script above:
- Clone the repository:
git clone https://github.com/DD00031/vpn-detect.git
cd vpn-detect- Make the script executable:
chmod +x vpn-detect.sh- Run it locally:
./vpn-detect.sh- (Optional) Move to bin for global usage:
sudo mv vpn-detect.sh /usr/local/bin/vpn-detect- OS: Linux or macOS
- Dependencies:
net-tools- This script relies on
ifconfig. - Ubuntu/Debian:
sudo apt install net-tools - macOS: Pre-installed by default.
- This script relies on
- The script scans your current network interfaces.
- It pauses and prompts you to connect to your VPN.
- Once connected, it rescans the interfaces.
- It compares the two lists to identify the new interface created by the VPN tunnel.
vpn-detect is available under the GPL-3.0 license.
This project was built with the help of Claude Sonnet 3.5 as a personal solution. I won't be actively maintaining this project, but feel free to open an issue or submit a pull request!