# How to Integrate bannedbook/fanqiang into Existing Networks: Complete Deployment Guide

> Integrate bannedbook/fanqiang into your network. Deploy V2Ray or ShadowsocksR on a VPS and configure your router for transparent proxying across your entire LAN with a subscription URL.

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

---

**Integrate bannedbook/fanqiang into existing networks by deploying a V2Ray or ShadowsocksR server on a VPS, generating a subscription URL, and importing that link into an OpenWrt or Merlin router to create a transparent proxy gateway for your entire LAN.**

The **bannedbook/fanqiang** repository is a comprehensive collection of open-source proxy tools and configuration templates designed for network-wide censorship circumvention. When you integrate bannedbook/fanqiang into existing networks, you transform a standard LAN into a privacy-focused environment by routing traffic through a remote proxy server and an edge router acting as a transparent gateway. Unlike monolithic VPN applications, this repository provides modular components—including server-side scripts, router firmware guides, and client configurations—that you assemble to build a maintainable circumvention solution.

## Architectural Components for Network Integration

### The Three-Tier Proxy Topology

The integration follows a tiered architecture where each component has a specific role:

- **Remote VPS**: Runs **V2Ray** or **ShadowsocksR** services and hosts a subscription URL (e.g., `https://example.com/subscribes/ssr`), configured using templates from `v2ss/自建V2ray服务器简明教程.md`.

