Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If anyone's looking for an android project, please make one that forwards all hotspot traffic over whatever VPN is enabled. I guess the phone will need rooting.


For what it's worth: LineageOS (and probably other ROMs too) has a setting ("Allow clients to use VPNs") for this in the tethering settings screen. With root and four or five lines of bash script you can replicate this behaviour according to various StackExchange answers.

I'm not sure if this is a setting that comes from LineageOS or from upstream AOSP, but at least the feature is there as a starting point.

Edit: looks like it's a LineageOS feature: https://review.lineageos.org/c/LineageOS/android_frameworks_...


Thanks for these comments re LineageOS (& @ttarr). I dug out an old device I'd already installed it on and sure enough it works. Thanks so much :)


Try this https://github.com/pyamsoft/tetherfi It will route all hotspot traffic through your phone and vpn. Works even without root


That seems cool, but I'm looking for something that would be totally transparent to connected devices (i.e. wouldn't require reconfiguring them at all).


I think my Wireguard VPN already does this, sans root? I enable my VPN and my hotspot connected laptop is now routing its traffic via my house.

Or am I missing what you're looking for?


Are you sure? By default if you use a VPN, only apps on the device will use it. If you enable a wifi hotspot, any devices connected to the hotspot won't route their traffic over the VPN. Have you tried checking your IP from your laptop?


Why the down votes for this comment?

My Android does have that option, under: Hotspot and tethering > Allow clients to use VPNs.

Note however, my ROM is based on LineageOS, probably the reason why not everyone got it?


My Pixel 6 Pro doesn't seem to have this. I use Wireguard, and hotspot traffic goes directly to cellular data, not via VPN.


My device is a OnePlus phone. I don't see the option you're talking about in my hotspot settings, but maybe OnePlus made it the default.


also available on CalyxOS


Are you running lineage or some other custom build? Stock android doesn’t do this afaik.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: