The task is to use different proxy servers for different domains, pre-specifying which domains should be routed through which proxy server.
This solution restores the familiar practice of using a single browser for everything, eliminating the need to segregate specific types of websites into different browsers, each with its own pre-configured proxy.
1. Installing Clash for Windows
Download the latest version of Clash
1.1 Installation
Run the installer and open the application.
1.2 Creating a New Profile
Create a configuration file as follows, where you need to specify your proxy server parameters (IP, login, password).
Also, specify which domains should be opened through which proxy.
config_my.yaml
With the following content:
# config_my.yaml
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
external-controller: 127.0.0.1:9090
# Proxy Servers
proxies:
# First proxy
- name: "la_proxy"
type: socks5
server: first-proxy.tld
port: 8449
username: proxy_user
password: proxy_password
# Second proxy
- name: "corp_network"
type: socks5
server: second-proxy.tld
port: 8449
username: proxy_user
password: proxy_passord
# Proxy Groups
proxy-groups:
- name: "PROXY"
type: select
proxies:
- "la_proxy"
- "corp_network"
- "DIRECT"
# Rules
rules:
# Specific rules first
- DOMAIN-SUFFIX,synay.net,corp_network
- DOMAIN-SUFFIX,example.com,corp_network
- DOMAIN-SUFFIX,2ip.ru,corp_network
- DOMAIN-SUFFIX,my-second-office.com,la_proxy
- DOMAIN-SUFFIX,corp.portal2.com,la_proxy
# Last rule - everything else
- MATCH,DIRECT
Load the configuration in the Profiles -> Import
section.
1.3 Activate the Profile
Click on the profile to activate it, and also enable the proxy globally in the General
settings tab.
General -> System Proxy -> On
To use the application continuously, also enable the following options:
General -> Start with Windows -> On
And also silent mode:
Settings -> Silent Start -> On
This configuration example, utilizing multiple proxy servers, allows you to work with several segregated corporate resources simultaneously in any browser (globally), whether it's an internal portal or a CRM.
Such a setup makes work convenient and comfortable, eliminating the need for constant switching. Furthermore, it allows you to restrict other transit traffic directly on the proxy servers.