About HAProxy#
PassWall comes with a built-in load balancing feature called HAProxy. I have tinkered with it before, so now I am familiar with it. Currently, there are two pain points that need to be addressed when using HAProxy:
- Bandwagon 500G traffic
- Serious UDP blocking
OpenWrt firmware recommends Haiibo, which has proven to be very stable for those who love tinkering.
HAProxy Configuration#
Enabling HAProxy#
PassWall - [Load Balancing] - Enable Load Balancing
-
Set username
-
Set password
-
Add nodes (try to keep the protocol, port, and password consistent)
-
Set load weight and mode according to your needs
-
Save & Apply
Accessing HAProxy#
- After saving, access the interface at the routing address:1188
- The password and username are the ones you just set
- You can see the traffic situation for each node, indicating that it has been successfully started.
Creating a Load Balancing Node#
- In the [Node List], create a new [Socks Load Balancing] as shown in the figure
- Fill in the address with the OpenWrt routing address
- Port: 1181
- Save
Applying the Load Balancing Node#
- Go back to PassWall [Basic Settings]
- Select the newly created [Socks Load Balancing] for TCP nodes
- Also create a new [Socks Load Balancing] node for [Socks Configuration], port: 1081
- Save and apply, and you can see the traffic increasing in HAProxy.
- You can also use PassWall's traffic distribution function
End
New Method for Socks Nesting#
After tinkering with the above, I found that it is possible to use only one node for Socks nesting. See the tweet at https://x.com/geekbb/status/1713820323274224118?s=20. Generally, when we use PassWall, we directly use nodes or distribute traffic using nodes. However, if we use a local Socks node to nest a layer of ladder nodes, I found that it can alleviate the situation of UDP traffic blocking, and it may even be faster. You can try the following settings:
Configuration#
- In the [Node List], create a new Socks Nesting as shown in the figure
- In [Basic Settings] - [Socks Configuration], set as shown in the figure:
- In TCP nodes, select [Socks Nesting], and enable [Socks Configuration] below. Select your ladder node for the Socks node.
Now let's look at the comparison.
Directly using nodes#
Using Socks Nesting#
Have fun~