[fix] support self-hosted server URLs with paths

This commit is contained in:
dijunkun
2026-10-09 15:34:12 +08:00
parent d3ecbe2cc9
commit a06ed5806a
14 changed files with 101 additions and 51 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ xmake r crossdesk --headless
| `codec` | `h264` / `av1` | 保存后重新连接 |
| `hardware` | `on` / `off` | 保存后重新连接;构建不支持时拒绝开启 |
| `turn` | `off` / `auto` / `udp` / `tcp` | 保存后重新连接;`udp` / `tcp` 表示强制中继 |
| `server_host` | 主机名或 IP,不含协议与路径 | 自托管未启用时保存备用,已启用时重连 |
| `server_host` | 主机名、IP 或 HTTPS/WSS 信令地址,支持路径和显式端口 | 自托管未启用时保存备用,已启用时重连 |
| `server_port` | `1`–`65535` | 同上 |
| `self_hosted` | `on` / `off` | 先配置地址、端口,再开启;保存后重连 |
| `privacy` | `on` / `off` | 后续远程连接的自动隐私屏行为 |
+1 -1
View File
@@ -60,7 +60,7 @@ The menu shares the GUI's `config.ini`. Each valid change is saved immediately;
| `codec` | `h264` / `av1` | Reconnect after saving |
| `hardware` | `on` / `off` | Reconnect; enabling requires a build with hardware codec support |
| `turn` | `off` / `auto` / `udp` / `tcp` | Reconnect; UDP/TCP force relay use |
| `server_host` | Hostname or IP without URL scheme/path | Reconnect if self-hosting is enabled; otherwise saved for later |
| `server_host` | Hostname, IP, or HTTPS/WSS signaling URL, with optional path and explicit port | Reconnect if self-hosting is enabled; otherwise saved for later |
| `server_port` | `1`–`65535` | Same as server host |
| `self_hosted` | `on` / `off` | Configure host/port first, then enable; reconnect |
| `privacy` | `on` / `off` | Automatic privacy screen on subsequent connections |
+3 -1
View File
@@ -44,10 +44,12 @@ sudo docker compose ps
1. 断开现有会话,点击主窗口右上角 **☰ → 设置**。
2. 在设置列表中向下滚动,点击 **自托管配置**。
3. 填写 **服务器地址**、**信令服务端口**,点击“确认”。地址只填主机名或 IP,不加 `https://`、路径或端口。
3. 填写 **服务器地址**、**信令服务端口**,点击“确认”。地址支持主机名或 IP(如 `my-server.example.com`),也支持带路径的信令地址(如 `my-server.example.com/signal-path`)或 `https://` / `wss://` URL。URL 内明确填写的端口优先;否则使用单独填写的信令服务端口。所有连接均使用 WSS,带路径的地址需要反向代理将该路径转发到信令 WebSocket 服务,普通网页地址不能直接用于信令连接。
4. 回到设置窗口,勾选 **自托管配置** 右侧复选框,再点击“确认”保存。
5. 在控制端和被控端执行相同配置。等待两端都显示“已连接服务器”,再使用被控端当前显示的 ID 发起连接。
地址与端口在最后确认设置时一起保存;格式无效或保存失败时会保留输入并显示错误。
<p align="center">
<img src="images/desktop-self-hosted-zh.png" width="720" alt="当前 Slint 客户端自托管设置:服务器地址与信令端口" />
</p>
+1 -1
View File
@@ -44,7 +44,7 @@ For a self-signed deployment, complete the [certificate trust steps](#3-trust-th
1. Disconnect existing sessions and open **☰ → Settings**.
2. Scroll down and click **Self-Hosted Config**.
3. Enter **Server Address** and **Signal Service Port**, then confirm. Enter only the hostname or IP in the address field, without a URL scheme, path, or port.
3. Enter **Server Address** and **Signal Service Port**, then confirm. The address accepts a hostname or IP (such as `my-server.example.com`), a signaling path (such as `my-server.example.com/signal-path`), or an `https://` / `wss://` URL. An explicit URL port takes precedence; otherwise the separate signaling port is used. Connections always use WSS. Paths must be routed to the signaling WebSocket service by your reverse proxy; an ordinary web page is not a signaling endpoint.
4. Enable the checkbox beside **Self-Hosted Config**, then click **OK** in the parent settings window.
5. Configure both the controller and host this way. Once both report a server connection, connect using the host's currently displayed ID.