Alexandr, [21.05.2026 23:05]
1. Скачать и поставить wstunnel:
cd /tmp
curl -sL -o wstunnel.tgz https://github.com/erebe/wstunnel/releases/download/v10.5.5/wstunnel_10.5.5_linux_arm64.tar.gz
tar -xzf wstunnel.tgz
sudo install -m 755 wstunnel /usr/local/bin/wstunnel
/usr/local/bin/wstunnel --version
Alexandr, [21.05.2026 23:05]
2. systemd-юнит для клиента wstunnel:
sudo tee /etc/systemd/system/wstunnel-client.service >/dev/null <<'EOF'
[Unit]
Description=wstunnel client for WireGuard
After=network-online.target
Before=wg-quick@wg0.service
[Service]
Type=simple
ExecStart=/usr/local/bin/wstunnel client -L 'udp://40000:127.0.0.1:40000?timeout_sec=0' ws://94.130.109.234:443
Restart=on-failure
RestartSec=5
User=root
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now wstunnel-client
sudo systemctl is-active wstunnel-client
sudo ss -ulnp | grep ':40000'
Alexandr, [21.05.2026 23:05]
sudo wg-quick down wg0
sudo sed -i 's|Endpoint = wg.raccoonn.cc:40000|Endpoint = 127.0.0.1:40000|' /etc/wireguard/wg0.conf
sudo grep Endpoint /etc/wireguard/wg0.conf
sudo wg-quick up wg0
sleep 3
sudo wg show wg0 | grep -E 'handshake|transfer|endpoint'
ping -c 5 10.1.1.1