termux-connecting 1.1.9 → 1.1.11

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.9"
4
+ VERSION="1.1.11"
5
5
  CONFIG_DIR="$HOME/.config/termux-connecting"
6
6
  CONFIG_FILE="$CONFIG_DIR/config"
7
7
  SSH_PORT=8022
@@ -53,11 +53,18 @@ else
53
53
  echo " Untuk mengganti ke repo stable, jalankan:"
54
54
  echo " termux-change-repo"
55
55
  echo ""
56
+ echo " Pilih mirror yang stabil:"
57
+ echo " - SourceForge (SF) — paling stabil"
58
+ echo " - Grimler — recommended"
59
+ echo " - Albatross — alternatif"
60
+ echo ""
56
61
  echo -n " Ingin ganti repo sekarang? [y/N]: "
57
62
  read -r change_repo
58
63
  if [[ "$change_repo" =~ ^[Yy]$ ]]; then
59
64
  termux-change-repo
60
- echo " Ulangi update setelah selesai."
65
+ echo ""
66
+ echo " Ulangi update setelah selesai:"
67
+ echo " termux-connecting"
61
68
  fi
62
69
  fi
63
70
 
@@ -70,7 +77,11 @@ for cmd in git node; do
70
77
  echo -n " Install $cmd sekarang? [Y/n]: "
71
78
  read -r install_it
72
79
  if [[ -z "$install_it" || "$install_it" =~ ^[Yy]$ ]]; then
73
- pkg install -y "$cmd" && info "$cmd berhasil diinstall" || error "Gagal install $cmd"
80
+ if [ "$cmd" = "node" ]; then
81
+ pkg install -y nodejs-lts && info "$cmd berhasil diinstall" || error "Gagal install $cmd"
82
+ else
83
+ pkg install -y "$cmd" && info "$cmd berhasil diinstall" || error "Gagal install $cmd"
84
+ fi
74
85
  else
75
86
  warn "Lewati install $cmd"
76
87
  fi
@@ -93,8 +104,21 @@ fi
93
104
 
94
105
  title "4. Informasi Koneksi"
95
106
  USERNAME=$(whoami)
96
- IP=$(ip -o -4 addr show | awk '{print $4}' | cut -d/ -f1 | grep -v 127.0.0.1 | head -n1)
97
107
 
108
+ # Deteksi IP — coba beberapa metode
109
+ IP=""
110
+ if command -v ip; then
111
+ IP=$(ip -4 addr show | awk '/inet /{print $2}' | cut -d/ -f1 | grep -v 127.0.0.1 | head -1)
112
+ fi
113
+ if [ -z "$IP" ] && command -v ifconfig; then
114
+ IP=$(ifconfig | awk '/inet /{print $2}' | grep -v 127.0.0.1 | head -1)
115
+ fi
116
+ if [ -z "$IP" ] && command -v hostname; then
117
+ IP=$(hostname -I 2>/dev/null | awk '{print $1}')
118
+ fi
119
+ if [ -z "$IP" ] && [ -d /data/data/com.termux ]; then
120
+ IP=$(ip route get 1.1.1.1 2>/dev/null | awk '{print $7}' | head -1)
121
+ fi
98
122
  if [ -z "$IP" ]; then
99
123
  IP="(tidak terdeteksi — pastikan WiFi/data aktif)"
100
124
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",