Skip to main content

How to set up a proxy chain in Clash Verge Rev: route Claude through a static IP

Set up a proxy chain in Clash Verge Rev with your VPN node as the entry and a static IP as the exit, so Claude always sees one IP. Two ways: a few clicks in chain mode, or an Extend Script that sends only Claude through the static IP. Tested on the Mihomo core.

Dark illustration: a laptop connects to a hop 1 route tile, then a dotted line runs to a tag reading static IP · LA and socks5, which links to a claude.ai browser window; a tag below reads dialer-proxy chain
Share
On this page

Once this is set up, Claude on your computer always sees the same static IP, no matter which VPN node you switch to in front of it. It takes about ten minutes in Clash Verge Rev.

You need three things:

  • Clash Verge Rev v2.4.5 or later on Windows or macOS. Proxy chains arrived in v2.4.5; the latest release as of writing is v2.5.10.
  • A working proxy subscription (your VPN or "airport" nodes), already imported into Clash Verge Rev.
  • Connection details for one static IP: IP, port, username and password.

What is a proxy chain?

A proxy chain sends your traffic through two proxies in a row: first the node you already use (the entry, or first hop), then the static IP (the exit). Websites only ever see the exit.

Proxy chain: Clash Verge Rev on your computer (127.0.0.1) connects to your VPN node (entry, first hop), then the static IP (exit, Los Angeles, socks5 or http), then claude.ai, which only sees the static IP

Why not connect to the static IP directly? If your network can reach it, you can: add the node as in Option A, step 1, and select it like any other node. Most networks outside mainland China can. A chain helps in two cases. Some networks can't reach overseas static IPs at all (ours can't be reached directly from mainland China). And sometimes you want your usual VPN in front for its own reasons. Shared VPN nodes change all the time; the static IP gives Claude one steady sign-in location.

Copy the static IP in socks5 format

If you bought a static IP from AIMacMini, open it under My Services after delivery, pick socks5://… in the format menu and click Copy:

AIMacMini My Services static IP card with socks5://… selected; the field shows socks5://demo-us:(password hidden)@11.22.33.44 next to a Copy button

You get one line in the form socks5://username:password@IP:port, for example (sample values):

socks5://user123:pass456@203.0.113.10:1080

A static IP from another provider works the same way; build the line yourself, or start it with http:// if the provider only offers HTTP. If the username or password contains characters like @, : or #, URL-encode them first (@ becomes %40) or the app will misread the line.

Pick one of two setups

  • Option A: chain mode. All clicks, done in a few minutes. The catch: everything routed to the proxy group you pick goes through the static IP, video included.
  • Option B: Extend Script. Paste a short script, and only Claude's domains use the static IP while everything else stays on your VPN.

If you're unsure, go with Option B. Use one or the other, not both.

Option A: set up the chain in a few clicks

1. Add the static IP to your subscription

In Clash Verge Rev, go to Profiles, right-click the subscription you're using and choose Edit Proxies. Paste the line into the box on the left, click Prepend Proxy, then Save at the bottom right. The official docs only show the Chinese UI, but the layout is the same:

Clash Verge Rev Edit Proxies dialog, Chinese UI: http:// and socks5:// lines pasted on the left, Prepend Proxy and Append Proxy buttons below, two new green HTTP and SOCKS5 nodes at the top of the list on the right, Save at the bottom right
Clash Verge Rev docs

Prepend and Append only decide whether the new node goes to the top or bottom of the list. They have nothing to do with the chain order. Nodes added here are stored locally and survive subscription updates.

2. Switch to chain mode and click the two nodes in order

Open the Proxies page and switch the mode at the top right to Chain Proxy. Under Proxy Rules, use Select Rules to pick the proxy group that Claude traffic goes through in your subscription.

Not sure which group that is? Open claude.ai once in your browser, then go to the Connections page in Clash Verge Rev and find the claude.ai entry; it shows the group and node it went through.

Now click two nodes in order: first one of your VPN nodes, then the static IP node you just added. In the Chain Proxy Config panel on the right, the top node is the entry and the bottom one is the exit. Click Connect.

Clash Verge Rev in chain proxy mode, Chinese UI: mode switched to Chain Proxy at the top right, node list in the middle, and the chain panel on the right with a US VPN node first and a SOCKS5 node second, with the Connect button above

Once connected, the group you picked is switched to the exit node, and everything your rules send to that group leaves through the static IP. If you picked your subscription's main group, every proxied site will use the static IP and run at its speed.

3. Check your exit IP on ipinfo.io

