Whenever I have access to free WiFi connections outside, I feel I'm out of luck because my laptop is running on Linux and its WiFi driver doesn't support the Master mode, which is most likely the only mode that most of the free WiFi services support. Fortunately, my Android phone has no problem accessing those services, but to be able to use this connection on my laptop, I have to install a USB tethering app on my phone and its client application on my laptop. However, most of such Android apps do not support Linux, so I decided to be a little bit creative.
Most important to some people, you don't have to root your Android phone. You'll need SSHelper and ConnectBot on your phone.
Most Android phones come with the service provider's default Tethering and Mobile HotSpot settings. I know you're not allowed to USB tether to access the mobile network from the computer. In this article, you're accessing free WiFi services, not the mobile network, through the USB tethering setting, so your Android phone is already disconnected from the mobile network and, instead, is connected to a free WiFi connection.
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.42.180 netmask 255.255.255.0 broadcast 192.168.42.255 ...
Now, you know your computer's IP address, but you don't know your phone's IP address. Once you figure it out, you have to run the SSH server on your phone and connect to it from the computer.
OK, let's change Firefox settings to use the SOCKS 5 proxy server you just created.
There should be a couple of ways to simplify the above steps, but I only discussed how to set it up. The following is my usbproxy script:
#!/bin/sh echo "Type root password" su -c 'ifconfig usb0 up; dhclient usb0' echo "Type SSHelper password" ssh 192.168.42.129 -p 2222 -D 8080 -C2qTnNf echo "SOCKS 5 Proxy Server: localhost:8080"
Replace 192.168.42.129 with your Android's IP address.