termux-connecting 1.1.39 → 1.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- VERSION="1.1.12"
4
+ VERSION="1.1.38"
5
5
  CONFIG_DIR="$HOME/.config/termux-connecting"
6
6
  CONFIG_FILE="$CONFIG_DIR/config"
7
7
  DEVICES_DIR="$CONFIG_DIR/devices"
@@ -1,6 +1,8 @@
1
1
  #!/data/data/com.termux/files/usr/bin/bash
2
2
  set -e
3
3
 
4
+ VERSION="1.1.38"
5
+
4
6
  GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; CYAN='\033[0;36m'; NC='\033[0m'
5
7
  info() { echo -e "${GREEN}[✓]${NC} $1"; }
6
8
  warn() { echo -e "${YELLOW}[!]${NC} $1"; }
@@ -9,15 +11,19 @@ title() { echo -e "\n${CYAN}━━━ $1 ━━━${NC}\n"; }
9
11
 
10
12
  AUTO=false
11
13
  CHECK=false
14
+ DEBUG=false
12
15
  for arg in "$@"; do
13
16
  [ "$arg" = "-y" ] && AUTO=true
14
17
  [ "$arg" = "--check" ] || [ "$arg" = "--status" ] && CHECK=true
18
+ [ "$arg" = "--debug" ] && DEBUG=true
15
19
  done
16
20
 
21
+ $DEBUG && set -x
22
+
17
23
  # ─── Mode: Check/Status ───
18
24
  if $CHECK; then
19
25
  echo ""
20
- title "TERMUX CONNECTING — Status"
26
+ title "TERMUX CONNECTING — Status v${VERSION}"
21
27
  echo " ⏱ Uptime HP : $(uptime -p 2>/dev/null || echo 'N/A')"
22
28
  echo ""
23
29
  echo " 🔑 SSH Server :"
@@ -111,7 +117,7 @@ if [ ! -f "$WELCOME_FILE" ]; then
111
117
  touch "$WELCOME_FILE"
112
118
  fi
113
119
 
114
- title "TERMUX CONNECTING — Setup"
120
+ title "TERMUX CONNECTING v${VERSION} — Setup"
115
121
 
116
122
  # ─── 1. coreutils ───
117
123
  if ! command -v timeout >/dev/null; then
@@ -203,9 +209,9 @@ if command -v termux-wake-lock >/dev/null; then
203
209
  termux-wake-lock 2>/dev/null && info "Wake lock aktif — koneksi tetap terjaga saat layar mati"
204
210
  fi
205
211
 
206
- # notification — agar Android tidak kill Termux
212
+ # notification — agar Android tidak kill Termux (timeout 3 detik)
207
213
  if command -v termux-notification >/dev/null; then
208
- termux-notification -t "Termux Connecting" -c "SSH server berjalan — ${USERNAME}@${IP}:8022" --id sshd-keepalive --ongoing 2>/dev/null
214
+ timeout 3 termux-notification -t "Termux Connecting" -c "SSH server berjalan — port 8022" --id sshd-keepalive --ongoing 2>/dev/null || true
209
215
  fi
210
216
 
211
217
  # battery optimization — buka setelan langsung
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.39",
3
+ "version": "1.1.41",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",