Open ipinfo.io. If it shows your static IP and the right city, you're done. To check the IP's type and reputation, the sites in our Claude IP check are a good start.

Option B: send only Claude through the static IP with a script

1. Paste the Extend Script

Right-click the subscription, choose Extend Script, replace its contents with the script below, and change server, port, username and password to your own:

function main(config, profileName) {
  const staticIP = {
    name: "Static-IP-LA",
    type: "socks5",
    server: "203.0.113.10",
    port: 1080,
    username: "user123",
    password: "pass456",
    "dialer-proxy": "Entry",
  };
  config.proxies.push(staticIP);
  config["proxy-groups"].push({
    name: "Entry",
    type: "select",
    proxies: config.proxies.filter(p => p.name !== staticIP.name).map(p => p.name),
  });
  const claude = ["claude.ai", "claude.com", "anthropic.com", "claudeusercontent.com", "ipinfo.io"];
  config.rules = claude.map(d => `DOMAIN-SUFFIX,${d},${staticIP.name}`).concat(config.rules);
  return config;
}

The script runs every time the subscription builds its config. It:

  • adds a socks5 node named Static-IP-LA whose dialer-proxy points to Entry, so it connects through Entry first;
  • adds an Entry group containing all the nodes from your subscription;
  • puts rules at the top so claude.ai, claude.com, anthropic.com and claudeusercontent.com go through the static IP. ipinfo.io is there so you can check the result; delete it once you're happy.

2. Use Rule mode and pick an entry node

Save, then set the mode on the Proxies page to Rule. In the Entry group, pick a stable VPN node.

If you ever turned chain mode on and then off, Clash Verge Rev strips every dialer-proxy from the running config. Click the current subscription again on the Profiles page to rebuild it.

3. Check both exits

ipinfo.io should now show the static IP, while any other IP-check site still shows your VPN's IP. If both are right, only Claude's domains are using the static IP.

We tested this setup on November 25 with the Mihomo core that Clash Verge Rev ships (v1.19.34), using a local entry node and a password-protected socks5 exit. ipinfo.io went through the static IP and other sites went through the entry node. The log, unedited:

[TCP] 127.0.0.1:42598 --> ipinfo.io:443 match DomainSuffix(ipinfo.io) using Static-IP-LA
[TCP] 127.0.0.1:42606 --> www.example.com:443 match Match using Entry[node-A]

Send Claude Code in the terminal through it too

Browsers and the Claude desktop app follow Clash Verge Rev once System Proxy is on. Claude Code in a terminal doesn't always read system proxy settings, so set it before you start (7897 is Clash Verge Rev's default port; check Settings for yours):

export HTTPS_PROXY=http://127.0.0.1:7897
export HTTP_PROXY=http://127.0.0.1:7897
claude

In Windows PowerShell, use $env:HTTPS_PROXY="http://127.0.0.1:7897". With the Option B script in place, Claude Code's requests to anthropic.com follow the same rule.

Fix a chain that won't connect

The static IP node shows a timeout or Error when tested alone. That's expected on networks that can't reach it directly: a single-node test connects straight from your computer. Go by what ipinfo.io shows once the chain is connected.

The log says rejected username/password. The username or password is wrong. We entered a wrong password on purpose during testing and got exactly this line. Copy the details again, and check URL encoding if the password has special characters.

ipinfo.io still shows your VPN's IP. With Option A, check that the group you picked under Select Rules is the one ipinfo.io actually goes through (the Connections page shows it). With Option B, make sure you're in Rule mode and the node name matches the name in the rules.

It connects but it's slow. A chain runs at the speed of its slowest hop, and the latency of both hops adds up. Pick an entry node close to the static IP (a US node for a US static IP) and it usually speeds up a lot.

It worked yesterday and now nothing loads. If any node in the chain goes down, the whole chain fails. Try another entry node first. If that doesn't help, test the static IP on its own from an overseas machine, then contact the seller.

If you'd rather not run a proxy setup on your own computer, a AIMacMini Mac mini in Korea is a whole machine on a KT home broadband line; pick it or a static IP, not both. If you don't have a static IP yet, the static IP page has Local ISP and Home Broadband IPs, with a free 1-day trial on Local ISP IPs. Our ISP proxy vs residential proxy guide explains the difference.

Share

The official AIMacMini blog. Every price, rule and number in our articles links to its source and check date, and we update them when they change.

Start here

Ordered separately and delivered in order after payment.

Get a Claude subscription

Opened with a US physical card, one account per customer.

From $69.90/mo

Not sure which to pick? Talk to support