Loading...

Tech Deep Dive

Multiple proxies: how to auto-switch multiple proxies pc

Learn how to automatically switch between multiple proxies on Windows or Mac using tools and scripts to manage different connections.

Multiple Proxies

Table of contents

  • Why use multiple proxies on a PC
  • Automatically switching proxies on Windows
  • Automatically switching proxies on macOS
  • Command-line based Proxy switching (cross-platform)
  • Using Python for automatic Proxy rotation
  • Automation with VPN + Proxy
  • Security considerations

Using multiple proxies on a PC can be useful for a variety of reasons: testing the geolocation of websites, managing multiple accounts on social networks, bypassing network restrictions, or simply for privacy and anonymity purposes.

However, manually switching proxies each time can become tedious and inefficient. In this guide, I’ll explain how to automatically switch between multiple proxies on Windows, macOS, and also using configuration scripts, open-source tools, or commercial software.

Why use multiple proxies on a PC

In the world of cyber security and advanced networking, managing multiple proxies is a common practice for:

  • Testing applications from different IP addresses
  • Automating undetectable web crawling
  • Bypassing geographical restrictions (e.g., content limited to certain countries)
  • Protecting your identity online by masking your IP address
  • Distributing request loads across different IPs

However, without a proxy auto-configuration system in place, each change requires manual configuration in the proxy server settings of the operating system or browser.

Automatically switching proxies on Windows

Method 1: Using Proxifier

Proxifier is a powerful commercial tool that allows you to route the traffic of any application through a proxy for the connection (SOCKS or HTTPS), and it can be configured to automatically rotate between multiple proxy servers.

Steps:

  • Download and install Proxifier from proxifier.com
  • Create a list of proxy servers
  • Set rules for specific applications or all traffic
  • Configure automatic rotation by enabling the “Proxy Chains” option and choosing an algorithm (round robin, failover, random)

In some cases, you can also insert a configuration script to handle server changes automatically.

Method 2: Custom PowerShell script

You can also automatically configure proxy switching with a PowerShell script that modifies the LAN settings directly. Example:

$proxyList = @(

    "http=123.123.123.1:8080",

    "http=124.124.124.1:8080",

    "http=125.125.125.1:8080"

)

for ($i=0; $i -lt $proxyList.Length; $i++) {

    $currentProxy = $proxyList[$i]

    netsh winhttp set proxy $currentProxy

    Write-Host "Proxy set to: $currentProxy"

    Start-Sleep -Seconds 300

}

This script acts directly on the system’s proxy server configuration. You can also manage it manually via Control Panel> Internet Options > LAN Settings, but in that case, you must manually configure each parameter, which is not practical for frequent rotation.

Automatically switching proxies on macOS

Method 1: AppleScript + Automator

macOS does not have a native interface for proxy auto-configuration, but you can use AppleScript combined with Automator to switch network configurations.

Example AppleScript to change the proxy:

do shell script "networksetup -setwebproxy Wi-Fi 123.123.123.1 8080"

do shell script "networksetup -setsecurewebproxy Wi-Fi 123.123.123.1 8080"

These commands act directly on the proxy server settings of the Wi-Fi network. They can be automated via cron, launchd, or apps like ControlPlane.

Method 2: Tools like Proxy SwitchyOmega (Browser-Based)

If your needs are limited to browsing websites, it’s enough to install browser extensions like:

  • SwitchyOmega (Chrome)
  • FoxyProxy (Firefox)

These tools allow for automatic configuration of multiple proxy profiles and fast switching based on custom rules.

Command-line based Proxy switching (cross-platform)

A very powerful approach is to use cross-platform tools such as:

1. Proxychains (Linux/macOS)

Proxychains lets you route the traffic of any application through a list of proxies.

Example proxy server configuration in /etc/proxychains.conf:

strict_chain

proxy_dns

remote_dns_subnet 224

[ProxyList]

socks5 127.0.0.1 9050

socks5 192.168.1.100 1080

http 203.0.113.1 8080

2. Tor + Proxychains

You can combine Proxychains with Tor to rotate IP addresses even more securely. This type of proxy can offer a high level of anonymity.

Using Python for automatic Proxy rotation

Anyone working in offensive cyber security can use Python to automatically configure multiple proxies in scraping or testing scripts.

Example:

import requests

import time

proxies = [

    {"http": "http://123.123.123.1:8080", "https": "http://123.123.123.1:8080"},

    {"http": "http://124.124.124.1:8080", "https": "http://124.124.124.1:8080"}

]

for proxy in proxies:

    try:

        response = requests.get("https://httpbin.org/ip", proxies=proxy, timeout=5)

        print(response.json())

    except Exception as e:

        print(f"Error: {e}")

    time.sleep(10)

Automation with VPN + Proxy

Some VPN services like NordVPN or Mullvad also provide proxy for the connection with IP rotation, often integrable with tools like Proxychains or Python scripts.

Security considerations

Using proxies in Windows or other systems requires caution. If the proxy is public, it may log traffic. It’s critical to:

  • Use trusted proxies
  • Verify the current IP address after each rotation
  • Set up secure DNS
  • Monitor the proxy server configuration
To top