Add backtunnel-umount script, host key policy support, and extend TUI/CLI integration

Introduce `backtunnel-umount` as a portable unmount helper, preferring `fusermount3`, `fusermount`, or `umount`. Add `BACKTUNNEL_HOSTKEY_POLICY` for configurable host key handling in `backtunnel-share` and `backtunnel-access`. Update TUIs for remote folder prompts and mount point handling. Enhance bash completion for TUI commands with directory suggestions. Revamp terminal selection logic in `backtunnel-open-term` to prioritize modern emulators like wezterm. Extend tests with scaffolds for host key policy and unmount behavior. Update README with new scripts, workflows, features, and troubleshooting tips.
This commit is contained in:
2025-09-21 18:56:15 +02:00
parent 0e82955af5
commit ae8ab9a7e0
9 changed files with 344 additions and 49 deletions

View File

@@ -47,6 +47,13 @@ REMOTE="${REMOTE:-user@vps.example.com}"
read -r -p "Tunnel port on remote [2222]: " PORT
PORT="${PORT:-2222}"
# Ask for the remote folder that should be mounted (first positional of backtunnel-access)
read -r -p "Remote folder path to mount [~/]: " FOLDER
FOLDER="${FOLDER:-~/}"
if [[ "$FOLDER" == "~" ]]; then
FOLDER="~/"
fi
read -r -p "Mount point [${DEFAULT_MP}]: " MP
MP="${MP:-$DEFAULT_MP}"
@@ -62,7 +69,7 @@ if [[ ! -w "$MP" ]]; then
fi
echo
echo "Running: backtunnel-access '<remote-folder>' from '$REMOTE' -p '$PORT' -m '$MP'"
echo "Note: you'll be prompted on the remote for the exact folder (as per your workflow)."
echo "Running: backtunnel-access '${FOLDER}' from '${REMOTE}' -p '${PORT}' -m '${MP}'"
echo "Note: the folder is accessed via SFTP on the remote through the reverse tunnel."
# Replace this process with backtunnel-access (no return to this script after exec)
exec backtunnel-access "$MP" from "$REMOTE" -p "$PORT" -m "$MP"
exec backtunnel-access "$FOLDER" from "$REMOTE" -p "$PORT" -m "$MP"