Running a local HTTP proxy on Android lets you filter, cache, or modify web traffic without installing a system‑wide VPN or rooting the device. This guide assumes you have a fairly recent Android version (7.0+), a stable Wi‑Fi connection, and at least 200 MB of free storage for Termux and its packages.
What you’ll need:
Termux.Safety note: The proxy runs entirely in user space, so it cannot alter system files. However, routing all traffic through a local proxy may expose you to privacy risks if the proxy configuration is left open to other apps. Keep the proxy port blocked by a firewall when not in use.
Termux. Install the official app.pkg update && pkg upgrade -y
This may take a few minutes; allow the process to complete.
nano editor (optional but handy for editing config files):
pkg install nano -y
If you see a warning about storage permissions, grant Termux access via Settings > Apps > Termux > Permissions > Storage. Without this, Privoxy will not be able to write its log file.
pkg install privoxy -y
privoxy --version
You should see something like Privoxy 3.0.33 printed.
Privoxy runs as a user‑space HTTP proxy on a configurable port (default 8118). It does not require root privileges, which makes it ideal for our purpose.
nano $PREFIX/etc/privoxy/config
listen-address. By default it reads listen-address 127.0.0.1:8118. This is already suitable for a local proxy, but you can change the port if another app is using 8118.
Why this matters: The proxy must bind to 127.0.0.1 so that only the Android device itself can reach it. Binding to 0.0.0.0 would expose the proxy to the local network, which is a security risk.
logfile /var/log/privoxy/logfile and uncomment it (remove the leading #). Ensure the directory exists:
mkdir -p $PREFIX/var/log/privoxy
At this point Privoxy is ready to run, but we’ll add a small wrapper script to keep it alive when the screen turns off.
start‑privoxy.sh in your home directory:
nano ~/start-privoxy.sh
#!/data/data/com.termux/files/usr/bin/sh
# Prevent the device from sleeping while Privoxy runs
termux-wake-lock
# Start Privoxy in the background
privoxy $PREFIX/etc/privoxy/config &
# Keep the script alive so Termux does not close the session
wait
chmod +x ~/start-privoxy.sh
~/start-privoxy.sh
You should see no output; Privoxy is now listening on the port you configured.
Note: The termux-wake-lock command keeps the CPU awake, preventing Android from killing the process when the screen turns off. If you prefer the proxy to stop when you’re not actively using the device, omit that line.
127.0.0.1 as the Proxy hostname.8118) as the Proxy port.Android will now send all HTTP (not HTTPS) traffic from apps that respect the system proxy through Privoxy. Most browsers, the Google Play Store, and many third‑party apps follow this setting.
http://config.privoxy.org. This page is served by Privoxy itself and should display a configuration summary.
If you see the Privoxy configuration page, the proxy is active.
tail -f $PREFIX/var/log/privoxy/logfile
You should see entries like GET http://example.com/ ... appear as you browse.
Because Privoxy only handles plain HTTP, HTTPS sites will still connect directly unless you also install a TLS‑intercepting tool, which is beyond the scope of this no‑root guide.
Some apps (e.g., certain VPN clients or browsers that bundle their own networking stack) bypass Android’s proxy configuration. For those, you can use ProxyDroid‑style wrappers, but they typically require root. A practical workaround is to use adb reverse to forward traffic from the app’s local port to Privoxy, but this also needs a PC. In most everyday scenarios, the system proxy covers the majority of traffic you care about, such as web browsing and app updates.
listen-address line to an unused port (e.g., 127.0.0.1:8888) and update the Android proxy settings accordingly.pkg install libandroid-glob if you encounter “cannot open shared object file” errors.termux-wake-lock. You can also enable Termux:Boot (install the add‑on) and add ~/start-privoxy.sh to its ~/.termux/boot folder so the proxy restarts after a reboot.127.0.0.1 and the correct port.http://config.privoxy.org and disable aggressive filters under the Actions tab.
$PREFIX/etc/privoxy/user.action to block trackers, strip cookies, or rewrite URLs.enable-cache 0 (set to 1) in the config file. This can speed up repeated requests on low‑bandwidth connections.~/.termux/boot/start-privoxy.sh. The proxy will start automatically after each reboot.If you no longer need the proxy, simply kill the Privoxy process and remove the wake lock:
pkill privoxy
termux-wake-unlock
Remember to revert the Wi‑Fi proxy settings to None** to avoid apps trying to connect to a non‑existent local server.
By following these steps you have turned a regular Android device into a lightweight, user‑space HTTP proxy. The setup works entirely without root, respects Android’s security model, and can be toggled on or off with a single command. Use it to test web‑filtering rules, reduce data usage on metered connections, or simply gain more visibility into the HTTP traffic your apps generate.
Because everything runs in Termux, you can extend the setup with other command‑line tools—like mitmproxy for TLS interception (requires certificate installation) or tinyproxy for a minimal forward proxy. The foundation you built here is a solid, reproducible base for any future network‑debugging or privacy‑enhancing projects on Android.









