How to Configure bannedbook/fanqiang: Complete V2Ray Server and Client Setup
The bannedbook/fanqiang repository provides a complete V2Ray-based censorship circumvention toolkit that requires deploying a server instance using the provided config.json and nginx.conf files, then importing the generated subscription link into platform-specific clients like V2RayN or ClashX.
The bannedbook/fanqiang repository is a curated collection of proxy-tool tutorials, configuration scripts, and ready-to-use packages designed to bypass internet censorship. It organizes resources by platform—Windows, macOS, Linux, Android, iOS, and routers—and supports multiple proxy technologies including V2Ray, Shadowsocks, SSR, and Brook. Configuring this repository involves setting up a central V2Ray server on a VPS and connecting clients through standardized subscription links.
Server-Side Configuration
The core of the fanqiang configuration is a V2Ray server deployed on a VPS. The repository provides specific configuration files under the v2ss/server-cfg/ directory to streamline this process.
Provision a VPS
Begin by acquiring a virtual private server from any provider. The repository includes detailed purchasing guides in v2ss/购买Vultr VPS图文教程.md and v2ss/V2ray官方一键安装脚本.md that walk through Vultr and 搬瓦工 (Bandwagon) setup. Ensure you have root access and a clean Ubuntu or Debian installation.
Install V2Ray Core
Install the official V2Ray binary using the installation script referenced in the repository:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
This script installs the binary to /usr/local/bin/v2ray and creates the configuration directory at /usr/local/etc/v2ray/.
Deploy the Server Configuration
The server configuration resides in v2ss/server-cfg/v2/config.json. Download this file to your server's configuration directory:
wget https://raw.githubusercontent.com/bannedbook/fanqiang/master/v2ss/server-cfg/v2/config.json -O /usr/local/etc/v2ray/config.json
The configuration file implements a VMess inbound protocol with TCP networking. Here is the essential structure:
{
"log": {"loglevel": "warning"},
"routing": {
"domainStrategy": "AsIs",
"rules": [{"type":"field","ip":["geoip:private"],"outboundTag":"block"}]
},
"inbounds": [{
"listen":"0.0.0.0","port":1234,"protocol":"vmess",
"settings":{"clients":[{"id":"7966c347-b5f5-46a0-b720-ef2d76e1836a"}]},
"streamSettings":{"network":"tcp"}
}],
"outbounds":[
{"protocol":"freedom","tag":"direct"},
{"protocol":"blackhole","tag":"block"}
]
}
Critical: Replace the default id in the clients array with a freshly generated UUID before starting the service.
Configure NGINX Reverse Proxy
For internet-facing traffic, an NGINX reverse-proxy terminates TLS and forwards WebSocket connections to V2Ray. The repository provides a working configuration in v2ss/server-cfg/nginx.conf.
Deploy this configuration to enable the TLS + WebSocket deployment pattern:
location /bannedbook {
proxy_redirect off;
proxy_pass http://127.0.0.1:10000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
This setup listens on HTTPS (port 443) and forwards WebSocket traffic to the V2Ray daemon listening on localhost port 10000.
Enable Systemd Service
Ensure the V2Ray daemon starts on boot using the systemd service file located at v2ss/server-cfg/v2ray.service. Copy this file to /etc/systemd/system/v2ray.service:
[Unit]
Description=V2Ray Service
After=network.target nss-lookup.target
[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
Environment=V2RAY_LOCATION_ASSET=/usr/local/share/v2ray/
ExecStart=/usr/local/bin/v2ray -confdir /usr/local/etc/v2ray/
Restart=on-failure
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
Enable and start the service:
systemctl enable v2ray
systemctl start v2ray
Client Configuration
Once the server is operational, configure clients by importing a subscription link—a URL that expands to a list of V2Ray nodes.
Windows: V2RayN
For Windows users, the repository guides setup using V2RayN (windows/V2RayN.md):
- Download and extract the V2RayN client.
- Navigate to Subscription Settings → Add and paste your server subscription URL.
- Click OK to update the node list.
- Right-click the tray icon and select Auto-configure system proxy.
macOS: ClashX
macOS users should follow the macos/ClashX.md guide:
- Install ClashX and grant system extension permissions.
- Import the subscription file via the Config menu.
- Toggle the proxy mode to Global or Rule-based depending on your routing needs.
Android: V2RayNG
Android configuration is documented in android/V2RayNG.md:
- Install V2RayNG from the releases page.
- Tap the + icon and select Import subscription from URL.
- Paste the subscription link and update the profile.
- Select a node and tap the V icon to connect.
iOS: Shadowrocket
iOS users must use Shadowrocket as detailed in ios/Shadowrocket.md:
- Open the app and tap the + button.
- Select Type → Subscribe and enter the subscription URL.
- Save the configuration and enable the VPN toggle.
Advanced Deployment Patterns
The repository supports TLS + WebSocket + CDN configurations for environments where direct connections are blocked. This pattern is detailed in v2ss/V2Ray之TLS+WebSocket翻墙方法.md.
To implement this:
- Configure V2Ray to use WebSocket transport instead of TCP.
- Place the server behind Cloudflare or another CDN that supports WebSocket proxying.
- Use the NGINX configuration to handle the WebSocket upgrade headers.
This setup masks traffic as standard HTTPS, making it resistant to deep packet inspection.
Summary
- bannedbook/fanqiang organizes proxy tools by platform and technology, with V2Ray as the primary protocol.
- Server setup requires deploying
v2ss/server-cfg/v2/config.jsonandv2ss/server-cfg/nginx.confon a VPS with the systemd service enabled. - The official V2Ray install script automates binary installation to
/usr/local/bin/v2ray. - Client access relies on subscription links imported into V2RayN (Windows), ClashX (macOS), V2RayNG (Android), or Shadowrocket (iOS).
- Helper scripts like
v2ray_check.shandbench.shassist with server health monitoring.
Frequently Asked Questions
What is the bannedbook/fanqiang repository?
bannedbook/fanqiang is a GitHub repository containing tutorials, configuration files, and scripts for setting up proxy servers to circumvent internet censorship. It primarily focuses on V2Ray, Shadowsocks, and SSR technologies, providing specific guides for Windows, macOS, Linux, Android, iOS, and router platforms.
Which protocol should I choose for the server configuration?
The repository recommends V2Ray with VMess and TLS + WebSocket for most users, as implemented in v2ss/server-cfg/v2/config.json. This combination provides strong encryption and can traverse restrictive firewalls. If V2Ray is blocked in your region, fallback tutorials for Shadowsocks and Brook are available in the respective platform directories.
How do I update the server configuration after initial setup?
Modify the /usr/local/etc/v2ray/config.json file on your VPS, then reload the systemd service using systemctl restart v2ray. The repository includes v2ray_check.sh for verifying service health after configuration changes. Always validate JSON syntax before restarting to prevent service failures.
Can I configure bannedbook/fanqiang on a router?
Yes, the repository includes specific router configurations in router/OpenWRT.md. OpenWRT users can install V2Ray or Shadowsocks clients directly on compatible routers, allowing all devices on the local network to share the proxy connection without individual client configuration. This approach is also compatible with game consoles like PS4 and PS5 as documented in the game/ directory guides.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →