termux-connecting 1.1.52 → 1.1.53

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
  #!/data/data/com.termux/files/usr/bin/bash
2
2
  set -e
3
3
 
4
- VERSION="1.1.52"
4
+ VERSION="1.1.53"
5
5
 
6
6
  GREEN='\033[0;32m'; YELLOW='\033[1;33m'; RED='\033[0;31m'; CYAN='\033[0;36m'; NC='\033[0m'
7
7
  info() { echo -e "${GREEN}[✓]${NC} $1"; }
@@ -376,25 +376,19 @@ if [ -n "$IP" ]; then
376
376
  echo " Gateway: $gateway"
377
377
  result=$(timeout 5 ping -c 2 -W 2 "$gateway" 2>&1)
378
378
  loss=$(echo "$result" | awk '/loss/{print $6}' | tr -d '%')
379
- rtt=$(echo "$result" | awk -F'/' '/rtt/{print $5}')
380
- if [ -n "$loss" ] && [ "$loss" -lt 50 ] 2>/dev/null; then
379
+ if [ -n "$loss" ] && [ "$loss" -lt 1 ] 2>/dev/null; then
381
380
  STABLE=true
382
- info "Jaringan stabil (packet loss: ${loss}%, RTT: ${rtt:-N/A}ms)"
381
+ info "Jaringan stabil (0% loss)"
383
382
  else
384
- warn "Jaringan tidak stabil (packet loss: ${loss:-100}%)"
383
+ error "Jaringan tidak stabil (packet loss: ${loss:-100}%)"
384
+ echo " Setup dibatalkan."
385
385
  echo ""
386
- echo " Kemungkinan penyebab:"
387
- echo " • Sinyal WiFi lemah — dekatkan ke router"
388
- echo " • Router sibuk / banyak perangkat"
389
- echo " • HP dalam mode hemat daya"
390
- echo ""
391
- if confirm "Tetap lanjutkan setup" "n"; then
392
- STABLE=true
393
- else
394
- echo ""
395
- info "Setup dibatalkan. Perbaiki jaringan lalu ulangi."
396
- exit 0
397
- fi
386
+ echo " Perbaiki:"
387
+ echo " • Dekatkan HP ke router"
388
+ echo " • Matikan data seluler / VPN"
389
+ echo " • Nonaktifkan hemat daya"
390
+ echo " • Ulangi: termux-connecting -y"
391
+ exit 1
398
392
  fi
399
393
  else
400
394
  warn "Tidak bisa deteksi gateway — lewati pengecekan"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.52",
3
+ "version": "1.1.53",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",