From d6ab088174cfe6a37a163b7643d6b921f1b6ab9b Mon Sep 17 00:00:00 2001 From: sysadminmatmoz Date: Sun, 25 Jan 2026 14:28:42 +0100 Subject: [PATCH] Remove decorative emojis from README headers and script output for improved consistency --- README.md | 30 +++++++++++++++--------------- scripts/backtunnel-access | 12 ++++++------ scripts/backtunnel-share | 14 +++++++------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index a63e93c..71bedde 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ No third-party relay, no cloud dependency – just peer-to-peer, temporary, SSH- --- -## ⚡ Quick Start +## Quick Start ### 1. Accessor: Prepare your key (one-time) @@ -37,7 +37,7 @@ backtunnel-umount ~/remote-rssh --- -## ✨ Features +## Features - **NAT/firewall friendly**: works without port forwarding. - **Temporary by design**: shares auto-expire after a set duration. @@ -52,7 +52,7 @@ backtunnel-umount ~/remote-rssh --- -## 🧠 Roles and Flow +## Roles and Flow - Sharer: exposes a local SSH service back to a remote host for a limited time. Runs backtunnel-share. - Accessor: connects to the sharer via the remote host’s `127.0.0.1:PORT` and mounts a folder with sshfs. Runs backtunnel-access. @@ -60,7 +60,7 @@ backtunnel-umount ~/remote-rssh --- -## ✅ Requirements +## Requirements - Linux with Bash - OpenSSH client (ssh, sftp) @@ -71,7 +71,7 @@ backtunnel-umount ~/remote-rssh --- -## 🔑 Commands +## Commands ### Sharer side @@ -165,7 +165,7 @@ backtunnel-umount ~/remote-rssh --- -## 🔒 Security Model +## Security Model - Reverse tunnel bind: remote side binds on `127.0.0.1:PORT` (loopback only). - Access is SFTP-based: @@ -181,7 +181,7 @@ backtunnel-umount ~/remote-rssh --- -## 🧩 Profiles +## Profiles - Config locations (higher precedence first): - `${XDG_CONFIG_HOME:-$HOME/.config}/backtunnel/profiles.ini` @@ -210,7 +210,7 @@ tunnel_port=4422 --- -## 🧭 Bash Completion +## Bash Completion - Source completions/backtunnel.bash or install it via your system’s completion.d directory. - Provides: @@ -223,7 +223,7 @@ tunnel_port=4422 --- -## 🖥️ Desktop Integration (KDE Dolphin) +## Desktop Integration (KDE Dolphin) - Right-click in a folder: - “Share via BackTunnel…” → opens a GUI/TUI flow for the sharer. @@ -236,7 +236,7 @@ tunnel_port=4422 --- -## 🌐 Environment Variables +## Environment Variables - BACKTUNNEL_HOSTKEY_POLICY - Controls StrictHostKeyChecking for ssh/sftp/sshfs: @@ -249,7 +249,7 @@ tunnel_port=4422 --- -## 🛠️ Installation +## Installation ### From source @@ -274,7 +274,7 @@ sudo PURGE=1 bash scripts/uninstall.sh --- -## 🔍 Troubleshooting +## Troubleshooting - Port already in use on remote: - backtunnel-share warns if `127.0.0.1:PORT` is busy; choose another with -p. @@ -295,7 +295,7 @@ sudo PURGE=1 bash scripts/uninstall.sh --- -## 🧪 Testing +## Testing - Bats scaffolds are provided to extend: - tests/test-umount.bats @@ -309,7 +309,7 @@ bats tests --- -## 📖 Man Page +## Man Page ```bash man backtunnel @@ -317,6 +317,6 @@ man backtunnel --- -## 🧾 License +## License GNU GPL v3.0 © 2025 LUXIM d.o.o., Slovenia – Matjaž Mozetič diff --git a/scripts/backtunnel-access b/scripts/backtunnel-access index 16fb1c0..4935300 100644 --- a/scripts/backtunnel-access +++ b/scripts/backtunnel-access @@ -112,7 +112,7 @@ fi # Warn if non-empty to avoid masking existing files if [[ -n "$(ls -A -- "$MOUNTPOINT" 2>/dev/null || true)" ]]; then - echo "⚠️ Mount point '$MOUNTPOINT' is not empty; its contents will be hidden while mounted." >&2 + echo "Mount point '$MOUNTPOINT' is not empty; its contents will be hidden while mounted." >&2 fi # --- split remote user/host (supports user:host or user@host) --- @@ -144,7 +144,7 @@ if mountpoint -q -- "$MOUNTPOINT"; then exit 1 fi -echo "🔗 Mounting '$FOLDER' from '$REMOTE_USER@$REMOTE_HOST' via reverse-tunnel localhost:$PORT → '$MOUNTPOINT' ..." +echo "Mounting '$FOLDER' from '$REMOTE_USER@$REMOTE_HOST' via reverse-tunnel localhost:$PORT → '$MOUNTPOINT' ..." # --- ensure passwordless auth via tunnel (optional but user-friendly) --- # Purpose: detect whether a dedicated identity exists and hint user if passwordless setup is missing. @@ -160,7 +160,7 @@ fi if ! ssh -o BatchMode=yes -o StrictHostKeyChecking="$HKP" \ -p "$PORT" "${SSH_IDENTITY_OPTS[@]}" "$REMOTE_USER@localhost" true 2>/dev/null; then cat >&2 </dev/null 2>&1; then - echo "⚠️ Remote path '$FOLDER' not listable via SFTP. It may not exist or permissions deny access." >&2 - echo " Proceeding to mount; sshfs may fail if the path is invalid." >&2 + echo "Remote path '$FOLDER' not listable via SFTP. It may not exist or permissions deny access." >&2 + echo "Proceeding to mount; sshfs may fail if the path is invalid." >&2 fi # Build ssh command used by sshfs (adds keepalive/connect-timeout, identity if present). @@ -196,5 +196,5 @@ sshfs \ -o ssh_command="$SSH_CMD" \ -- "$REMOTE_USER@localhost:$FOLDER" "$MOUNTPOINT" -echo "✅ Mounted at: $MOUNTPOINT" +echo "Mounted at: $MOUNTPOINT" echo "To unmount: backtunnel-umount \"$MOUNTPOINT\"" diff --git a/scripts/backtunnel-share b/scripts/backtunnel-share index e3fb13c..e8f8d2b 100644 --- a/scripts/backtunnel-share +++ b/scripts/backtunnel-share @@ -440,7 +440,7 @@ fi # Banner # Purpose: inform the user what will happen and where to connect from the remote. # ---------------------------- -echo "⏳ Sharing '${FOLDER}' via reverse SSH:" +echo "Sharing '${FOLDER}' via reverse SSH:" echo " local sshd port : ${LOCAL_SSH_PORT}" echo " remote bind port : ${TUNNEL_PORT} (on ${REMOTE_HOST})" echo " remote user : ${REMOTE_USER}" @@ -488,7 +488,7 @@ EOT ) fi - echo "🔗 Invite (copy to chat):" + echo "Invite (copy to chat):" echo "------------------------------------------------------------" [[ -n "$AUTH_CMD" ]] && echo "${AUTH_CMD}" echo "${INVITE_CMD}" @@ -501,10 +501,10 @@ EOT if $QR; then if command -v qrencode >/dev/null 2>&1; then echo - echo "📱 QR (scan to copy the command):" + echo "QR (scan to copy the command):" printf "%s" "${INVITE_CMD}" | qrencode -t ansiutf8 else - echo "⚠️ 'qrencode' not installed; skipping QR." + echo "'qrencode' not installed; skipping QR." fi fi echo @@ -521,7 +521,7 @@ echo "To stop sharing early: press Ctrl+C in this window." # ---------------------------- if ssh -o BatchMode=yes -o StrictHostKeyChecking="$HKP" -o ConnectTimeout=5 "${REMOTE_USER}@${REMOTE_HOST}" \ "command -v nc >/dev/null 2>&1 && nc -z 127.0.0.1 ${TUNNEL_PORT}"; then - echo "⚠️ Port ${TUNNEL_PORT} on remote 127.0.0.1 appears in use; choose another with -p." >&2 + echo "Port ${TUNNEL_PORT} on remote 127.0.0.1 appears in use; choose another with -p." >&2 # You may 'exit 1' here if you prefer a hard failure fi @@ -538,7 +538,7 @@ SSH_PID="" cleanup() { # stop ssh child if running if [[ -n "${SSH_PID:-}" ]] && kill -0 "$SSH_PID" 2>/dev/null; then - echo "⏹️ Stopping share..." + echo "Stopping share..." kill -TERM "$SSH_PID" 2>/dev/null || true wait "$SSH_PID" 2>/dev/null || true fi @@ -565,7 +565,7 @@ if timeout "$DURATION" tail --pid="$SSH_PID" -f /dev/null; then else rc=$? if [[ $rc -eq 124 ]]; then - echo "⏹️ Sharing ended: reached duration (${DURATION})." + echo "Sharing ended: reached duration (${DURATION})." # ensure the child is gone if kill -0 "$SSH_PID" 2>/dev/null; then kill -TERM "$SSH_PID" 2>/dev/null || true