wsclient

command
v0.14.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Command wsclient reproduces a RustDesk client in WebSocket/TCP rendezvous mode against a real hbbs and prints its online timeline, to check hbbs' TCP_KEEPALIVE option (bropines/rustdesk-server >= 393f872).

It connects to hbbs' WebSocket port, registers with a RegisterPk (fresh id, uuid and 32-byte pk) and afterwards ONLY echoes the empty frames the server sends, like the client does. As the client, it reconnects and re-registers when nothing was received for -client-timeout (keep_alive*1.5 = 90 s). Meanwhile it polls the id's online state with OnlineRequest on the rendezvous TCP port, the way the panel does.

go run ./scripts/wsclient -ws 127.0.0.1:31118 -hbbs 127.0.0.1:31116 -duration 150s

With -toggle-at/-admin it flips tcp-keepalive through the admin channel mid-run (runtime toggle check).

Demo/test tool only: the protobuf encoding is hand-written for the few fields used, and the WebSocket client is the minimum RFC 6455 subset hbbs needs (no extensions, no fragmentation of sent frames).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL