feat(connection): test SSH tunnel profiles

This commit is contained in:
rainhan authored and GitHub committed 2026-07-13 17:51:51 +08:00
1 parent 27c60f0d30
commit c7991b316e
19 files changed
+256 -4

No files matched your search

+10 -1
View File
@@ -44,5 +44,14 @@ export const useTunnelProfileStore = defineStore("tunnelProfiles", () => {
}
}
return { profiles, isLoaded, init, refresh, profileById, saveProfiles };
/**
* Tests a profile's transport layer in isolation (no downstream database).
* The draft profile is passed straight through, so it validates the values
* currently in the editor rather than the last-saved copy.
*/
async function testProfile(profile: TunnelProfile): Promise<string> {
return api.testTunnelProfile(profile);
}
return { profiles, isLoaded, init, refresh, profileById, saveProfiles, testProfile };
});