Skip to content

Commit

Permalink
0.6.3
Browse files Browse the repository at this point in the history
* torrent IP: bug fix to support ipleak/AirVPN server changes
* support for vtap & feth devices
  • Loading branch information
JayBrown committed Nov 23, 2020
1 parent 053db5f commit a74bb04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions myip
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/zsh
# shellcheck shell=bash

# myip v0.6.1
# myip v0.6.3

export LANG=en_US.UTF-8
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/local/bin:/opt/sw/bin:/sw/bin:"$HOME"/.local/bin:"$HOME"/bin:"$HOME"/local/bin

tabs -12

process="myip"
vno="0.6.1"
vno="0.6.3"

_simple-ip () {
if $offline ; then
Expand Down Expand Up @@ -189,7 +189,7 @@ _torrent () {
while true
do
[[ $btcount -eq 3 ]] && break
tinfo=$(transmission-remote -t "$btn" -i 2>/dev/null | grep "look https\:\/\/ipleak\.net for details\.$")
tinfo=$(transmission-remote -t "$btn" -i 2>/dev/null | grep "Tracker gave a warning: Detected IP:")
[[ $tinfo ]] && break
sleep "$btsleep"
((btsleep++))
Expand All @@ -201,7 +201,7 @@ _torrent () {
$nodaemon && _killbt
return
fi
torrentip=$(echo "$tinfo" | awk -F"IP:" '{print $2}' | awk -F"," '{print $1}')
torrentip=$(echo "$tinfo" | awk -F" IP:" '{print $2}')
! [[ $torrentip ]] && torrentip="-"
sleep 1
transmission-remote -t "$btn" -S &>/dev/null
Expand Down Expand Up @@ -685,7 +685,7 @@ if ! [[ $localdevice ]] ; then
else
networkstatus=$(ifconfig "$localdevice" 2>/dev/null)
if ! echo "$networkstatus" | grep -q "status: active$" &>/dev/null ; then
if [[ $localdevice == "utun"* ]] || [[ $localdevice == "tun"* ]] || [[ $localdevice == "utap"* ]] || [[ $localdevice == "tap"* ]] ; then
if [[ $localdevice == "utun"* ]] || [[ $localdevice == "tun"* ]] || [[ $localdevice == "utap"* ]] || [[ $localdevice == "tap"* ]] || [[ $localdevice == "vtap"* ]] || [[ $localdevice == "feth"* ]] ; then
virtual=true
arp_raw=$(arp -a 2>/dev/null | head -1)
apaddr=$(echo "$arp_raw" | awk -F"[)(]" '{print $2}')
Expand Down

0 comments on commit a74bb04

Please sign in to comment.