A simple and lightweight HTTP/HTTPS proxy server written in Go that allows you to dynamically select the network interface (VPN, Wi-Fi, Ethernet) for outgoing traffic. This tool solves the problem of testing connections from different source IP addresses without changing the default gateway of the operating system.
Auto-Discovery: Automatically scans the system (Windows/Linux) and detects active network interfaces. Dynamic Routing: Select the outgoing interface using the proxy username authentication method (e.g., http://vpn1@localhost:8080). HTTPS Support: Full support for TLS tunneling (CONNECT method). Zero Configuration: No configuration files required β the script automatically maps interface names to simple aliases.
Go (Golang) version 1.16 or newer. Operating System: Windows or Linux.
Clone the repository or download the main.go file.
Open a terminal in the project folder.
Run the program:
go run main.go
The proxy syntax is: http://<INTERFACE_ALIAS>@localhost:8080.
- Route through VPN (e.g., Local Area Connection 5): curl -v -x http://localarea5@localhost:8080 http://ifconfig.me
Should return your VPN IP address. 2. Route through Ethernet (LAN): curl -v -x http://ethernet@localhost:8080 http://ifconfig.me
Should return your home ISP IP address. 3. Default Route (System Gateway): curl -v -x http://localhost:8080 http://ifconfig.me
βοΈ Building (.exe) To create a standalone executable file: go build -o proxy.exe main.go
You can now run proxy.exe on other machines without installing Go.