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
felikcat 1 year ago
parent c501945bc7
commit b9c3b5ab55

@ -29,16 +29,15 @@ This guide is tested from an unlocked US https://swappa.com/listings/google-pixe
. Install the following apps:
* The https://f-droid.org/en/packages/com.termux/[Termux] terminal emulator from F-Droid only (https://wiki.termux.com/wiki/Termux_Google_Play[why?]).
* A https://f-droid.org/repo/jackpal.androidterm_72.apk[terminal emulator]; for that app make sure to allow all permissions it asked for.
* https://apkpure.com/network-signal-guru/com.qtrun.QuickTest[Network Signal Guru] for its radio band locking to maintain and increase network speeds.
** Tinkering is required to find your current location's best radio bands.
* https://github.com/AdAway/AdAway/releases[AdAway] to block Network Signal Guru's advertising.
** AdAway requires you to enable "Systemless Hosts" in Magisk's settings.
=== Testing mangling support
. Open Termux.
. Open a terminal emulator.
. `$ su`
. `# iptables -t mangle -A POSTROUTING -o null -j TTL --ttl-inc 1; ip6tables -t mangle -A POSTROUTING -o null -j HL --hl-inc 1`
** No output = good, skip ahead to "1. Blocking Android snitching..."
@ -256,13 +255,18 @@ TIP: After enabling USB tethering, enable "Data Saver". This tells Android to re
This will test for throttling of streaming servers (Netflix), various forms of data fingerprinting, and tethering/hotspot detections.
. Connect to a VPN on the tethered-to (client) device, then repeat the above step.
. Optionally, speedtest again after installing https://github.com/tytydraco/KTweak-Android-App/releases[KTweak] and applying its "throughput" profile.
=== If the VPN can't connect:
. Check if IPv4 or IPv6 is being used to reach the VPN server.
** For T-Mobile, connecting through IPv6 may be required.
. If the VPN still can't connect, try each supported protocol in this order:
** WireGuard -> IKEv2/IPSec -> SoftEther -> AnyConnect [TorGuard only] -> OpenVPN (UDP, port 443) -> OpenVPN (TCP, port 443) -> OpenVPN over SSL (TCP, port 443)
** WireGuard -> IKEv2/IPSec -> SoftEther -> OpenVPN (UDP, port 443) -> OpenVPN (TCP, port 443) -> OpenVPN over SSL (TCP, port 443)
== 4. Getting better internet speeds
. Search for "Roaming" in the Settings app, then disable Roaming.
** Roaming to a different telecom usually means unavoidable throttling. Usually roaming only happens when signal strength is either very poor or non-existent from your telecom. +
For example, T-Mobile USA's agreement with AT&T allow the usage of AT&T towers, but only up to 250kbps download & upload speeds is allowed while roaming on AT&T's network.
. Use Network Signal Guru to set the allowed LTE bands to only the "LTE 4x4 Bands" listed on https://cacombos.com/device/G025E[cacombos.com] for your device.
== Appendices

@ -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…
Cancel
Save