termux-connecting 1.1.30 → 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.
- package/bin/termux-connect-pc +11 -3
- package/package.json +1 -1
package/bin/termux-connect-pc
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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
|