Remove decorative emojis from README headers and script output for improved consistency

This commit is contained in:
2026-01-25 14:28:42 +01:00
parent ae8ab9a7e0
commit d6ab088174
3 changed files with 28 additions and 28 deletions

View File

@@ -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) ### 1. Accessor: Prepare your key (one-time)
@@ -37,7 +37,7 @@ backtunnel-umount ~/remote-rssh
--- ---
## Features ## Features
- **NAT/firewall friendly**: works without port forwarding. - **NAT/firewall friendly**: works without port forwarding.
- **Temporary by design**: shares auto-expire after a set duration. - **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. - 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 hosts `127.0.0.1:PORT` and mounts a folder with sshfs. Runs backtunnel-access. - Accessor: connects to the sharer via the remote hosts `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 - Linux with Bash
- OpenSSH client (ssh, sftp) - OpenSSH client (ssh, sftp)
@@ -71,7 +71,7 @@ backtunnel-umount ~/remote-rssh
--- ---
## 🔑 Commands ## Commands
### Sharer side ### 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). - Reverse tunnel bind: remote side binds on `127.0.0.1:PORT` (loopback only).
- Access is SFTP-based: - Access is SFTP-based:
@@ -181,7 +181,7 @@ backtunnel-umount ~/remote-rssh
--- ---
## 🧩 Profiles ## Profiles
- Config locations (higher precedence first): - Config locations (higher precedence first):
- `${XDG_CONFIG_HOME:-$HOME/.config}/backtunnel/profiles.ini` - `${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 systems completion.d directory. - Source completions/backtunnel.bash or install it via your systems completion.d directory.
- Provides: - Provides:
@@ -223,7 +223,7 @@ tunnel_port=4422
--- ---
## 🖥️ Desktop Integration (KDE Dolphin) ## Desktop Integration (KDE Dolphin)
- Right-click in a folder: - Right-click in a folder:
- “Share via BackTunnel…” → opens a GUI/TUI flow for the sharer. - “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 - BACKTUNNEL_HOSTKEY_POLICY
- Controls StrictHostKeyChecking for ssh/sftp/sshfs: - Controls StrictHostKeyChecking for ssh/sftp/sshfs:
@@ -249,7 +249,7 @@ tunnel_port=4422
--- ---
## 🛠️ Installation ## Installation
### From source ### From source
@@ -274,7 +274,7 @@ sudo PURGE=1 bash scripts/uninstall.sh
--- ---
## 🔍 Troubleshooting ## Troubleshooting
- Port already in use on remote: - Port already in use on remote:
- backtunnel-share warns if `127.0.0.1:PORT` is busy; choose another with -p. - 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: - Bats scaffolds are provided to extend:
- tests/test-umount.bats - tests/test-umount.bats
@@ -309,7 +309,7 @@ bats tests
--- ---
## 📖 Man Page ## Man Page
```bash ```bash
man backtunnel man backtunnel
@@ -317,6 +317,6 @@ man backtunnel
--- ---
## 🧾 License ## License
GNU GPL v3.0 GNU GPL v3.0
© 2025 LUXIM d.o.o., Slovenia Matjaž Mozetič © 2025 LUXIM d.o.o., Slovenia Matjaž Mozetič

View File

@@ -112,7 +112,7 @@ fi
# Warn if non-empty to avoid masking existing files # Warn if non-empty to avoid masking existing files
if [[ -n "$(ls -A -- "$MOUNTPOINT" 2>/dev/null || true)" ]]; then 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 fi
# --- split remote user/host (supports user:host or user@host) --- # --- split remote user/host (supports user:host or user@host) ---
@@ -144,7 +144,7 @@ if mountpoint -q -- "$MOUNTPOINT"; then
exit 1 exit 1
fi 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) --- # --- ensure passwordless auth via tunnel (optional but user-friendly) ---
# Purpose: detect whether a dedicated identity exists and hint user if passwordless setup is missing. # 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" \ if ! ssh -o BatchMode=yes -o StrictHostKeyChecking="$HKP" \
-p "$PORT" "${SSH_IDENTITY_OPTS[@]}" "$REMOTE_USER@localhost" true 2>/dev/null; then cat >&2 <<EOF -p "$PORT" "${SSH_IDENTITY_OPTS[@]}" "$REMOTE_USER@localhost" true 2>/dev/null; then cat >&2 <<EOF
⚠️ Passwordless auth not set for $REMOTE_USER@localhost:$PORT. Passwordless auth not set for $REMOTE_USER@localhost:$PORT.
You can initialize a tunnel-only, SFTP-only key with: You can initialize a tunnel-only, SFTP-only key with:
backtunnel-auth-setup -p $PORT $REMOTE_USER@localhost backtunnel-auth-setup -p $PORT $REMOTE_USER@localhost
(It will ask once for the server password to install and restrict the key.) (It will ask once for the server password to install and restrict the key.)
@@ -173,8 +173,8 @@ echo "Checking remote path visibility via SFTP ..."
# Purpose: quick sanity check that the target path is visible over SFTP before mounting. # Purpose: quick sanity check that the target path is visible over SFTP before mounting.
if ! sftp -q -P "$PORT" -o StrictHostKeyChecking="$HKP" "${SFTP_ID_OPTS[@]}" \ if ! sftp -q -P "$PORT" -o StrictHostKeyChecking="$HKP" "${SFTP_ID_OPTS[@]}" \
"$REMOTE_USER@localhost" <<< "ls -1 \"$FOLDER\"" >/dev/null 2>&1; then "$REMOTE_USER@localhost" <<< "ls -1 \"$FOLDER\"" >/dev/null 2>&1; then
echo "⚠️ Remote path '$FOLDER' not listable via SFTP. It may not exist or permissions deny access." >&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 echo "Proceeding to mount; sshfs may fail if the path is invalid." >&2
fi fi
# Build ssh command used by sshfs (adds keepalive/connect-timeout, identity if present). # Build ssh command used by sshfs (adds keepalive/connect-timeout, identity if present).
@@ -196,5 +196,5 @@ sshfs \
-o ssh_command="$SSH_CMD" \ -o ssh_command="$SSH_CMD" \
-- "$REMOTE_USER@localhost:$FOLDER" "$MOUNTPOINT" -- "$REMOTE_USER@localhost:$FOLDER" "$MOUNTPOINT"
echo "Mounted at: $MOUNTPOINT" echo "Mounted at: $MOUNTPOINT"
echo "To unmount: backtunnel-umount \"$MOUNTPOINT\"" echo "To unmount: backtunnel-umount \"$MOUNTPOINT\""

