# How to Configure Chain Proxies in V2RayN: Complete Setup Guide

> Master V2RayN chain proxy configuration with our complete setup guide. Learn to route traffic through intermediate SOCKS5 or HTTP proxies for enhanced privacy and security.

- Repository: [如何翻墙/fanqiang](https://github.com/bannedbook/fanqiang)
- Tags: how-to-guide
- Published: 2026-09-05

---

**V2RayN supports chain proxies by routing decrypted traffic from a primary V2Ray node through an intermediate SOCKS5 or HTTP proxy, configured through three distinct subscription groups in the client interface.**

Chain proxies provide an extra layer of routing that sends your traffic through a V2Ray tunnel before forwarding it to a residential or data center proxy. This technique proves essential when accessing services that block direct VPN connections or when you require additional IP masking. The following guide uses the official documentation from the bannedbook/fanqiang repository to walk through the exact configuration steps.

## Understanding the Chain Proxy Architecture

V2RayN implements chain proxies using a three-tier logical structure that processes traffic sequentially:

- **翻墙节点 (Proxy Nodes)**: Primary V2Ray or Shadowsocks nodes that handle the initial encrypted tunnel. These are imported via subscription links or manual configuration.
- **住宅节点 (Residential Nodes)**: Intermediate SOCKS5 or HTTP proxies that receive decrypted traffic from the V2Ray node. You define these with specific credentials and endpoints.
- **链式代理 (Chain Definitions)**: Combination entries that link a parent V2Ray node to a child residential proxy, creating the full routing path.

According to the source documentation in `如何使用v2rayN配置链式代理.md`, this architecture allows the client to establish the V2Ray tunnel first, then transparently forward all packets through the designated downstream proxy before reaching the final destination.

## Prerequisites

Before configuring chain proxies, verify you have the following components ready:

- **V2RayN version 7.15.7 or higher**: Earlier versions may not support the chain proxy UI elements described in [`windows/V2RayN.md`](https://github.com/bannedbook/fanqiang/blob/main/windows/V2RayN.md).
- **Active V2Ray subscription**: A working VMess or Shadowsocks node that serves as the chain parent.
- **Residential proxy credentials**: SOCKS5 or HTTP proxy details including address, port, username, and password for the intermediate hop.

## Step-by-Step Configuration Guide

### Create the Subscription Groups

Open V2RayN and navigate to **订阅分组 (Subscription Groups)**. Create three distinct groups with the following exact names:

1. **翻墙节点**: For your primary V2Ray or Shadowsocks nodes.
2. **住宅节点**: For your SOCKS5 or HTTP residential proxies.
3. **链式代理**: For the chain definitions that combine the above two.

### Add V2Ray Nodes to the Proxy Group

Select the **翻墙节点** group and click **配置项 (Configuration)**. Import your subscription link or manually add VMess/Shadowsocks nodes. These entries serve as the first hop in your chain, encrypting traffic before it reaches the residential proxy layer.

### Configure the Residential Proxy

Switch to the **住宅节点** group and open the configuration editor. Add a new proxy entry with these parameters:

- **Type**: Select **SOCKS5** or **HTTP** depending on your provider.
- **Address**: The IP or hostname of your residential proxy.
- **Port**: The proxy port number.
- **Credentials**: Username and password for authentication.

Save the entry. The repository documentation in `如何使用v2rayN配置链式代理.md` emphasizes placing these definitions in their dedicated group to prevent mixing with standard V2Ray nodes.

### Build the Chain Proxy Configuration

Navigate to the **链式代理** group and initiate a new configuration. In the chain editor:

1. Click **添加子项 (Add Child Item)**.
2. Select your previously configured V2Ray node as the parent.
3. Select your residential proxy from the **住宅节点** group as the child.

This establishes the routing order: application traffic → V2Ray encryption → residential proxy → target website. Save the chain configuration before proceeding.

### Activate the Chain and Verify Connectivity

Return to the **链式代理** view and select your newly created chain entry. Click **设为活动 (Set as Active)** to enable the configuration. For full-system routing, enable **Tun Mode** to create a virtual network interface.

Verify the setup by checking the latency display in V2RayN (expect values like "201 ms" depending on your path). Test with a browser using the system proxy to confirm traffic routes through both hops. The visual guides in `v2ss/images/v2rayn-proxy-chain01.png` demonstrate the expected UI state during activation.

## Manual Configuration File Structure

While the UI generates configurations automatically, you can manually create or edit chain definitions using JSON files stored in `%AppData%\V2RayN\config`. The following structure illustrates a minimal chain configuration:

```json
{
  "type": "chain",
  "name": "MyChain",
  "nodes": [
    {
      "type": "vmess",
      "address": "v2ray.example.com",
      "port": 443,
      "uuid": "<vmess-uuid>",
      "alterId": 0,
      "network": "ws"
    },
    {
      "type": "socks",
      "address": "socks.example.net",
      "port": 1080,
      "username": "user",
      "password": "pass"
    }
  ]
}

```

Place this file in the configuration directory and reload V2RayN to import the chain definition manually.

## Key Performance and Security Considerations

When implementing chain proxies in V2RayN, account for these operational factors:

- **Latency impact**: Each proxy hop adds round-trip time. Select residential proxies geographically close to your target services to minimize delay.
- **Credential exposure**: Store proxy passwords securely; avoid sharing configuration files containing residential credentials, as noted in the bannedbook/fanqiang security guidelines.
- **Client updates**: Maintain V2RayN ≥ 7.15.7 to ensure compatibility with the latest chain proxy features and stability improvements.

## Summary

- V2RayN chain proxies route traffic sequentially through a V2Ray node (翻墙节点) and a SOCKS5/HTTP proxy (住宅节点).
- Configuration requires setting up three distinct subscription groups and linking them in the **链式代理** section.
- The UI generates underlying JSON configurations automatically, but manual edits are possible via `%AppData%\V2RayN\config`.
- Activate chains using **设为活动** and enable **Tun Mode** for system-wide routing.
- Visual references are available in the repository's `v2ss/images/` directory, specifically `v2rayn-proxy-chain01.png`.

## Frequently Asked Questions

### What is the minimum V2RayN version required for chain proxy functionality?

You need V2RayN version 7.15.7 or higher to access the chain proxy configuration interface and subscription grouping features described in the bannedbook/fanqiang documentation. Earlier versions lack the UI elements necessary to define parent-child relationships between proxy nodes.

### Can I chain multiple HTTP proxies instead of using SOCKS5?

Yes, the **住宅节点** group accepts both HTTP and SOCKS5 proxy types. When configuring the residential node, select HTTP from the protocol dropdown and provide the standard address, port, and authentication credentials. The chain will route decrypted V2Ray traffic through the HTTP proxy exactly as it would with SOCKS5.

### How do I verify that my traffic is actually routing through both proxies?

After activating the chain proxy in V2RayN, check the client logs for connection indicators showing both the VMess endpoint and the SOCKS/HTTP proxy address. Additionally, test your public IP address in a browser; it should match the residential proxy's IP rather than the V2Ray node's exit IP, confirming that traffic flows through both layers.

### Where does V2RayN store chain proxy configuration files?

Chain proxy configurations are stored as JSON files in the `%AppData%\V2RayN\config` directory on Windows. You can manually edit these files or place exported configurations there before reloading the client, as referenced in the configuration examples from `如何使用v2rayN配置链式代理.md`.