# What Protocols Does the bannedbook/fanqiang Repository Support? A Complete Technical Guide

> Discover the bannedbook/fanqiang repository's supported protocols including V2Ray, Shadowsocks, and Trojan. Get a complete technical guide for seamless configuration.

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

---

**The bannedbook/fanqiang repository supports V2Ray protocols (VMess, VLESS, SOCKS5, freedom, blackhole), Shadowsocks, ShadowsocksR with multiple authentication methods, and Trojan, all configurable through JSON templates and shell scripts in the `v2ss/` directory.**

The bannedbook/fanqiang repository is a comprehensive collection of configuration templates, shell scripts, and documentation for deploying proxy servers to circumvent network censorship. As an open-source anti-censorship toolkit, it provides ready-to-deploy setups for multiple proxy protocols that users can activate by modifying JSON configuration files or running interactive helper scripts.

## Core Proxy Protocols Supported by fanqiang

The repository organizes its protocol support around V2Ray core capabilities and Shadowsocks implementations, with configuration files located primarily in the `v2ss/` directory.

### V2Ray Inbound Protocols: VMess and VLESS

The primary V2Ray configuration file at [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json) defines the **vmess** protocol as the default inbound handler. At line 21, the configuration explicitly sets `"protocol": "vmess"` for accepting client connections.

While **vless** is not hardcoded in the provided templates, the repository structure supports it natively. Users can switch from VMess to VLESS by editing the `"protocol"` field in the inbound configuration, as the templates are designed to work with the standard V2Ray core that supports both protocols.

### Shadowsocks and ShadowsocksR Implementation

For Shadowsocks, the repository provides dedicated documentation in `v2ss/自建Shadowsocks服务器简明教程.md` (line 70) showing how to configure `"protocol": "shadowsocks"` with AEAD ciphers like `aes-256-gcm`.

ShadowsocksR support extends this through the helper script at [`v2ss/images/backup/ssr.sh`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/images/backup/ssr.sh). This script enumerates multiple authentication protocols including:

- `origin`
- `auth_sha1_v4`
- `auth_aes128_md5`
- `auth_aes128_sha1`
- `auth_chain_a`
- `auth_chain_b`

The script automatically writes the selected protocol into the JSON configuration during server setup.

### SOCKS5 and HTTP Routing Protocols

The configuration at [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json) (line 31) includes **socks** protocol support for inbound connections, enabling standard SOCKS5 proxy functionality.

For outbound traffic management, the repository implements two key V2Ray routing protocols:

- **`freedom`**: Configured at lines 36-42, this protocol forwards traffic directly using the native HTTP stack, effectively creating HTTP/HTTPS outbound capability
- **`blackhole`**: Paired with freedom in the same configuration section, this protocol blocks unwanted traffic by routing it to a null destination

### Trojan Support via V2Ray Core

Although not explicitly configured in the default templates, Trojan is supported through the underlying V2Ray core. Advanced users can enable **trojan** protocol by modifying the `"protocol"` field in the outbound configuration files, as documented in the repository's README sections regarding proxy protocols.

## Practical Configuration Examples

### Configuring VMess Inbound

The default V2Ray server configuration in [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json) implements VMess with the following structure:

```json
{
  "inbounds": [
    {
      "listen": "0.0.0.0",
      "port": 1234,
      "protocol": "vmess",
      "settings": {
        "clients": [{ "id": "7966c347-b5f5-46a0-b720-ef2d76e1836a" }]
      },
      "streamSettings": { "network": "tcp" }
    }
  ]
}

```

### Switching to Shadowsocks

To deploy Shadowsocks instead of VMess, modify the inbound protocol as shown in `v2ss/自建Shadowsocks服务器简明教程.md`:

```json
{
  "inbounds": [
    {
      "listen": "0.0.0.0",
      "port": 8388,
      "protocol": "shadowsocks",
      "settings": {
        "method": "aes-256-gcm",
        "password": "yourPassword",
        "udp": true
      }
    }
  ]
}

```

