termux-connecting 1.1.29 → 1.1.31

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.
@@ -86,6 +86,9 @@ telegram_alert() {
86
86
  "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
87
87
  -d "chat_id=${TELEGRAM_CHAT_ID}" \
88
88
  -d "text=${msg}" >/dev/null
89
+ warn "Notifikasi sudah dikirim ke Telegram admin"
90
+ else
91
+ echo " Telegram tidak dikonfigurasi — lewati notifikasi"
89
92
  fi
90
93
  }
91
94
 
@@ -358,15 +361,20 @@ cmd_check() {
358
361
  echo "Device: ${ACTIVE_DEVICE} (${SSH_USER}@${SSH_HOST}:${SSH_PORT})"
359
362
  echo ""
360
363
 
361
- if run_timeout 10 ssh -o ConnectTimeout=5 -o BatchMode=yes "$ACTIVE_DEVICE" "echo connected"; then
364
+ if run_timeout 10 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 "$ACTIVE_DEVICE" "echo connected"; then
362
365
  info "Koneksi OK"
363
366
  echo ""
364
367
  info "Gunakan ssh $ACTIVE_DEVICE untuk koneksi"
365
368
  else
366
369
  error "Koneksi GAGAL"
367
- telegram_alert "🚨 *Koneksi Termux PUTUS*%0ADevice: ${ACTIVE_DEVICE}%0AHost: ${SSH_USER}@${SSH_HOST}:${SSH_PORT}%0AWaktu: $(date)"
370
+ echo " Penyebab umum:"
371
+ echo " - HP mati/dalam keadaan sleep"
372
+ echo " - Termux di-swipe (close) dari recent apps"
373
+ echo " - sshd crash atau berhenti"
368
374
  echo ""
369
- warn "Notifikasi sudah dikirim ke Telegram admin"
375
+ echo " Di HP: buka Termux, jalankan: sshd"
376
+ echo ""
377
+ telegram_alert "🚨 *Koneksi Termux PUTUS*%0ADevice: ${ACTIVE_DEVICE}%0AHost: ${SSH_USER}@${SSH_HOST}:${SSH_PORT}%0AWaktu: $(date)"
370
378
  echo ""
371
379
  echo -n "Coba lagi? [y/N]: "
372
380
  read -r retry
@@ -382,6 +390,11 @@ cmd_remove() {
382
390
  local name="$1"
383
391
  if [ -z "$name" ]; then
384
392
  error "Nama device diperlukan"
393
+ echo ""
394
+ echo " Device terdaftar:"
395
+ list_devices
396
+ echo ""
397
+ echo " Gunakan: termux-connect-pc remove <nama>"
385
398
  return
386
399
  fi
387
400
  if [ ! -f "$DEVICES_DIR/$name" ]; then
@@ -451,12 +464,24 @@ main() {
451
464
  echo " 1) Konek ke ${ACTIVE_DEVICE}"
452
465
  echo " 2) Tambah device baru"
453
466
  echo " 3) Lihat daftar device"
467
+ echo " 4) Hapus device"
454
468
  echo ""
455
469
  echo -n " Pilih [1]: "
456
470
  read -r choice
457
471
  case "$choice" in
458
472
  2) cmd_connection ;;
459
473
  3) cmd_list ;;
474
+ 4)
475
+ echo ""
476
+ echo " Device terdaftar:"
477
+ list_devices
478
+ echo ""
479
+ local del_name
480
+ del_name=$(prompt " ➤ Nama device yg dihapus" "")
481
+ if [ -n "$del_name" ]; then
482
+ cmd_remove "$del_name"
483
+ fi
484
+ ;;
460
485
  *) cmd_check ;;
461
486
  esac
462
487
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",