style(webclient): ws-host

This commit is contained in:
lejianwen
2025-03-04 15:48:25 +08:00
parent 1852f10131
commit 9709da7fb6
2 changed files with 3 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ rustdesk:
key-file: "/data/id_ed25519.pub"
personal: 1
webclient-magic-queryonline: 0
ws-host: ""
ws-host: "" #eg: wss://192.168.1.3:4443
logger:
path: "./runtime/log.txt"
level: "info" #trace,debug,info,warn,error,fatal

View File

@@ -11088,10 +11088,10 @@ function R4(u = !1) {
}
function getUriFromRs(uri, isRelay = false, roffset = 0) {
const p = isHttps() ? "wss://" : "ws://"
if (window.ws_host) {
return p + window.ws_host + "/ws/" + (isRelay ? "relay" : "id")
return window.ws_host + "/ws/" + (isRelay ? "relay" : "id")
}
const p = isHttps() ? "wss://" : "ws://"
const [domain, uriport] = uri.split(":")
if (!isHttps()) {
// http 直接走端口