diff --git a/README.adoc b/README.adoc index de18cd7..a57cc80 100644 --- a/README.adoc +++ b/README.adoc @@ -19,7 +19,7 @@ This bypass method & tutorial compared to PDANet, FoxFi, NetShare, EasyTether, W . Bypasses service specific throttling such as limited video quality on YouTube or other streaming services, and censorship. ** Other devices have to install an app for this goal, it's unavoidable. -This guide is tested from an unlocked US https://swappa.com/listings/google-pixel-4a-5g/unlocked[Pixel 4a 5G], it can be had for $100. +This guide is tested from an unlocked US https://swappa.com/listings/google-pixel-4a-5g/unlocked[Pixel 4a 5G], it can be had for ~$110. == Preparation @@ -34,7 +34,7 @@ This guide is tested from an unlocked US https://swappa.com/listings/google-pixe * 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. -* https://apkpure.com/netmonster/cz.mroczis.netmonster[NetMonster] for its network monitoring. Without it, you are practically blind to what bands are used, and what the various signal strengths are; this is very useful information. +* https://apkpure.com/netmonster/cz.mroczis.netmonster[NetMonster] for its network monitoring. Without it, you are practically blind to what LTE or 5G bands are used, and what the various signal strengths are; this is very useful information. === Testing mangling support @@ -63,8 +63,8 @@ Use these search terms on the https://forum.xda-developers.com/search/[XDA Forum == [[skip-ahead]]1. Blocking Android snitching, and spoofing TTL & HL -. Download our https://github.com/felikcat/unlimited-hotspot/releases/download/v4/unlimited-hotspot-v4.zip[Unlimited Hotspot] Magisk module. -. Open Magisk -> Modules -> Install from storage -> Select the "unlimited-hotspot-v4.zip" that was downloaded. +. Download our https://github.com/felikcat/unlimited-hotspot/releases/download/v5/unlimited-hotspot-v5.zip[Unlimited Hotspot] Magisk module. +. Open Magisk -> Modules -> Install from storage -> Select the "unlimited-hotspot-v5.zip" that was downloaded. . Reboot. @@ -129,9 +129,9 @@ iptables -t mangle -I POSTROUTING -o usb+ -j TTL --ttl-inc 2 ip6tables -t mangle -A PREROUTING ! -p icmpv6 -i usb+ -j HL --hl-inc 2 ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o usb+ -j HL --hl-inc 2 ---- -Have to set permissions correctly to avoid this: `custom_script: Found wan-event, but script is not set executable!` + -`# chmod a+rx /jffs/scripts/*` + -`# reboot` +TIP: Set permissions correctly to avoid this: `custom_script: Found wan-event, but script is not set executable!` + +1. `# chmod a+rx /jffs/scripts/*` + +2. `# reboot` ___ ==== @@ -173,8 +173,8 @@ This tests for throttling of streaming servers (Netflix), various forms of data == 3. 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. +** Roaming to a different telecom usually means unavoidable throttling. +*** 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. @@ -204,15 +204,14 @@ ___ [%collapsible] ==== -[.lead] -The recommendations +*The recommendations* * United States citizens: https://www.privateinternetaccess.com/vpn-server[Private Internet Access]. Has a server in every single US state, and an optional dedicated IP addon if streaming services (Netflix, Hulu, Amazon Prime, etc.) must always work. * The fastest, but with a limited selection of servers for the United States: https://hide.me/en/network[hide.me]. * Strong emphasis on ethics: https://mullvad.net/en/servers[Mullvad], https://www.cryptostorm.is/uptime[Cryptostorm], https://airvpn.org/status/[AirVPN]. -[.lead] -The requirements + +*The requirements* . Network locking in their VPN software is reliable; very important to stay under the telecom's radar regarding "OS fingerprinting". diff --git a/module.prop b/module.prop index a7b216b..abde153 100644 --- a/module.prop +++ b/module.prop @@ -1,7 +1,7 @@ id=unlimited-hotspot name=Unlimited Hotspot -version=v4 -versionCode=4 +version=v5 +versionCode=5 author=felikcat description=https://github.com/felikcat/unlimited-hotspot updateJson=https://raw.githubusercontent.com/felikcat/unlimited-hotspot/master/update.json \ No newline at end of file diff --git a/service.sh b/service.sh index 582a21c..f76d105 100644 --- a/service.sh +++ b/service.sh @@ -1,20 +1,53 @@ #!/system/bin/sh MODDIR=${0%/*} -# resetprop (without -n) = deletes a property then modifies it, this forces property_service to update that property immediately. +# Write pending (memory) cached data to disk as a precaution before applying any changes. +sync +# 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. resetprop -v tether_dun_required 0 -# Tethering hardware acceleration causes high ping issues on the Pixel 4a (5G). +# Tethering hardware acceleration causes latency issues on the Pixel 4a (5G). resetprop -v tether_offload_disabled 1 # Don't tell the telecom to check if tethering is even allowed for your data plan. resetprop -v net.tethering.noprovisioning true resetprop -v tether_entitlement_check_state 0 + +# == Network optimizations == + +# Disabling ICMP echo replies breaks PMTUD, leading to worsened packet fragmentation. +write /proc/sys/net/ipv4/icmp_echo_ignore_all 0 +write /proc/sys/net/ipv6/icmp/echo_ignore_all 0 + +# TCP acknowledgements help with lossy connections. +write /proc/sys/net/ipv4/tcp_sack 1 +write /proc/sys/net/ipv4/tcp_dsack 1 +write /proc/sys/net/ipv4/tcp_fack 1 + +# Ensure MTU is valid to prevent stuck connection(s); very useful on misconfigured networks: +# https://blog.cloudflare.com/path-mtu-discovery-in-practice/ +write /proc/sys/net/ipv4/tcp_mtu_probing 1 + +# iOS 11 forced telecoms to implement full support for TCP ECN. +write /proc/sys/net/ipv4/tcp_ecn 1 + +# Protects against wrapped TCP sequence numbers, as they cause more packet retransmissions during packet loss conditions. +write /proc/sys/net/ipv4/tcp_timestamps 1 + +# At 1: Violates TCP standards and can cause unpredictable network performance. +write /proc/sys/net/ipv4/tcp_syncookies 0 + +# Enables TCP Fast Open (RFC7413) for both requesting (client) and sending (server). +write /proc/sys/net/ipv4/tcp_fastopen 3 + +# == END == + + # Don't apply iptables rules until Android has fully booted. until [ $(getprop sys.boot_completed) -eq 1 ]; do sleep 1 @@ -23,10 +56,12 @@ 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. # Tethering interfaces -> rndis0: USB, wlan1: Wi-Fi, bt-pan: Bluetooth. -# -A: last rule in chain, -I: "head"/first rule in chain (by default). +# -A: last rule in chain, -I: "head"/first rule (by default) in chain. 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 -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 + +exit 0 diff --git a/update.json b/update.json index eae47a8..531d6bf 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "v4", - "versionCode": 4, + "version": "v5", + "versionCode": 5, "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!" } \ No newline at end of file