[APP][root][5.0+] VPN Hotspot: VPN tethering/Wi-Fi repeater (open source)

Search This thread
Jul 4, 2019
12
2
play.google.com
Great

Great

Connecting things to your VPN made simple. Share your VPN connection over hotspot or repeater. (root required)


This app is useful for:

* Connecting things that don't support VPN like Chromecasts behind corporate firewalls;
* Setting up gapps behind corporate firewalls;
* Connecting to your mobile hotspot but you're not bothered to set up VPN on your device;
* Bypassing tethering limits. (you might need more of a real VPN than an ad-blocker to fool a smarter cellular provider)

This app is designed to do only minimal changes to your system, so there's almost no chance you will brick your device and/or break your Internet using this app under normal conditions. However there's also absolutely no guarantee it won't.

https://github.com/Mygod/VPNHotspot
https://play.google.com/store/apps/details?id=be.mygod.vpnhotspot
https://labs.xda-developers.com/store/app/be.mygod.vpnhotspot

Featured on...
* XDA developers: https://www.xda-developers.com/vpn-hotspot-share-vpn-connection/
* Android Police: https://www.androidpolice.com/2018/...9-1-18/#VPN_Hotspot_-_tetheringWi-Fi_repeater
* Baixaki: https://www.baixaki.com.br/android/download/vpn-hotspot.htm
 

pharpe

Senior Member
Mar 30, 2011
307
74
Dallas
Just loaded this on my Pixel 3a but my tethered clients are not going over the VPN. I've tried disabling hardware acceleration.
Stock Android 10 with clean install
Magisk latest 20.3 Stable
VPN is PIA. I'm connecting using the PIA app

Debug Log

Thanks
 
Last edited:

pharpe

Senior Member
Mar 30, 2011
307
74
Dallas
Export while service is active.

I connected to VPN. IP is 104... VPN ID is 173...
pia.jpg



Started VPN Hotspot and turned on tether
vpn_hotspot.jpg




Connected PC to the hotspot and checked external IP. It's not using the VPN IP
ip.jpg


I also tried toggling the wlan1 on and check again but still using the ISP IP address

Log
 
Last edited:

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
I connected to VPN. IP is 104... VPN ID is 173...
pia.jpg



Started VPN Hotspot and turned on tether
vpn_hotspot.jpg




Connected PC to the hotspot and checked external IP. It's not using the VPN IP
ip.jpg


I also tried toggling the wlan1 on and check again but still using the ISP IP address

Log

Interesting. Can you run the following in adb shell or a shell app under the same circumstances (turn on wlan1, turn on VPN), and show me the result?
su -c 'ip route get from 192.168.43.64 iif wlan1 to 9.9.9.9'

Can you also try if repeater (in this app) works properly?
 

pharpe

Senior Member
Mar 30, 2011
307
74
Dallas
Interesting. Can you run the following in adb shell or a shell app under the same circumstances (turn on wlan1, turn on VPN), and show me the result?
su -c 'ip route get from 192.168.43.64 iif wlan1 to 9.9.9.9'

Can you also try if repeater (in this app) works properly?

Code:
C:\>adb shell
sargo:/ $ su -c 'ip route get from 192.168.43.64 iif wlan1 to 9.9.9.9'
9.9.9.9 from 192.168.43.64 via 192.168.1.1 dev wlan0 table wlan0
    cache iif wlan1
sargo:/ $ su -c 'ip route get from 192.168.43.64 iif wlan1 to 9.9.9.9'
9.9.9.9 from 192.168.43.64 dev tun0 table tun0
    cache iif wlan1

Ran it twice. Once with the wlan1 toggle off and the second time on. After tuning wlan1 on it's now showing my VPN IP address on the client PC . Not sure what changed but it's working now.
 
  • Like
Reactions: Mygod Studio

motolio

Senior Member
Oct 27, 2008
125
21
HTC One M8 for Windows
Hi All,

To the author -- this is a great program for many reasons -- I have one enhancement that would be great for TMobile USA users...but first a little background....

