Mygod / VPNHotspot

Share your VPN connection over hotspot or repeater! (root required)
Apache License 2.0
3.81k stars 373 forks source link

[Feature] Use alternative configuration for system Wi-Fi hotspot (Android 11+) #167

Open Mygod opened 4 years ago

erotundo commented 1 year ago

Hi, i'm watching your project but i have a question, the implementation to enable the tethering it's based on Android 10? Because in Android 12 they are using TetheringManager and startTether with other stuff but i dunno if this app it's compatible with Android 12

Thanks!

ConcurrentCrab commented 1 year ago

@Mygod I would like to pursue this feature. Do you have any pointers of where I could start investigating? If you think it's possible at all.

I expect it will probably involve reflection, the same way turning the system AP on does.

erotundo commented 1 year ago

You have a option doing reflection to enable the hotspot I did it using that way in Java

On Sat, Dec 2, 2023, 6:20 PM Ishan Bhargava @.***> wrote:

@Mygod https://github.com/Mygod I would like to pursue this feature. Do you have any pointers of where I could start investigating? If possible at all.

I expect it will probably involve reflection, the same way turning the system AP on does.

— Reply to this email directly, view it on GitHub https://github.com/Mygod/VPNHotspot/issues/167#issuecomment-1837207332, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA46MC7Y2VBAK6U2LLODD3YHNPMHAVCNFSM4OPFW2HKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTG4ZDANZTGMZA . You are receiving this because you commented.Message ID: @.***>

ConcurrentCrab commented 1 year ago

You have a option doing reflection to enable the hotspot I did it using that way in Java

@erotundo I know you can toggle the hotspot on/off using reflection, that's the way this app accomplishes it. My query is about the topic of this issue, that is, starting it with a custom configuration, like a different SSID and password.

I also know that supplying that configuration is possible if you're using the newer android local-only hotspot APIs, but unfortunately, they are not tethered to the internet connection of your device and only meant for local communication.

erotundo commented 1 year ago

Android block that possible to share Internet connection from 10 , the only way you have it's setup the hotspot manually and turn it on by reflection

On Sat, Dec 2, 2023, 7:27 PM Ishan Bhargava @.***> wrote:

You have a option doing reflection to enable the hotspot I did it using that way in Java

@erotundo https://github.com/erotundo I know you can toggle the hotspot on/off using reflection, that's the way this app accomplishes it. My query is about the topic of this issue, that is, starting it with a custom configuration, like a different SSID and password.

I also know that supplying that configuration is possible if you're using the newer android local-only hotspot APIs, but unfortunately, they are not tethered to the internet connection of your device and only meant for local communication.

— Reply to this email directly, view it on GitHub https://github.com/Mygod/VPNHotspot/issues/167#issuecomment-1837222597, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA46MHXWCZWJSUUDH47J23YHNXJBAVCNFSM4OPFW2HKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBTG4ZDEMRVHE3Q . You are receiving this because you were mentioned.Message ID: @.***>

Mygod commented 1 year ago

As mentioned in #159, the way to do it is to invoke the system API Landroid/net/wifi/WifiManager;->startTetheredHotspot(Landroid/net/wifi/SoftApConfiguration;)Z,system-api,whitelist via reflection.