Skip to content

Commit

Permalink
Update to v.1.3.3!
Browse files Browse the repository at this point in the history
- Added support for Android 11 (#25) and Magisk 21.x (#26)!
- Updated user-agent for downloading hosts.
- The `hitWeb` function shouldn't make you wait for long now.
  • Loading branch information
Avinash Reddy committed Oct 16, 2020
1 parent 2c433af commit 7fd8f2f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<div align="center">
<!-- Version -->
<img src="https://img.shields.io/badge/Version-1.3.2-blue.svg?longCache=true&style=flat-square"
<img src="https://img.shields.io/badge/Version-1.3.3-blue.svg?longCache=true&style=flat-square"
alt="Version" />
<!-- Magisk -->
<img src="https://img.shields.io/badge/Magisk-20.0+-green.svg?longCache=true&style=flat-square"
alt="Version" />
<!-- Last Updated -->
<img src="https://img.shields.io/badge/Updated-May 25, 2020-orange.svg?longCache=true&style=flat-square"
<img src="https://img.shields.io/badge/Updated-Oct 15, 2020-orange.svg?longCache=true&style=flat-square"
alt="_time_stamp_" />
<!-- Status -->
<img src="https://img.shields.io/badge/Status-Stable-green.svg?longCache=true&style=flat-square"
Expand Down Expand Up @@ -188,6 +188,12 @@ Uninstall
Changelog
------

v.1.3.3
- Added support for Android 11 and Magisk 21.x!
- Updated user-agent for downloading hosts.
- The `hitWeb` function shouldn't make you wait for long now.


v.1.3.2
- Added missing cut alias. (Which was breaking domain verifying functions.)
- Fixed missing systemless hosts print.
Expand Down Expand Up @@ -253,4 +259,4 @@ The content of this project itself is licensed under the [MIT](https://github.co
<div align="center">
<h2>Let's make an annoyance free better open internet, altogether!</h2>
<sub>A project by <a href="https://nayemador.com" target="_blank">Ador</a> with ❤<pub>
</div>
</div>
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=energizedprotection
name=Energized Protection
version=1.3.2
versionCode=200525132
version=1.3.3
versionCode=201015133
author=AdroitAdorKhan
description=Let's make an annoyance free better open internet, altogether! https://energized.pro
19 changes: 15 additions & 4 deletions system/bin/energized
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@
# Script Begins -
# ========================================

# ----------------------------------------
# Determine the Magisk binary's location
# ----------------------------------------

if [ -d "/sbin/.magisk" ]; then
magisk_sbin="/sbin/.magisk"
elif [ -d "$(magisk --path)/.magisk" ]; then
magisk_sbin="$(magisk --path)/.magisk"
fi

# ----------------------------------------
# Load setup files and strings
modPath="/sbin/.magisk/modules/energizedprotection/system/bin"
# ----------------------------------------
modPath="$magisk_sbin/modules/energizedprotection/system/bin"
. $modPath/setupFiles.sh
. $modPath/mainMenu.sh
. $modPath/strings.sh
Expand Down Expand Up @@ -54,7 +65,7 @@ N='\e[0m' > /dev/null 2>&1; # No color
NC='\033[0m' > /dev/null 2>&1; # printf No color
# ----------------------------------------

hitWeb() { curl -sf http://go.energized.pro/web > /dev/null 2>&1; }
hitWeb() { curl --connect-timeout 5 -sf http://go.energized.pro/web > /dev/null 2>&1; }

# ----------------------------------------
# Mount and unmount system
Expand All @@ -70,7 +81,7 @@ unmountSystem(){
# ----------------------------------------
# Variables
# ----------------------------------------
userAgent='Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0'
userAgent='Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0'
hostsGZ=$directory/hosts.gz
versionInfo=$directory/cache/version.md
versionBackup=$directory/cache/version.md.bck
Expand All @@ -97,7 +108,7 @@ currentIP=$(grep -o -m 1 '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}
# ----------------------------------------
# Versioning & Date
# ----------------------------------------
version=$Y'1.3.2'$N > /dev/null 2>&1
version=$Y'1.3.3'$N > /dev/null 2>&1
releaseDate=$G'May 25, 2020'$N > /dev/null 2>&1
date=$(date "+%d.%m.%Y %H:%M:%S")
# ----------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions system/bin/setupFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ checkMagisk() {
busyboxPath=/data/adb/magisk
return 1
;;
'21'[0-9a-zA-Z]*) # Version 21.x
hosts=/data/adb/modules/hosts/system/etc/hosts
busyboxPath=/data/adb/magisk
return 1
;;
*)
echo -e "\n >Version: $printMagiskVersion - not supported.\n > Exiting..."
exit
Expand Down

0 comments on commit 7fd8f2f

Please sign in to comment.