- **Edge Router**: An OpenWrt or Merlin-based device running **ShadowsocksR-plus** or **Fancyss** that imports the subscription URL and routes all LAN traffic through the proxy. Configuration guides are located in [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md) and [`router/Merlin.md`](https://github.com/bannedbook/fanqiang/blob/main/router/Merlin.md).

- **Client Devices**: Windows, macOS, Linux, Android, or iOS devices that either rely on the router’s transparent proxy mode or run dedicated clients like V2RayN (documented in [`windows/V2RayN.md`](https://github.com/bannedbook/fanqiang/blob/main/windows/V2RayN.md)) or ClashX (from [`macos/ClashX.md`](https://github.com/bannedbook/fanqiang/blob/main/macos/ClashX.md)).

## Step-by-Step Deployment Guide

### Provision the Remote Server (VPS)

Begin by establishing the upstream proxy server that will handle your network’s external traffic.

1. **Create a VPS** with at least 1 CPU and 1GB RAM (services like Vultr or Linode).

2. **Install V2Ray** using the repository’s one-click script:

```bash
wget https://raw.githubusercontent.com/bannedbook/fanqiang/master/v2ss/server-cfg/v2/config.json -O /usr/local/etc/v2ray/config.json
bash <(curl -L -s https://github.com/bannedbook/fanqiang/raw/master/v2ss/V2ray官方一键安装脚本.md)

```

3. **Secure the subscription URL** generated by the installation script. This URL functions as a configuration distribution endpoint for your entire network.

The server configuration template originates from `v2ss/自建V2ray服务器简明教程.md` (lines 58-70), and file transfer procedures are detailed in `v2ss/使用FileZilla和VPS传输文件教程.md`.

### Deploy the Router Gateway

#### Option A: OpenWrt with ShadowsocksR-plus

Install the **ShadowsocksR-plus** plugin (available in most OpenWrt builds), then configure the subscription:

1. Navigate to **Server Nodes → Subscribe** in the router web UI.
2. Paste the subscription URL from your VPS.
3. Select **Save & Apply**.
4. Choose a running mode—**"Bypass China IP"** or **"GFW List"**—to determine traffic routing rules.

Detailed UI workflows are documented in [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md) (lines 29-44).

#### Option B: Merlin (Asus) with Fancyss

1. Download the **Fancyss** offline package from the official repository.
2. Install via the router’s Software Center.
3. Navigate to **Scientific Internet → Subscribe** and add the subscription URL.

Exact installation steps are specified in [`router/Merlin.md`](https://github.com/bannedbook/fanqiang/blob/main/router/Merlin.md) (lines 3-33).

### Configure Client Devices (Optional)

For devices that bypass the router or connect to separate networks, import the same subscription URL into platform-specific clients:

- **Windows**: V2RayN ([`windows/V2RayN.md`](https://github.com/bannedbook/fanqiang/blob/main/windows/V2RayN.md))
- **macOS**: ClashX ([`macos/ClashX.md`](https://github.com/bannedbook/fanqiang/blob/main/macos/ClashX.md))  
- **Android**: V2RayNG ([`android/V2RayNG.md`](https://github.com/bannedbook/fanqiang/blob/main/android/V2RayNG.md))

All clients support direct subscription URL import, ensuring consistent server settings across your infrastructure.

### Verify End-to-End Connectivity

Validate your deployment using these verification methods:

| Test | Command | Source Reference |
|------|---------|------------------|
| Server config syntax | `v2ray -test -config /etc/v2ray/config.json` | `v2ss/使用FileZilla和VPS传输文件教程.md` (line 119) |
| Router proxy status | Check OpenWrt UI **Status → ShadowsocksR Plus+** for "Running" | [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md) (line 41) |
| DNS resolution | `dig @8.8.8.8 example.com` should resolve through the proxy | — |

## Configuration Examples and Source Files

### Server-Side V2Ray Configuration

The standard server configuration uses the VMess protocol over WebSocket, as implemented in [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json):

```json
{
  "inbounds": [{
    "port": 443,
    "protocol": "vmess",
    "settings": {
      "clients": [{
        "id": "<UUID>",
        "alterId": 64
      }]
    },
    "streamSettings": {
      "network": "ws",
      "wsSettings": {
        "path": "/ray"
      }
    }
  }],
  "outbounds": [{
    "protocol": "freedom"
  }]
}

```

Generate the `<UUID>` using `cat /proc/sys/kernel/random/uuid` before deploying.

### Router Subscription Import

For automated OpenWrt configuration via CLI (alternative to the UI method in [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md)):

```bash
uci add shadowsocksr subscription
uci set shadowsocksr.@subscription[-1].url="https://your-vps.com/subscribes/ssr"
uci commit shadowsocksr
/etc/init.d/shadowsocksr restart

```

### Docker-Based Deployment

For containerized networks, refer to `v2ss/Docker 代理设置说明.md` to deploy proxy services as Docker containers instead of bare-metal VPS installations.

## Summary

- **bannedbook/fanqiang** is a toolbox requiring assembly, not a single binary installer.
- Deploy a **VPS server** using the one-click script from `v2ss/V2ray官方一键安装脚本.md`, then generate a **subscription URL**.
- Import the subscription into an **OpenWrt or Merlin router** to create a transparent gateway for your entire LAN.
- Optional per-device clients provide flexibility for mobile or remote workers.
- All configurations are open-source, customizable, and managed through standard repository files.

## Frequently Asked Questions

### Does bannedbook/fanqiang work with existing routers or require specific hardware?

The repository integrates with existing OpenWrt or Merlin-compatible routers. The guides in [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md) and [`router/Merlin.md`](https://github.com/bannedbook/fanqiang/blob/main/router/Merlin.md) detail how to install the **ShadowsocksR-plus** or **Fancyss** plugins on your current hardware without requiring specialized equipment.

### What is the role of the subscription URL in the integration process?

The subscription URL acts as a central configuration distribution point generated by the VPS server (as documented in `v2ss/自建V2ray服务器简明教程.md`). Routers and clients import this URL to automatically receive server settings, port numbers, and encryption parameters, eliminating manual configuration of each network device.

### Can I integrate bannedbook/fanqiang without a VPS?

While the standard three-tier architecture requires a VPS to host the V2Ray or ShadowsocksR service (configured via `v2ss/V2ray官方一键安装脚本.md`), you can deploy Docker-based proxies using `v2ss/Docker 代理设置说明.md` if you have access to existing server infrastructure or wish to run the proxy within your local network.

### How do I troubleshoot connection failures after integration?

Verify the server configuration syntax using `v2ray -test -config /etc/v2ray/config.json` (referenced in `v2ss/使用FileZilla和VPS传输文件教程.md` line 119). Check the router's ShadowsocksR Plus+ status page for "Running" status (from [`router/OpenWRT.md`](https://github.com/bannedbook/fanqiang/blob/main/router/OpenWRT.md) line 41), and confirm DNS resolution routes through the proxy using `dig @8.8.8.8` to detect potential leaks.