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
|
id=unlimited-hotspot
|
||||||
name=Unlimited Hotspot
|
name=Unlimited Hotspot
|
||||||
version=v3
|
version=v4
|
||||||
versionCode=3
|
versionCode=4
|
||||||
author=felikcat
|
author=felikcat
|
||||||
description=https://github.com/felikcat/unlimited-hotspot
|
description=https://github.com/felikcat/unlimited-hotspot
|
||||||
updateJson=https://raw.githubusercontent.com/felikcat/unlimited-hotspot/master/update.json
|
updateJson=https://raw.githubusercontent.com/felikcat/unlimited-hotspot/master/update.json
|
@ -1,31 +1,32 @@
|
|||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
MODDIR=${0%/*}
|
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,
|
# Don't automatically insert 'dun' into the APN,
|
||||||
# which would persistently tell the telecom that tethering was used.
|
# 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.
|
# 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).
|
# 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.
|
# Don't tell the telecom to check if tethering is even allowed for your data plan.
|
||||||
settings put system net.tethering.noprovisioning true
|
resetprop -v net.tethering.noprovisioning true
|
||||||
settings put system tether_entitlement_check_state 0
|
resetprop -v tether_entitlement_check_state 0
|
||||||
|
|
||||||
# Failsafe: Incase these iptables entries were already present, remove them once.
|
# Don't apply iptables rules until Android has fully booted.
|
||||||
for INTERFACE in "v4-rmnet_data+" "wlan1" "bt-pan"; do
|
until [ $(getprop sys.boot_completed) -eq 1 ]; do
|
||||||
iptables -t mangle -D PREROUTING -i $INTERFACE -j TTL --ttl-inc 1
|
sleep 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
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Bypass TTL/HL detections for only Tether device (server) -> Tethered To devices (client).
|
# 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.
|
# WARNING: Routers (as the client) require their own TTL/HL increment script.
|
||||||
for INTERFACE in "v4-rmnet_data+" "wlan1" "bt-pan"; do
|
# Tethering interfaces -> rndis0: USB, wlan1: Wi-Fi, bt-pan: Bluetooth.
|
||||||
iptables -t mangle -I PREROUTING -i $INTERFACE -j TTL --ttl-inc 1
|
# -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
|
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
|
ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o $INTERFACE -j HL --hl-inc 1
|
||||||
done
|
done
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": "v3",
|
"version": "v4",
|
||||||
"versionCode": 3,
|
"versionCode": 4,
|
||||||
"zipUrl": "https://github.com/felikcat/unlimited-hotspot/releases/download/v3/unlimited-hotspot-v3.zip",
|
"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!"
|
"changelog": "Thank you for using the unlimited hotspot module by felikcat!"
|
||||||
}
|
}
|
Loading…
Reference in New Issue