T-Mobile has been tightening up it's tethering policy lately making it harder for folks to Tether undetected. This is usually not a big deal to me since I rarely go over, but occasionally when I need to...the ability to hide tethering is AWESOME. Unlike with most carriers, any type of VPN connection will cause TMobile to start monitoring you for tethering and counting your usage as tether, however you can typically hide it by:
1) Not using a TMobile branded phone w/o custom ROM that notifies TMobile you are tethering;
2) Not using the hidden tethering APN (VPN Hotspot will do that);
3) Changing TTL on your computer to 65...so it gets reduced to 64 when it leaves your phone...which makes it look like phone traffic;

Note: They used to monitor browser user agents, but don't seem to any more.

A great and easy enhancement would be to force TTL to 64 using POSTROUTING as an option, as this will hide traffic coming from anything connected via the hotspot so it looks like phone traffic w/o a VPN.

Anyway -- my computer does this, and with VPN Hotspot, using my OnePLus 6's tethering and VPN tether (and no VPN) the traffic is not counted as tethering.

Thanks for a great app...

MW

By "not using the hidden tethering apn" do you mean, I should not add dun to my apn? Thanks!
 

kos25k

Senior Member
Nov 15, 2012
3,094
427
hello.on my tv box (vorke Z6) when i press hotspot button,wifi turns off.How can i enable hotspot same time with wifi please?any magisk module?
 

kos25k

Senior Member
Nov 15, 2012
3,094
427
Repeater. If you don't see it, your phone doesn't support it.
thanks.I enabled it,i thought it was hotspot option.i see second network on my phone ok,but which the password is supposed to be?bit confused..
*Forget it i found!Now i have 2 issues:
1) Mu devices keep trying to connect,they say they obtain IP adress but it just takes ages.
2)There is a second extra network among with new created,called DIRECT-cV.
 
Last edited:

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
thanks.I enabled it,i thought it was hotspot option.i see second network on my phone ok,but which the password is supposed to be?bit confused..
*Forget it i found!Now i have 2 issues:
1) Mu devices keep trying to connect,they say they obtain IP adress but it just takes ages.
2)There is a second extra network among with new created,called DIRECT-cV.

dhcp workaround
 

kos25k

