I had been using the ZgoCloud + wstunnel + Clash Verge Rev setup on Windows, and it was quite stable. Recently, I wanted to replicate this setup on Ubuntu 26.04 and have it automatically connect on boot without manually running commands every time. After tinkering for an afternoon, I finally got it working. I am documenting the process as a personal note, so I can follow it if I ever reinstall my system.
1. Components I Used
- VPS provider: ZgoCloud (with wstunnel + WireGuard already configured on the server side)
- Local tunneling tool: wstunnel v10.5.5 (the version must match the server side)
- Proxy client: Clash Verge Rev (using its WireGuard node and traffic splitting)
- System: Ubuntu 26.04, laptop with an x86_64 architecture
2. Installing Clash Verge Rev
I initially searched for “Clash” in the Ubuntu “Software” app, but the results were not what I needed (Figure 1). I later checked GitHub and found that Clash Verge Rev only provides .deb and .AppImage, and is not listed in the store.

I downloaded Clash.Verge_2.5.1_amd64.deb (since my computer is x86_64). After downloading, I right-clicked the .deb file in the file manager and selected “Open With” → “Software Install” (Figure 2). The system popped up an installation window; I clicked “Install” and entered my password (Figure 3).


After installation, the Clash Verge Rev icon appeared in the application menu.
3. Deploying the wstunnel Client
The wstunnel server version I am using is v10.5.5, so the client must also be this version, otherwise it will fail to connect. I downloaded wstunnel_10.5.5_linux_amd64.tar.gz from erebe/wstunnel.
After downloading, I right-clicked the archive → “Extract to…”, and extracted it to the current directory (Figure 4). It extracted a folder containing only a single wstunnel executable file.

I needed to place this wstunnel in the system PATH, such as /usr/local/bin. I opened the file manager, pressed Ctrl+L, entered /usr/local/bin, and found that the directory was empty (Figure 5).

The right-click paste option was grayed out due to insufficient permissions. I found the graphical approach cumbersome, so I just used the command:
sudo cp /home/wangqiang/下载/wstunnel_10.5.5_linux_amd64/wstunnel /usr/local/bin/
sudo chmod +x /usr/local/bin/wstunnelThen I checked the version:
$ /usr/local/bin/wstunnel --version
wstunnel-cli 10.5.5No issues there (top part of Figure 6).

Next, I created a startup script named ~/start-vpn.sh in my home directory with the following content (remember to replace the server IP and domain with your own):
#!/bin/bash
/usr/local/bin/wstunnel client -L udp://127.0.0.1:51820:127.0.0.1:51820?timeout_sec=0 --tls-sni-override wg.shuijingwanwq.com wss://154.21.196.249:443I granted it execution permissions:
chmod +x ~/start-vpn.shI used cat to verify the content (middle part of Figure 6).
4. Enabling wstunnel to Start on Boot (systemd User Service)
I did not want to manually execute nohup ~/start-vpn.sh ... every time I boot up, as it is too much hassle. So, I used a systemd user service to manage it.
First, I created the service file:
mkdir -p ~/.config/systemd/user
nano ~/.config/systemd/user/wstunnel.serviceWith the following content:
[Unit]
Description=Wstunnel Client for VPN
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/home/wangqiang/start-vpn.sh
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.targetAfter saving, I reloaded systemd, enabled the service, and started it immediately:
systemctl --user daemon-reload
systemctl --user enable wstunnel.service
systemctl --user start wstunnel.serviceTo check the status:
$ systemctl --user status wstunnel.service
● wstunnel.service - Wstunnel Client for VPN
Active: active (running) since ...The output showed that the service was running (Figure 7). I also checked the port listening:
$ ss -lun | grep 51820
UNCONN 0 0 127.0.0.1:51820 0.0.0.0:*This indicated that the UDP port was up.

5. Preparing the Clash Configuration File
I had already debugged a ZgoCloud-VPN.yaml file on Windows, which defines the WireGuard node (public key, private key, preshared key) and traffic splitting rules. I copied it directly to Ubuntu and placed it in my home directory:
vi ~/ZgoCloud-VPN.yamlI pasted the content in and saved it. The core part is the type: wireguard proxy configuration. For specific configuration details, refer to: Troubleshooting Record: Resolving the DNS Deadlock Issue Where “Some Websites Are Inaccessible” Under Clash Verge + Wstunnel + WireGuard
6. Importing the Configuration into Clash Verge Rev
I opened the Clash Verge Rev GUI, clicked “Subscriptions” on the left, then clicked “New” in the top right corner → and selected the “Local” type (Figure 6). I entered ZgoCloud-VPN as the name, clicked “Select File”, chose ~/ZgoCloud-VPN.yaml, and saved.

After importing, I right-clicked this configuration in the subscription list and selected “Use”. Then I switched to the “Proxies” page and could see the ZgoCloud-WG WireGuard node (Figure 7).

I went back to the “Home” page and turned on the “System Proxy” switch (Figure 8).

At this point, the browser could already access the external network (Figure 9), and the website test passed.

7. Enabling Clash Verge Rev to Start on Boot
In Clash Verge Rev’s “Settings” → “System Settings”, there is a “Start on Boot” switch, which I turned on (Figure 10). This way, the software will automatically start every time I log into the desktop.

8. Reboot Test
After completing all the above steps, I rebooted my computer. After logging back into the desktop:
- Checked the wstunnel service:
systemctl --user status wstunnel.serviceshowedactive (running), and the logs containedNew UDP connectionand TLS handshake information (Figure 11). - Tested Google, YouTube, GitHub, and Apple in Clash Verge Rev; all worked normally (Figure 12).


9. Pitfalls I Encountered
- Do not manually install the system’s WireGuard package.
sudo apt install wireguardis unnecessary because the mihomo core built into Clash Verge Rev already implements WireGuard in userspace. - The wstunnel versions must match. The server is v10.5.5, so the client must also be v10.5.5, otherwise there might be protocol incompatibilities.
- systemd service failed to start, reporting Address in use. This was because I had previously run a wstunnel manually using
nohup, which occupied port 51820. I executedpkill wstunnelto kill the manual process, and then starting the systemd service worked fine.
10. My Daily Experience Now
Boot → log into desktop → open the browser and directly access the external network. Both wstunnel and Clash Verge Rev run automatically in the background, requiring no manual intervention at all. Domestic websites connect directly, foreign websites go through the VPN, and the traffic splitting rules handle routing automatically. The speed is sufficient for watching YouTube in 4K, and port 443 + TLS camouflage has never been blocked.
Although I ran into a few minor pitfalls when porting this setup from Windows to Ubuntu, I am very satisfied with the final result. I documented this process so that if I ever need to reinstall my system or change computers, I can follow this article to do it all over again.
If you have similar needs, I hope my record provides some reference. However, everyone’s network environment and configuration are slightly different; I have only written about my own approach and cannot guarantee it will be universally applicable. Good luck with your tinkering~