View File

@@ -440,7 +440,7 @@ fi
# Banner # Banner
# Purpose: inform the user what will happen and where to connect from the remote. # 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 " local sshd port : ${LOCAL_SSH_PORT}"
echo " remote bind port : ${TUNNEL_PORT} (on ${REMOTE_HOST})" echo " remote bind port : ${TUNNEL_PORT} (on ${REMOTE_HOST})"
echo " remote user : ${REMOTE_USER}" echo " remote user : ${REMOTE_USER}"
@@ -488,7 +488,7 @@ EOT
) )
fi fi
echo "🔗 Invite (copy to chat):" echo "Invite (copy to chat):"
echo "------------------------------------------------------------" echo "------------------------------------------------------------"
[[ -n "$AUTH_CMD" ]] && echo "${AUTH_CMD}" [[ -n "$AUTH_CMD" ]] && echo "${AUTH_CMD}"
echo "${INVITE_CMD}" echo "${INVITE_CMD}"
@@ -501,10 +501,10 @@ EOT
if $QR; then if $QR; then
if command -v qrencode >/dev/null 2>&1; then if command -v qrencode >/dev/null 2>&1; then
echo echo
echo "📱 QR (scan to copy the command):" echo "QR (scan to copy the command):"
printf "%s" "${INVITE_CMD}" | qrencode -t ansiutf8 printf "%s" "${INVITE_CMD}" | qrencode -t ansiutf8
else else
echo "⚠️ 'qrencode' not installed; skipping QR." echo "'qrencode' not installed; skipping QR."
fi fi
fi fi
echo 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}" \ 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 "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 # You may 'exit 1' here if you prefer a hard failure
fi fi
@@ -538,7 +538,7 @@ SSH_PID=""
cleanup() { cleanup() {
# stop ssh child if running # stop ssh child if running
if [[ -n "${SSH_PID:-}" ]] && kill -0 "$SSH_PID" 2>/dev/null; then 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 kill -TERM "$SSH_PID" 2>/dev/null || true
wait "$SSH_PID" 2>/dev/null || true wait "$SSH_PID" 2>/dev/null || true
fi fi
@@ -565,7 +565,7 @@ if timeout "$DURATION" tail --pid="$SSH_PID" -f /dev/null; then
else else
rc=$? rc=$?
if [[ $rc -eq 124 ]]; then if [[ $rc -eq 124 ]]; then
echo "⏹️ Sharing ended: reached duration (${DURATION})." echo "Sharing ended: reached duration (${DURATION})."
# ensure the child is gone # ensure the child is gone
if kill -0 "$SSH_PID" 2>/dev/null; then if kill -0 "$SSH_PID" 2>/dev/null; then
kill -TERM "$SSH_PID" 2>/dev/null || true kill -TERM "$SSH_PID" 2>/dev/null || true