termux-connecting 1.1.7 → 1.1.9

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.7"
4
+ VERSION="1.1.9"
5
5
  CONFIG_DIR="$HOME/.config/termux-connecting"
6
6
  CONFIG_FILE="$CONFIG_DIR/config"
7
7
  SSH_PORT=8022
@@ -13,6 +13,32 @@ warn() { echo -e "${YELLOW}[!]${NC} $1"; }
13
13
  error() { echo -e "${RED}[✗]${NC} $1"; }
14
14
  title() { echo -e "\n${CYAN}━━━ $1 ━━━${NC}\n"; }
15
15
 
16
+ WELCOME_FILE="$HOME/.config/termux-connecting/.welcomed"
17
+ if [ ! -f "$WELCOME_FILE" ]; then
18
+ echo ""
19
+ echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
20
+ echo -e "${GREEN} termux-connecting berhasil diinstall!${NC}"
21
+ echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
22
+ echo ""
23
+ echo -e "${CYAN}Script ini akan membantu kamu:${NC}"
24
+ echo " 1. Update & upgrade paket Termux"
25
+ echo " 2. Install Git & Node.js (jika perlu)"
26
+ echo " 3. Set password untuk SSH"
27
+ echo " 4. Tampilkan IP untuk koneksi dari PC"
28
+ echo ""
29
+ echo -e "${CYAN}Di PC/Mac, jalankan:${NC}"
30
+ echo " termux-connect-pc"
31
+ echo ""
32
+ echo -e "${CYAN}Subcommand PC:${NC}"
33
+ echo " termux-connect-pc connection Setup/ubah koneksi"
34
+ echo " termux-connect-pc check Cek koneksi & kirim alert Telegram"
35
+ echo " termux-connect-pc help Bantuan"
36
+ echo " termux-connect-pc version Versi"
37
+ echo ""
38
+ mkdir -p "$HOME/.config/termux-connecting"
39
+ touch "$WELCOME_FILE"
40
+ fi
41
+
16
42
  title "TERMUX CONNECTING — Setup"
17
43
  echo "Memeriksa dan mengkonfigurasi Termux..."
18
44
  echo "----------------------------------------"
@@ -77,14 +103,25 @@ echo " Username : $USERNAME"
77
103
  echo " IP : $IP"
78
104
  echo " Port : 8022"
79
105
  echo ""
80
- echo " Untuk koneksi dari PC/Mac:"
81
- echo " ssh -p 8022 ${USERNAME}@${IP}"
106
+ echo " Di PC/Mac, jalankan perintah berikut:"
107
+ echo " npm i -g termux-connecting"
108
+ echo " termux-connect-pc"
109
+ echo ""
110
+ echo " Lalu isi data di atas saat diminta."
111
+ echo " Setelah setup, cukup: ssh ${HOST_ALIAS:-termux-a8star}"
82
112
  echo ""
83
113
  warn "Pastikan HP dan PC terhubung ke jaringan WiFi YANG SAMA"
84
114
  echo ""
85
115
  echo " Jika SSH server belum jalan:"
86
116
  echo " sshd"
87
117
  echo ""
118
+ echo " Data koneksi — simpan untuk setup PC:"
119
+ echo " ┌─────────────────────────────┐"
120
+ echo " │ Username : $USERNAME │"
121
+ echo " │ IP : $IP │"
122
+ echo " │ Port : 8022 │"
123
+ echo " └─────────────────────────────┘"
124
+ echo ""
88
125
 
89
126
  echo "----------------------------------------"
90
127
  info "Setup selesai!"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",
@@ -18,7 +18,6 @@
18
18
  "node": ">=12"
19
19
  },
20
20
  "scripts": {
21
- "postinstall": "node bin/postinstall.js",
22
21
  "prepublishOnly": "./scripts/bump-version.sh",
23
22
  "postpublish": "git push"
24
23
  }
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env node
2
- var G = '\x1b[32m',
3
- Y = '\x1b[33m',
4
- C = '\x1b[36m',
5
- N = '\x1b[0m';
6
- console.log(G + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━' + N);
7
- console.log(G + ' termux-connecting berhasil diinstall!' + N);
8
- console.log(G + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━' + N);
9
- console.log('');
10
- console.log(C + 'Di Termux:' + N);
11
- console.log(' termux-connecting');
12
- console.log(' Setup perangkat: update paket, install tools, set password, lihat IP.');
13
- console.log('');
14
- console.log(C + 'Di PC/Mac:' + N);
15
- console.log(' termux-connect-pc');
16
- console.log(' Koneksi ke Termux: input IP/user/pass, setup SSH key, Telegram alert.');
17
- console.log('');
18
- console.log(Y + 'Subcommand PC:' + N);
19
- console.log(' termux-connect-pc connection Setup/ubah koneksi');
20
- console.log(' termux-connect-pc check Cek koneksi & kirim alert Telegram');
21
- console.log(' termux-connect-pc help Bantuan');
22
- console.log(' termux-connect-pc version Versi');
23
- console.log('');
24
- console.log(G + 'Selamat menggunakan!' + N);
25
- console.log('');