diff --git a/README.md b/README.md index 114b15b..da309bd 100644 --- a/README.md +++ b/README.md @@ -452,6 +452,36 @@ says so, and the terminal is unaffected. Any row can be switched off and on whil phone runs forwards too, listed behind a `⇄` in its terminal's bar, but cannot edit them yet; see [The Android head](#the-android-head). +### Reaching a server through Spelunk + +A server managed by Spelunk runs Spelunk's agent, which keeps a connection open to Spelunk. DodoSSH can use +that connection instead of dialling: tick **Connect through Spelunk** in the host editor and fill in +Spelunk's API address, the server's id in Spelunk, and the credential that holds your Spelunk API key. A +connection then asks Spelunk for a ticket, opens a WebSocket, and the agent connects to the SSH server on +the machine's own loopback — so the server needs no open SSH port at all. Shells and file transfers both go +this way; the relay and Spelunk are one choice, and ticking one unticks the other. + +- **The API key is an ordinary keychain credential** — paste the key (`spelunk_…`, with the Admin role) as a + credential's password. It is encrypted, synced and rotated like every other secret, one credential serves + every server in that Spelunk organisation, and it is sent to the host's API address and nowhere else. + The API address must be `https://`, except for a Spelunk on this machine. +- **The hostname and port still matter**, though nothing dials them: the host key is pinned under them as it + is for every host, and the port is what the agent connects to on the server. +- **There is no falling back to a direct dial**, and a refusal is said in Spelunk's terms: a key Spelunk will + not take, a key whose role is too low, a server outside the key's organisation, an agent that is not + connected, an agent that could not reach the SSH port or is too old to open terminals. + +**"Open in DodoSSH" in Spelunk** starts DodoSSH with a `dodossh://spelunk/connect?api=…&server=…&name=…&host=…` +link, or hands the link to the copy already running. The link never carries a credential. If a saved host +already reaches that server through that Spelunk, DodoSSH connects to it; otherwise it opens the host editor +filled in for a new Spelunk host — name, address, API and server — and you choose how to log in and which +credential holds the key, and save. Nothing is ever connected that you have not saved, and a link that +arrives while the vault is locked waits for the unlock. + +The Windows installer registers the scheme for your user and removes it on uninstall, the macOS bundle +declares it in its `Info.plist`, and the Linux package's desktop entry declares `x-scheme-handler/dodossh`. +The phone reaches Spelunk hosts the same way but does not answer links yet. + ### Sharing a vault **VAULTS** in the nav rail lists every vault you can see, makes new ones, adds people to one, diff --git a/build/linux/dodossh.spec b/build/linux/dodossh.spec index 723c526..2a5becc 100644 --- a/build/linux/dodossh.spec +++ b/build/linux/dodossh.spec @@ -247,6 +247,13 @@ ln -s ../../opt/%{dodo_dir}/DodoSSH %{buildroot}%{_bindir}/%{dodo_bin} # window is a second, unlabelled icon in the dock beside the one that launched it. It is the assembly # name deliberately and not the package's binary name — the window does not know which package # started it. +# +# %%u — RPM's spelling of a literal %u, the field code for "one URL" — and the MimeType line make this +# the handler for dodossh:// links, which is how Spelunk's "Open in DodoSSH" reaches the application: +# the desktop starts the binary with the link as its one argument, and Program.Main reads and checks +# it, or passes it to the instance already running. update-desktop-database in the post-install +# scriptlet is what makes xdg-open see the handler. Both channels declare it, so whichever is +# installed answers, and with both installed the desktop's own default decides. mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{dodo_bin}.desktop <LSUIElement + + CFBundleURLTypes + + + CFBundleURLName + dev.dodotech.dodossh.link + CFBundleURLSchemes + + dodossh + + + + NSHumanReadableCopyright © DodoTech. MIT licensed. diff --git a/src/DodoSSH.Client.Android/Views/HostsScreen.axaml b/src/DodoSSH.Client.Android/Views/HostsScreen.axaml index 1b094c3..dbb962f 100644 --- a/src/DodoSSH.Client.Android/Views/HostsScreen.axaml +++ b/src/DodoSSH.Client.Android/Views/HostsScreen.axaml @@ -1212,6 +1212,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +