How To Proxy Internet Traffic Via Android Tether With Tinyproxy
When you need to route your internet traffic through an Android device using tethering Tinyproxy can be a lightweight and effective solution Tinyproxy is a compact, open-source HTTP proxy designed for Linux making it ideal for use on devices like Raspberry Pis or old laptops that you might have repurposed as a tethering gateway
By linking it to your phone’s USB tethering or wireless hotspot you establish a filtered, private gateway for networked devices to access mobile data
Start by configuring your phone’s connection sharing options You can enable either USB tethering or create a Wi-Fi hotspot from the phone’s settings USB mode is favored for its consistent performance and simpler setup Your machine will automatically obtain an IP from the Android device’s network You can check this with the ifconfig or ip addr command to confirm the connection
Proceed by installing the Tinyproxy package on your Linux machine For Debian-based systems, run sudo apt-get install tinyproxy etc You’ll want to make a few key changes
Specify the internal IP address of your proxy server on the local subnet Modify the access control list to allow your network’s IP block You may also want to set the Port to 8888, which is the default, or choose another if needed Set LogLevel to Info for balanced visibility and minimal log noise
Reload the proxy with sudo service tinyproxy restart Now your Linux machine is acting as a proxy server, forwarding HTTP traffic to your Android device’s internet connection
To use this from another device on your network, configure its browser or system proxy settings to point to the Linux machine’s IP address and the port you set, such as 192.168.1.100:8888
This configuration excels in settings requiring traffic inspection or content control or if you wish to avoid broadcasting your phone’s Wi-Fi signal It can also help bypass network restrictions in places like offices or public Wi-Fi networks by routing traffic through your phone’s data plan
By default, Tinyproxy does not proxy non-HTTP traffic If you need to proxy other protocols like FTP or SOCKS, you’ll need to use additional tools such as Squid or a SOCKS proxy Also, keep in mind that your data usage is still limited by your mobile plan, so monitor your consumption
With Tinyproxy and Android tethering, you have a low cost, low power solution that turns your phone into a gateway for your entire network It’s simple to set up, easy to maintain, and gives you full control over how your traffic flows