### Selecting ShadowsocksR Authentication

The [`ssr.sh`](https://github.com/bannedbook/fanqiang/blob/main/ssr.sh) script provides interactive protocol selection. Internally, it defines available protocols and updates the configuration:

```bash
protocols=(
    "origin"
    "auth_sha1_v4"
    "auth_aes128_md5"
    "auth_aes128_sha1"
    "auth_chain_a"
    "auth_chain_b"
)
sed -i 's/"protocol": ".*"/"protocol": "'"${selected}"'"/' config.json

```

### Implementing Freedom and Blackhole Outbounds

For traffic routing control, the repository includes standard V2Ray outbound definitions:

```json
{
  "outbounds": [
    { "protocol": "freedom", "tag": "direct" },
    { "protocol": "blackhole", "tag": "block" }
  ]
}

```

## Key Configuration Files

Understanding these specific files is essential for protocol customization:

- **[`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json)**: Contains concrete V2Ray configurations supporting `vmess`, `socks`, `freedom`, and `blackhole` protocols
- **[`v2ss/images/backup/ssr.sh`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/images/backup/ssr.sh)**: Shell script that enumerates and configures ShadowsocksR authentication protocols
- **`v2ss/自建Shadowsocks服务器简明教程.md`**: Documentation for Shadowsocks protocol implementation
- **`v2ss/自建V2Ray+TLS翻墙配置方法.md`**: Guide for V2Ray server setup listing supported inbound/outbound protocols
- **[`windows/ClashDotNetFramework.md`](https://github.com/bannedbook/fanqiang/blob/main/windows/ClashDotNetFramework.md)**: Shows integration with Clash, which supports `vmess`, `ss`, `trojan`, and `socks5`

## Summary

- **VMess and VLESS**: Primary V2Ray inbound protocols configured in [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json)
- **Shadowsocks and ShadowsocksR**: Supported with AEAD ciphers and multiple authentication methods via [`ssr.sh`](https://github.com/bannedbook/fanqiang/blob/main/ssr.sh)
- **SOCKS5**: Standard inbound proxy protocol available on configurable ports
- **Trojan**: Supported through V2Ray core configuration changes
- **Routing Controls**: `freedom` enables direct HTTP/HTTPS access while `blackhole` blocks unwanted traffic
- **Configuration Method**: All protocols selectable by editing JSON `"protocol"` fields or using provided shell scripts

## Frequently Asked Questions

### Can I switch from VMess to VLESS without reinstalling the server?

Yes. Edit the [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json) file and change the `"protocol"` value from `"vmess"` to `"vless"` in the inbounds section. The repository uses standard V2Ray core, so any protocol supported by V2Ray can be enabled by updating the JSON configuration and restarting the service.

### What ShadowsocksR authentication protocols are available in fanqiang?

The [`v2ss/images/backup/ssr.sh`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/images/backup/ssr.sh) script supports six authentication protocols: `origin`, `auth_sha1_v4`, `auth_aes128_md5`, `auth_aes128_sha1`, `auth_chain_a`, and `auth_chain_b`. Users select these during the interactive setup process, and the script automatically updates the configuration file using `sed` substitutions.

### Does the bannedbook/fanqiang repository support Trojan proxies?

Yes. While the default configurations emphasize VMess and Shadowsocks, the repository's V2Ray templates can be modified to use the Trojan protocol by changing the `"protocol"` field to `"trojan"` in the appropriate JSON configuration files. The underlying V2Ray core supports this protocol natively.

### How do I configure direct internet access for certain traffic while blocking others?

Use the `freedom` and `blackhole` outbound protocols defined in [`v2ss/server-cfg/v2/config.json`](https://github.com/bannedbook/fanqiang/blob/main/v2ss/server-cfg/v2/config.json). The `"freedom"` tag routes traffic directly through the native HTTP stack without proxying, while the `"blackhole"` tag drops unwanted traffic. These standard V2Ray protocols are configured in the outbounds array starting at line 36.