At a glance

For one or two computers, start with a desktop client. To cover multiple devices without changing your main router, test with a bypass gateway first. This guide is for anyone deploying the V2Ray core on a home or managed network. It focuses on choosing hardware, identifying where traffic enters the setup, and quickly restoring the original gateway if something goes wrong.

Main Router, Bypass Gateway, and Transparent Proxy: What’s the Difference?

A main router or bypass gateway determines where the core runs and which device receives traffic first. Transparent proxying determines how the gateway sends matching traffic to the core when an app has no proxy address configured. These options aren’t mutually exclusive: transparent proxying can run on either the main router or a bypass gateway. First decide which device will handle the traffic, then choose between an explicit proxy and gateway-level interception.

Run V2Ray on the Main Router

One device handles the internet connection, address assignment, and proxy core. Centralized rules are easier to maintain, but updating the core, reloading the firewall, or running out of resources could affect the whole network—not just devices using the proxy.

Best for: A main router with spare capacity and maintainable firmware, when you can schedule network maintenance.

Bypass Gateway

Recommended

Keep internet access and address assignment on the main router, and set the bypass gateway as the default gateway only for test devices. You can restart it independently, and if testing fails, simply switch those devices back to the original gateway. Changing the gateway only directs traffic; the bypass gateway still needs working forwarding and proxy rules.

Best for: Anyone with a spare device who wants to test with one device before expanding coverage.

Transparent Proxy at the Gateway

The gateway’s firewall and routing rules send matching connections to the core, so apps don’t need individual proxy settings. You’ll need to check how DNS (domain name resolution), TCP, and UDP are handled, and which local destinations should connect directly.

Best for: TVs and other devices where proxy settings are difficult to configure, when you want the gateway to route traffic centrally.

Bottom line: Test an explicit proxy before gateway interception

First, use a computer to access a test site through the bypass gateway’s LAN proxy port. Then change that computer’s default gateway. If the first step works but the second doesn’t, check forwarding and interception rules before switching nodes.

Hardware and Firmware: Check Compatibility Before Testing Speed

A device booting OpenWrt doesn’t guarantee that a particular core package will work. Before installing, check the CPU architecture, firmware release, and package feeds. Even if both devices use ARM, distinguish between 32-bit and 64-bit builds. Transparent interception also depends on the firmware’s firewall backend and kernel modules. For example, standard OpenWrt 23.05 firmware uses firewall4, based on nftables; don’t assume rules from older firewall3 guides will work unchanged.

23.05
OpenWrt firewall backend example; not a firmware recommendation
10808
Example SOCKS test port; use the actual listening port
53
Standard DNS ports for TCP and UDP
  • Check storage and memory: Leave room for the core, rule data, and updates. Don’t rely on the flash storage’s advertised capacity; system partitions already use some of it, so check the free space at the intended install location. For memory, check whether it becomes constrained when services are running and multiple devices are connected.
  • Check stability under load: Use the same wired computer and test destination to compare direct and proxied connections. Record throughput, latency, free memory, and router load at a minimum. If the router’s admin page slows down when the proxy is under heavy load, consider moving the core to a dedicated device instead of focusing only on your internet speed.
  • Check the core and node settings: V2Ray and Xray are different cores, while v2rayN is a desktop client. A node labeled VMess or VLESS identifies only the protocol; also check the transport and security settings, and make sure the installed core and version support the full combination.

Test with a Bypass Gateway: Change One Device’s Default Gateway

This example uses two devices on the same LAN: the main router at 192.168.1.1, the bypass gateway at 192.168.1.2, and the subnet 192.168.1.0/24. First, make sure the bypass gateway’s address is unused. Reserve it on the main router or keep it outside the DHCP pool. The LuCI menu names below reflect common Simplified Chinese interfaces; customized firmware may differ slightly.

  1. Back Up the Current Setup

    Note the main router’s admin address, current default gateway, and DNS settings. On devices using LuCI, go to “System” → “Backup / Flash Firmware” → “Generate archive” to export the configuration to your computer. If you’re changing both devices, save a backup of each.

  2. Set the Bypass Gateway Address

    On the bypass gateway, go to “Network” → “Interfaces” → “LAN” → “Edit” → “General Settings”. Set a static address of 192.168.1.2/24 and its IPv4 upstream gateway to 192.168.1.1. After saving, sign in again using the new address and confirm the bypass gateway can reach the upstream network.

  3. Keep DHCP on One Device

    On the bypass gateway, go to “Network” → “Interfaces” → “LAN” → “Edit” → “DHCP Server” and select “Ignore interface”. Keep the main router’s DHCP (automatic address assignment) service enabled. If IPv6 router advertisements are enabled on the bypass gateway, check that it isn’t unintentionally advertising a default route.

  4. Verify the Core Can Connect Out

    First, test with an app where you can enter a SOCKS proxy manually, such as the bypass gateway at 192.168.1.2:10808. This port is only an example; it will work only if a service is listening on it and allows access from the test device. Restrict the test port to your trusted LAN, and don’t set up public port forwarding on the main router.

  5. Test with the Bypass Gateway

    After confirming that forwarding and the intended interception rules are configured on the bypass gateway, change only the test device’s IPv4 default gateway to 192.168.1.2. Leave DNS unchanged for now. Disable the device’s existing system proxy, then test LAN access, direct destinations, and proxied destinations separately. If anything fails, restore the device’s previous settings without changing DHCP options for the whole network.

Transparent Proxy Troubleshooting: Separate DNS, Forwarding, and Core Egress

Traffic routing selects a direct or proxy outbound based on the destination address, domain, or other conditions. With transparent interception, the gateway must first send matching traffic to the core. Gateway and core logs therefore cover different stages: if the core receives no request, that doesn’t mean the node is at fault; and a request in the core logs doesn’t guarantee that DNS resolution or the return path is working.

Changed the gateway, but no new connections appear in the core logs?

First, confirm that the test device is using 192.168.1.2 as its IPv4 default route. Test with a new connection and check whether the bypass gateway’s interception rule counters increase. If the test destination prefers IPv6, check which address family is actually in use; an IPv4 gateway setting does not configure IPv6 interception.

A domain won’t load—is the node down?

Run nslookup example.com to see the system’s response and which DNS server received the request. If your browser uses its own secure DNS, check its DNS path too. Once resolution is confirmed, use the core logs to distinguish an outbound connection timeout from a failed handshake with the remote server.

Web pages load, but voice calls keep dropping. What should you check?

First, check whether the app is using TCP or UDP. A working website doesn’t mean UDP is being intercepted. Check whether the gateway’s UDP rules are matching traffic and whether the inbound and outbound configurations support UDP. Compare direct and proxied results on a single device. Narrow the issue down to gateway forwarding or proxy egress only if the proxy path is the problem.

Rules are enabled, and now you can’t reach the main router’s admin page. What should you do?

First, switch the test device back to its original gateway and disable any temporary system proxy. Once access is restored, confirm the correct admin address and check that the gateway’s own upstream connections aren’t being sent back through the proxy. When testing again, re-enable one group of rules at a time to identify which one affects access to the admin page.

How Router Cores and Desktop Clients Work Together

v2rayN is useful for checking subscriptions, testing individual nodes, and comparing protocol settings. A subscription is a URL that provides node configurations in bulk; a successful import only means the configurations were read, not that every node works. Routers are better for continuously applying tested routing rules to devices that can’t be configured individually to use a proxy. If the desktop client connects but the gateway doesn’t, compare the actual core, transport, and security settings on both before checking gateway forwarding.

  • To test a node only: Run a single-device test with v2rayN and confirm that traffic passes through the desktop client. If needed, restore the computer’s original main-router route first, so bypass gateway interception doesn’t affect the comparison.
  • To test the gateway only: Connect the computer through the test setup and turn off v2rayN’s system proxy. If v2rayN’s TUN (virtual network adapter) mode is enabled, exit that too, then check the bypass gateway logs.
  • For long-term use: Record the firmware and core versions, where configuration backups are stored, and how to restore each device’s settings. Start with a few devices through your usual peak usage times before expanding. Don’t upgrade firmware, change the core, and adjust routing rules in the same maintenance window.