Fix RustDesk deep link to include self-hosted server
- Add RUSTDESK_SERVER and RUSTDESK_SERVER_KEY constants - Update buildRustDeskUri to use ID@SERVER format - Include server key in URI for proper server identification - This allows 1-click connection without client pre-configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
90d2221240
commit
bfcec46328
1 changed files with 9 additions and 3 deletions
|
|
@ -491,17 +491,23 @@ export function isRustDeskAccess(entry: DeviceRemoteAccessEntry | null | undefin
|
||||||
return url.includes("rustdesk")
|
return url.includes("rustdesk")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configuracao do servidor RustDesk self-hosted
|
||||||
|
const RUSTDESK_SERVER = "rust.rever.com.br"
|
||||||
|
const RUSTDESK_SERVER_KEY = "0mxocQKmK6GvTZQYKgjrG9tlNkKOqf81gKgqwAmnZuI="
|
||||||
|
|
||||||
export function buildRustDeskUri(entry: DeviceRemoteAccessEntry) {
|
export function buildRustDeskUri(entry: DeviceRemoteAccessEntry) {
|
||||||
const identifier = (entry.identifier ?? "").replace(/\s+/g, "")
|
const identifier = (entry.identifier ?? "").replace(/\s+/g, "")
|
||||||
if (!identifier) return null
|
if (!identifier) return null
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
|
// key = chave publica do servidor RustDesk (para identificar o servidor)
|
||||||
|
params.set("key", RUSTDESK_SERVER_KEY)
|
||||||
if (entry.password) {
|
if (entry.password) {
|
||||||
// RustDesk aceita "key=" como parâmetro oficial; mantemos "password" por compatibilidade.
|
// password = senha permanente do dispositivo
|
||||||
params.set("key", entry.password)
|
|
||||||
params.set("password", entry.password)
|
params.set("password", entry.password)
|
||||||
}
|
}
|
||||||
const query = params.toString()
|
const query = params.toString()
|
||||||
return `rustdesk://${encodeURIComponent(identifier)}${query ? `?${query}` : ""}`
|
// Formato: rustdesk://ID@SERVER?key=SERVER_KEY&password=DEVICE_PASSWORD
|
||||||
|
return `rustdesk://${encodeURIComponent(identifier)}@${RUSTDESK_SERVER}${query ? `?${query}` : ""}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseWindowsInstallDate(value: unknown): Date | null {
|
function parseWindowsInstallDate(value: unknown): Date | null {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue