termux-connecting 1.1.21 → 1.1.22

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.
@@ -163,6 +163,12 @@ WIFI_SSID=""
163
163
  if command -v termux-wifi-connectioninfo >/dev/null; then
164
164
  WIFI_SSID=$(termux-wifi-connectioninfo 2>/dev/null | grep -o '"ssid":"[^"]*"' | cut -d'"' -f4)
165
165
  fi
166
+ if [ -z "$WIFI_SSID" ] && command -v iw >/dev/null; then
167
+ WIFI_SSID=$(iw dev wlan0 link 2>/dev/null | grep -i ssid | sed 's/.*SSID: //')
168
+ fi
169
+ if [ -z "$WIFI_SSID" ] && [ -r /proc/net/wireless ]; then
170
+ WIFI_SSID=$(awk 'NR==3{print $1}' /proc/net/wireless 2>/dev/null | tr -d ':')
171
+ fi
166
172
 
167
173
  is_cgnat() {
168
174
  [[ "$1" =~ ^10\. ]] || [[ "$1" =~ ^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\. ]]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-connecting",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
4
4
  "description": "CLI setup Termux + koneksi SSH dari PC/Mac dengan Telegram alert",
5
5
  "bin": {
6
6
  "termux-connecting": "bin/termux-connecting",