Corrected the following mistakes: - Incrementing TTL & HL on the wrong network interface (rmnet). - Not removing properties before setting them; changes don't apply as intended without doing this. - Not waiting until the end of the PREROUTING iptables chain to increase TTL/HL. - Suggesting to download a huge app (Termux) to check for one thing, which is TTL & HL decrement/increment support.master v4
parent
c501945bc7
commit
b9c3b5ab55
@ -1,7 +1,7 @@
|
||||
id=unlimited-hotspot
|
||||
name=Unlimited Hotspot
|
||||
version=v3
|
||||
versionCode=3
|
||||
version=v4
|
||||
versionCode=4
|
||||
author=felikcat
|
||||
description=https://github.com/felikcat/unlimited-hotspot
|
||||
updateJson=https://raw.githubusercontent.com/felikcat/unlimited-hotspot/master/update.json
|
@ -1,31 +1,32 @@
|
||||
#!/system/bin/sh
|
||||
MODDIR=${0%/*}
|
||||
|
||||
# resetprop (without -n) = deletes a property then modifies it, this forces property_service to update that property immediately.
|
||||
|
||||
# Don't automatically insert 'dun' into the APN,
|
||||
# which would persistently tell the telecom that tethering was used.
|
||||
# At that point, only after a reboot and not getting 'dun' added again would mask it.
|
||||
settings put global tether_dun_required 0
|
||||
resetprop -v tether_dun_required 0
|
||||
|
||||
# Tethering hardware acceleration causes high ping issues on the Pixel 4a (5G).
|
||||
settings put global tether_offload_disabled 1
|
||||
resetprop -v tether_offload_disabled 1
|
||||
|
||||
# Don't tell the telecom to check if tethering is even allowed for your data plan.
|
||||
settings put system net.tethering.noprovisioning true
|
||||
settings put system tether_entitlement_check_state 0
|
||||
resetprop -v net.tethering.noprovisioning true
|
||||
resetprop -v tether_entitlement_check_state 0
|
||||
|
||||
# Failsafe: Incase these iptables entries were already present, remove them once.
|
||||
for INTERFACE in "v4-rmnet_data+" "wlan1" "bt-pan"; do
|
||||
iptables -t mangle -D PREROUTING -i $INTERFACE -j TTL --ttl-inc 1
|
||||
iptables -t mangle -D POSTROUTING -o $INTERFACE -j TTL --ttl-inc 1
|
||||
ip6tables -t mangle -D PREROUTING ! -p icmpv6 -i $INTERFACE -j HL --hl-inc 1
|
||||
ip6tables -t mangle -D POSTROUTING ! -p icmpv6 -o $INTERFACE -j HL --hl-inc 1
|
||||
# Don't apply iptables rules until Android has fully booted.
|
||||
until [ $(getprop sys.boot_completed) -eq 1 ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Bypass TTL/HL detections for only Tether device (server) -> Tethered To devices (client).
|
||||
# WARNING: Routers (as the client) require their own TTL/HL increment script.
|
||||
for INTERFACE in "v4-rmnet_data+" "wlan1" "bt-pan"; do
|
||||
iptables -t mangle -I PREROUTING -i $INTERFACE -j TTL --ttl-inc 1
|
||||
# Tethering interfaces -> rndis0: USB, wlan1: Wi-Fi, bt-pan: Bluetooth.
|
||||
# -A: last rule in chain, -I: "head"/first rule in chain (by default).
|
||||
for INTERFACE in "rndis0" "wlan1" "bt-pan"; do
|
||||
iptables -t mangle -A PREROUTING -i $INTERFACE -j TTL --ttl-inc 1
|
||||
iptables -t mangle -I POSTROUTING -o $INTERFACE -j TTL --ttl-inc 1
|
||||
ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i $INTERFACE -j HL --hl-inc 1
|
||||
ip6tables -t mangle -A PREROUTING ! -p icmpv6 -i $INTERFACE -j HL --hl-inc 1
|
||||
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o $INTERFACE -j HL --hl-inc 1
|
||||
done
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "v3",
|
||||
"versionCode": 3,
|
||||
"zipUrl": "https://github.com/felikcat/unlimited-hotspot/releases/download/v3/unlimited-hotspot-v3.zip",
|
||||
"version": "v4",
|
||||
"versionCode": 4,
|
||||
"zipUrl": "https://github.com/felikcat/unlimited-hotspot/releases/download/v4/unlimited-hotspot-v4.zip",
|
||||
"changelog": "Thank you for using the unlimited hotspot module by felikcat!"
|
||||
}
|
Loading…
Reference in New Issue