Senior Member
Nov 15, 2012
3,094
427
@Mygod Studio thanks finally all is as it should!Btw i use vpn unlimited.But issue is (not this app's related) that when i choose some server,stremio doesn't work.If i choose some torrent server,then facebook doesnt work.If i choose a stream server,then YouTube doesn't work and so on..Can someone that uses this vpn service,tell me what to choose so all my apps works ok without having to change servers all the time?
 

gigilie

Senior Member
Feb 6, 2011
772
1,103
MN
Thank you for this awesome app!

Really appreciate this app it's been the answer to mine and many others hotspot throttling issues with tmobile. I've seen you recommend using ttl master or similar along side this to ensure data is hidden. Since a10 ttl master no longer works for me is there any chance you can add an option for enabling fixed ttl? I was also wondering if it's possible to take an incoming wifi connection (5ghz) and like bridge it with the phones 4g mobile data and force that all thru wlan0 and output it thru a 2ghz hotspot? I'm not sure this makes much sense but I'd love to basically boost my weak wifi connection with my 4g and use it as an original hotspot or wifi repeater. I think fq router kind of used to be able to do it but that apps defunct now
 

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
Really appreciate this app it's been the answer to mine and many others hotspot throttling issues with tmobile. I've seen you recommend using ttl master or similar along side this to ensure data is hidden. Since a10 ttl master no longer works for me is there any chance you can add an option for enabling fixed ttl? I was also wondering if it's possible to take an incoming wifi connection (5ghz) and like bridge it with the phones 4g mobile data and force that all thru wlan0 and output it thru a 2ghz hotspot? I'm not sure this makes much sense but I'd love to basically boost my weak wifi connection with my 4g and use it as an original hotspot or wifi repeater. I think fq router kind of used to be able to do it but that apps defunct now

I recommend using a real VPN with this app to ensure your tethering traffic is hidden (works against T-Mobile). TTL Master or alternatives are only if you absolutely do not want to use any VPN.
A collection of lightweight "VPN apps" (apps that actually do not forward traffic elsewhere, like some ad blockers) that you can use to hide tethering: https://github.com/Mygod/VPNHotspot/issues/139
If you use this app with any of the apps mentioned above, no TTL tweaking is needed.

Repeater with 5GHz upstream and 2GHz downstream probably depends on your device's capabilities. You can try tweaking configurations to see if it works.
 

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
Hello admin,i cant share my vpn with hola premium this application but i can do that from http injector ...why is that?

It looks like this app is doing some filtering by uid. A possible solution might be to set up a proxy server with hotspot/repeater, and set up a second repeater to use the proxy server as a VPN (or just use the proxy server directly as in http injector). I could get around this in the app but I don't care enough about this hola.
 

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
From the author of the change:
Erik Kline: One of the main motivators for this change was the case of tethering toward an upstream with the same IPv4 range. With devices that support multiple WiFi interfaces, which scenario turns out be easier to encounter. This makes that (admittedly somewhat wacky) scenario work, probabilistically.

It affects me in two ways.
1. I have to find out the ip of my phone every time i use the hotspot and change the ip in the client programs to connect to the phone e.g. ssh/ftp into it.
2. Volkswagen has ****ed up their implementation of the dhcp response handling in most of "discover media" car radios by hardcoding the 192.168.43.1 as the gateway and ignoring the ip in the dhcp response. So VW car radios will not get internet when connected to Android9 hotspots. It has been a year and they still have not fixed it.

Originally i was looking for a way to fix those two problems and was hoping for a simple in app solution ;).
I have now fixed it for me with a tasker script that adds the 192.168.43.1 ip as a second ip to the hotspot interface.

Looks like Android 11 will support this: https://android-review.googlesource.com/c/platform/frameworks/base/+/1213013

The app will be updated correspondingly to support this feature. :)

EDIT: Looks like the API was blacklisted. Will probably not support this for now.
 
Last edited:
  • Like
Reactions: jacomail95

jir591

Senior Member
Sep 4, 2010
207
28
I read all of the comments but a bit confused. I'm using this app to on a tmobile network using a usb tether (not wifi hotspot) . I have a data plan but I'm trying to avoid the carrier's data limiting / throttling .

So I am following these steps:

1) turn on my phone's VPN service. (i use PIA)

2) Start up VPN Hotspot app.

3) Connect usb tether cable to phone.

4) turn on USB tethering in this app.

5) then in the app I see rndis0 which is the device I'm connect to. I tun that on.

That's it. Did I miss anything?
 

Mygod Studio

Senior Member
Apr 30, 2013
342
129
Suzhou
mygod.be
From the author of the change:
Erik Kline: One of the main motivators for this change was the case of tethering toward an upstream with the same IPv4 range. With devices that support multiple WiFi interfaces, which scenario turns out be easier to encounter. This makes that (admittedly somewhat wacky) scenario work, probabilistically.

It affects me in two ways.
1. I have to find out the ip of my phone every time i use the hotspot and change the ip in the client programs to connect to the phone e.g. ssh/ftp into it.
2. Volkswagen has ****ed up their implementation of the dhcp response handling in most of "discover media" car radios by hardcoding the 192.168.43.1 as the gateway and ignoring the ip in the dhcp response. So VW car radios will not get internet when connected to Android9 hotspots. It has been a year and they still have not fixed it.

Originally i was looking for a way to fix those two problems and was hoping for a simple in app solution ;).
I have now fixed it for me with a tasker script that adds the 192.168.43.1 ip as a second ip to the hotspot interface.

You will then be disappointed to learn that Android 11 will now randomly pick a /24 subnet for you too.
 

Top Liked Posts

Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone