feat: advertise cli path for remote ssh
This commit is contained in:
@@ -97,6 +97,7 @@ describe("gateway bonjour advertiser", () => {
|
||||
sshPort: 2222,
|
||||
bridgePort: 18790,
|
||||
tailnetDns: "host.tailnet.ts.net",
|
||||
cliPath: "/opt/homebrew/bin/clawdis",
|
||||
});
|
||||
|
||||
expect(createService).toHaveBeenCalledTimes(1);
|
||||
@@ -116,6 +117,9 @@ describe("gateway bonjour advertiser", () => {
|
||||
expect((bridgeCall?.[0]?.txt as Record<string, string>)?.sshPort).toBe(
|
||||
"2222",
|
||||
);
|
||||
expect((bridgeCall?.[0]?.txt as Record<string, string>)?.cliPath).toBe(
|
||||
"/opt/homebrew/bin/clawdis",
|
||||
);
|
||||
expect((bridgeCall?.[0]?.txt as Record<string, string>)?.transport).toBe(
|
||||
"bridge",
|
||||
);
|
||||
|
||||
@@ -14,6 +14,7 @@ export type GatewayBonjourAdvertiseOpts = {
|
||||
bridgePort?: number;
|
||||
canvasPort?: number;
|
||||
tailnetDns?: string;
|
||||
cliPath?: string;
|
||||
};
|
||||
|
||||
function isDisabledByEnv() {
|
||||
@@ -115,6 +116,9 @@ export async function startGatewayBonjourAdvertiser(
|
||||
if (typeof opts.tailnetDns === "string" && opts.tailnetDns.trim()) {
|
||||
txtBase.tailnetDns = opts.tailnetDns.trim();
|
||||
}
|
||||
if (typeof opts.cliPath === "string" && opts.cliPath.trim()) {
|
||||
txtBase.cliPath = opts.cliPath.trim();
|
||||
}
|
||||
|
||||
const services: Array<{ label: string; svc: BonjourService }> = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user