Comments (14)
it will be a very lentgthy addition to enable tasker integration.
if you want to add with short code, just add some a Broadcastreceiver to receive intent... and trigget hr e action in the source code... Now from the Tasker send the Intent directly.
if you make a tasker plugin... you need to read whole documentation of tasker plugin making.
If i have free time i might add this tasker facility
from vpnhotspot.
I recently noticed that VPN Hotspot was able to toggle Bluetooth Tethering off and on without being systemized on android 13.
This interested me greatly, since all the other tools I used to use to toggle BT Tethering off and on refused to work on Android 13, even when systemized.
I've never done Android development before, but I sat down with Android Studio and copy & pasted the Tile Handler into a Broadcast Handler which can receive intents from MacroDroid or Tasker.
Here is what the changes look like if anyone wants to build a copy for themselves (or add more intents to support more automation):
Swap-File@a4024d2
I'm not sure if there is a limit to how many intents you can add to the manifest, but two work fine for me.
Here's what the intent looks like inside of Macrodroid:
from vpnhotspot.
A more compelling reason to support this would be for instant tethering. This could be done by checking wifiApConfiguration.SSID
and see if it matches ^Instant Tethering
.
Unfortunately, listening for ACTION_TETHER_STATE_CHANGED
in manifest is not quite possible since Android 8, therefore a persistent foreground service would be needed. MacroDroid only supports listening for hotspot changes, and none at all for Tasker.
EDIT: I created a thread on their forum. Go spam them until they add this.
from vpnhotspot.
Bump on implementing intent interface. I can not find an app as reliable in turning on & off tethering - just by itself, w/o VPN involvement. I'd love to use it with Llama to automate getting into the car and having tethering for my car radio / off when out. (On a side note... gets me thinking AppleScript for Android should be a thing with object & class interface definition part of every app.)
from vpnhotspot.
Hi there,
I was really interested in this thread, as my goal was to automate bringing up a wireguard vpn interface and programmatically starting the hotspot via tasker. To do this, I needed to both add the broadcastreceiver to receive the intent to start tethering, as described above, and also have the program automatically monitor all new interfaces that were added. I made these modifications and published them in a modified source code here:
https://github.com/hansonxyz/vpnhotspotmod
The key extra changes to the code Swap-File added was changing the TetheringService from START_NOT_STICKY to START_STICKY, and adding the following code around line 565 on TetheringManager.kt:
method.matches1<java.util.List<*>>("onTetheredInterfacesChanged") -> {
@Suppress("UNCHECKED_CAST")
val tetheredInterfaces = args!![0] as List<String?>
callback?.onTetheredInterfacesChanged(tetheredInterfaces)
// hansonxyz
tetheredInterfaces?.let {
for (iface in it) {
App.app.startForegroundService(
Intent(App.app, TetheringService::class.java)
.putExtra(
TetheringService.EXTRA_ADD_INTERFACES,
arrayOf(iface)
)
)
}
}
}
from vpnhotspot.
I'm still in the same boat. When I turn my car on, my hotspot is started and to get vpn/hotspot working I have to open the app and hit the wlan switch to route the hotspot through my vpn. I was thinking about trying to automate this process with tasker by opening vpn hotspot after tasker turns the hotspot on and then have tasker use the cli to initiate a screen press over the wlan switch to turn it on. It seems like this might be worth a try since my scenario should be fairly predictable because the only thing I use the phone for is the hotspot connection. I haven't looked at macro droid yet, but I'll have to check it out
from vpnhotspot.
Meanwhile, I think a good workaround would be a monitoring mode for system VPN tethering. I will implement it in 2.3.0.
from vpnhotspot.
Why not use the tasker plugin system?
https://tasker.joaoapps.com/plugins-intro.html
Awesome app btw!
-DM
from vpnhotspot.
Has anyone figured out a good way to automatically toggle the rndis0 tunnel? I'm using a phone to act as a usb modem for a router. I've managed to automate turning on the usb hotspot and VPN. The missing piece would be to automatically turn on rndis0 whenever usb tethering is reset.
from vpnhotspot.
+1 for Tasker integration. I also think making the app compatible with the AutoInput accessibility service would be another good place to start. It should be simpler than writing a new plugin. AutoInput currently can not interact with the VPN Hotspot UI, but if it could, manually toggling the switches as @sea3pea0 and @sollermun describe wouldn't be an issue.
from vpnhotspot.
I recently noticed that VPN Hotspot was able to toggle Bluetooth Tethering off and on without being systemized on android 13.
This interested me greatly, since all the other tools I used to use to toggle BT Tethering off and on refused to work on Android 13, even when systemized.
I've never done Android development before, but I sat down with Android Studio and copy & pasted the Tile Handler into a Broadcast Handler which can receive intents from MacroDroid or Tasker.
Here is what the changes look like if anyone wants to build a copy for themselves (or add more intents to support more automation): Swap-File@a4024d2
I'm not sure if there is a limit to how many intents you can add to the manifest, but two work fine for me.
Here's what the intent looks like inside of Macrodroid: ...
Hello! Thanks so much for this information. With your (and an LLM's help) I was able to build and test this in a couple of hours, and it works great. And obviously thanks to the original app developer/s too! :-D
from vpnhotspot.
Hi there,
I was really interested in this thread, as my goal was to automate bringing up a wireguard vpn interface and programmatically starting the hotspot via tasker. To do this, I needed to both add the broadcastreceiver to receive the intent to start tethering, as described above, and also have the program automatically monitor all new interfaces that were added. I made these modifications and published them in a modified source code here:
https://github.com/hansonxyz/vpnhotspotmod
The key extra changes to the code Swap-File added was changing the TetheringService from START_NOT_STICKY to START_STICKY, and adding the following code around line 565 on TetheringManager.kt:
method.matches1<java.util.List<*>>("onTetheredInterfacesChanged") -> { @Suppress("UNCHECKED_CAST") val tetheredInterfaces = args!![0] as List<String?> callback?.onTetheredInterfacesChanged(tetheredInterfaces) // hansonxyz tetheredInterfaces?.let { for (iface in it) { App.app.startForegroundService( Intent(App.app, TetheringService::class.java) .putExtra( TetheringService.EXTRA_ADD_INTERFACES, arrayOf(iface) ) ) } } }
for adb shell am ? can you hel me for the command line ? thanks before
from vpnhotspot.
@Mygod Hello, I wanted to ask you a question, since I am trying to compile the application. I already managed to get the vpn and hotspot to start automatically, but I want it to be activated automatically when I start the wlan0 application. Can you help me, I don't know very well what files to modify.
from vpnhotspot.
Fixed via #591.
from vpnhotspot.
Related Issues (20)
- vpn hotspot cannot use HOT 11
- Failed to launch root deamen and wifi repeater doesn't work correctly HOT 1
- The app needs location but doesn't prompt for it.
- Which port is used when connecting Temporary Wi-Fi hotspot? HOT 1
- System/bin/ip help HOT 2
- Potential issue with usb tethering shutting down
- Need install guide for Magisk HOT 1
- Restart after reboot HOT 1
- Join the auto-open system Ethernet sharing HOT 2
- [Help] VPNHotspot + Box for Magisk HOT 3
- Dual Band hotspot issues HOT 1
- Ndc network protect allow 10119 exited with 127
- [Feature]Keep app alive HOT 5
- [Feature] RNDIS Reverse sharing network HOT 1
- ADD defult password option for repeater HOT 1
- jdbc cant connect MySQL server via vpnhotspot
- How did this app detected my driver country code? HOT 1
- Support displaying additional soft AP information from Android 15 new APIs
- [Feature] Timer and Limit HOT 1
- Modify the tethered client blocking feature to a VPN user blocking feature, ensuring that blocked clients are unable to establish a VPN connection while still maintaining access to hotspot data HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpnhotspot.