A software router could be considered a standard tool for programmers, and having one can significantly enhance your happiness, given how frequently we use the internet. Accessing foreign websites feels just like accessing domestic ones, and devices on the same local network don't need proxy applications. Using proxy applications on mobile devices consumes a lot of battery, and any network issues encountered while coding are no longer a problem.
Device Selection
Model | Architecture | Firmware Version | Memory |
---|---|---|---|
Friendly R2S | ARMv8 Processor x 4 | OpenWrt Rockchip | 1 GB |
Purchasing a second-hand device from Xianyu and selecting equipment according to your needs can be cost-effective. For households with fewer network devices, the R2S is sufficient. Software routers have very low operational costs; the key performance factors are CPU and memory, with external storage being less important.
Transparent Proxy Gateway
A transparent proxy gateway, commonly known as a bypass router, contrasts with typical WiFi-enabled home routers. To minimize impact on the existing network, non-invasive access is employed, allowing terminals to use the software router as needed.
Original Network Topology
ONT (Optical Network Terminal) — Router — End devices
Network Topology after Connecting the Software Router
ONT — Router — End devices
\_ Software Router
Connect the LAN port of the router to the LAN port of the software router. The gateway address for the LAN in the router is 192.168.2.1. Configure the software router as a transparent gateway, setting its LAN address to 192.168.2.2 and its gateway to 192.168.2.1. Since network traffic needs to be forwarded through the router, terminals (like smartphones and computers) connected to the software router need to manually set a static IP and specify the gateway address as 192.168.2.2.
Traffic Handling
By setting the gateway for terminals, traffic reaches the software router, which uses plugins to handle traffic routing, deciding which flows are proxied and which are direct.
Using the OpenClash plugin for Clash allows for graphical configuration. The software router's traffic routing strategy is straightforward: direct connections within China and proxies for foreign sites, with a focus on minimizing latency for the best user experience. Minimizing latency may lead to frequent IP changes; for websites that enforce IP change policies, a dedicated strategy group can be added to fix proxy nodes.
Additional Issues
When using a software router, problems like connection errors before starting a game in Honor of Kings can be resolved by switching the running mode to Fake-IP (TUN) mode and changing the network stack type to Gvisor.
Some Opinions
The use of a software router as a bypass router is determined by its disadvantages. For instance, compared to hardware routers, common OpenWrt systems are more prone to crashes. Hardware routers are primarily designed for networking layers, excelling in tasks like NAT and small packet forwarding, whereas software routers are designed for application layers, requiring higher general computing power for traffic management. From a network layer perspective, hardware and software routers operate at different levels.
Using a software router as a bypass router can effectively utilize the advantages of both software and hardware routers, with non-invasive access not disrupting the original network architecture.
It's worth mentioning how apt the term "bypass router" is—it's so vividly Chinese, literally a router placed beside the main router.
It's common to see people trying to max out bandwidth or upgrade it without understanding the underlying needs. There are very few scenarios where sustained high bandwidth is required, and once a certain speed is reached, the marginal returns diminish. Instead of focusing on bandwidth speed, optimizing network latency is more beneficial. Investing in a lower latency service provider is often a better choice.
Discussion Thread
Best Practices for Software Routers
References:
OpenClash Wiki
Comprehensive Guide to Transparent Proxy in Router Gateway
评论