How to share Mullvad VPN from Android on all your network?

Suppose you want to share your Mullvad VPN over the network, you’re connected to it on your Android phone but not on any other device. How cool would it be if you could share it with other devices? Well you can do that.

Once you connect to Mullvad VPN on your device, you’ll have access to a socks5 proxy on socks5://10.64.0.1:1080, however this IP is only accessible from your Android phone. To share it with your other devices, first install Termux, then download the correct gost binary according to your phone’s CPU architecture. Then you can instruct gost to forward all the packets it gets on port 8090 for example, to the socks5 provided by Mullvad. Done!

wget https://github.com/go-gost/gost/releases/download/v3.1.0/gost_3.1.0_linux_arm64.tar.gz # change the version and architecture accordingly
tar xfv *.tar.gz
./gost -L :8090 -F socks5://10.64.0.1:1080 # If you're in a hostile environment, use -L socks5://user:password@:8090 instead to have a socks5 proxy with authentication.

Now if inside your Mullvad app settings, “Local network sharing” is turned on, then you can easily connect to your phone’s IP from other devices and use the socks5/http/https proxy provided on its port 8090. You might think that since all servers in Mullvad offer socks5 proxy, you can access them all, but sadly this is not possbile because folks at Mullvad have decided that as soon as you turn on local network sharing, your connection to other servers should be lost.

You can use this socks5 proxy using FoxyProxy on Firefox on both Android (yes! you can install extensions on Firefox Android) and GNU\Linux/Windows/MacOS.

Have thoughts or questions? I'd love to hear them:

hossein.01 (Signal)
me@hossein.me

Want more articles like this one? Get notified of new posts by subscribing to the RSS feed or the email newsletter. I won't share your email or send spam, only blog posts.

Want more content now? This blog's archive has 34 ready-to-read articles. I also curate a list of cool URLs I find on the internet.

Find a mistake? This blog is open source, you can always open an issue.

Thanks for reading! ♡ All content on this blog is licensed under CC BY-SA 4.0, except where noted otherwise, or for third-party materials.