mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-23 12:40:25 +02:00
Native ssh auth working
This commit is contained in:
@@ -199,8 +199,14 @@ export default function SshClient({
|
|||||||
|
|
||||||
const proxyAddress = `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/gateway/ssh`;
|
const proxyAddress = `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.host}/gateway/ssh`;
|
||||||
const url = new URL(proxyAddress);
|
const url = new URL(proxyAddress);
|
||||||
url.searchParams.set("host", target.ip ?? "");
|
url.searchParams.set(
|
||||||
url.searchParams.set("port", String(target.port ?? 22));
|
"mode",
|
||||||
|
target.authDaemonMode === "native" ? "native" : "proxy"
|
||||||
|
);
|
||||||
|
if (target.authDaemonMode !== "native") {
|
||||||
|
url.searchParams.set("host", target.ip ?? "");
|
||||||
|
url.searchParams.set("port", String(target.port ?? 22));
|
||||||
|
}
|
||||||
url.searchParams.set("username", username);
|
url.searchParams.set("username", username);
|
||||||
url.searchParams.set("authToken", target.authToken ?? "");
|
url.searchParams.set("authToken", target.authToken ?? "");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user