:bloogeR is mE

iOS Hotspot Hacking: Boosting hotspot speeds by over 100 times

July 1, 2021, 7:57 p.m.

The problem

I have no wifi or free hotspots where I'm currently living.

My mobile hotspot, which consumes mobile data, gives me a measly 70kbps even though I am supposed to be getting 3G speeds (around 3mbps I believe).

Youtube takes over a minute to load everything, everything else is abominably slow, and I need a solution to this first-world problem stat!

Brainstorming

Even though my mobile hotspot is 70kbps, the data directly to my phone is much, much quicker (10 mbps).

So, what if we do some finagling and forward all the HTTP requests from my computer to my phone, have my phone very quickly download everything, and regurgitate all the downloaded information back to my computer through USB tethering.

Sounds like all this passing would be very slow, right? I thought so too but boy was I wrong.

Planning

Use USB tethering provided by mobile hotspot (wired tethering is basically hotspot Ethernet, but still capped at 500kbps) to put the phone and computer in the same local network, letting them easily access each other's ports.

Then all I have to do is somehow set up a proxy server on my phone, and let everything on my Windows computer proxy through it.

A major roadblock

Seems simple, but how do you host a proxy server on your phone?

If you're an Android user, you'd probably thinking "just host it on your phone with X gizmo", but I forgot to tell you that I'm doing this on an evil iOS system, notorious for anti-hackability, so we have to find a way around.

All hail Vim

Yes, you heard me right. We're going to use Vim of all things to host the proxy server. I guess Vim really can do anything, huh? Well, we aren't exactly going to be using Vim itself... but a little something-something it's got packaged into it.

There's a very interesting open-source app I found in the iOS App Store a few weeks ago that I've been playing around with called iVim. As you can guess from the name, it's literally just Vim, but on iOS. And if you didn't know, newer versions of Vim have a command called :terminal that lets you open up a whole terminal in Vim.

One feature of this terminal happens to be full Python support... ah, you got it now right? Bullseye! I hosted the proxy server using Python in iVim on my phone! Phew, that's a mouthful, but it works!

Smooth streaming at last

So, after all this work, what are the real, cold-hard results of this little experiment, you ask? My download speeds has gone from 70kbps to roughly 3-5mbps (over 100-fold increase!), and my YouTube videos went from struggling on 480p to playing perfectly smoothly at 1080p.

There was a strange problem with running some applications, where they would directly bypass the system proxy, but I fixed that by funnelling all of the traffic from the problem applications through Proxycap.

Thanks for sticking with me through this journey, and I hope you learned something along the way too!