mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-10 09:39:58 +00:00
Add daemon host option and default to localhost instead of all addresses
This commit is contained in:
@@ -15,7 +15,16 @@ async function getBackupServerUrl() {
|
||||
const { bridgeBackupHost, bridgeBackupPort, bridgeBackupPassword } =
|
||||
await options.getAll();
|
||||
|
||||
const url = new URL(`ws://${bridgeBackupHost}:${bridgeBackupPort}`);
|
||||
const url = new URL(
|
||||
`ws://${
|
||||
// Handle IPv6 address formatting
|
||||
bridgeBackupHost.includes(":")
|
||||
? `[${bridgeBackupHost}]`
|
||||
: bridgeBackupHost
|
||||
}`
|
||||
);
|
||||
url.port = bridgeBackupPort.toString();
|
||||
|
||||
if (bridgeBackupPassword) {
|
||||
url.searchParams.append("password", bridgeBackupPassword);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user