Comments (12)
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.
Related Issues (20)
- Not working on OOS 13
- [Feature] rndis0 auto turn on setting is missing HOT 1
- Options to only block upload or download individually HOT 1
- Unable to uninstall HOT 1
- 使用su权限修改了wifi中继密码和名称后中继打不开,手机显示wifi直连不可用 HOT 1
- USB tethering and transfer files
- Failed to launch root daemon HOT 32
- Rewrite iproute2 invocations with netlink socket
- Crash HOT 1
- Request to add 2 direct sub-activities HOT 2
- Mac address modification HOT 1
- can't active hotspot with vpn
- Automatically enable vpn hotspot for system hotspot via in-app control or quick settings tile HOT 2
- "system/bin/ip rule add iif" bug HOT 18
- [Feature] Transparent proxy support HOT 2
- Mac address HOT 3
- Added traffic rule settings for VPN with separate APK HOT 1
- Temporary Wifi Hotspot, No save options
- emui9.1 uses VPN hotspot, ipv4 and ipv6 dns addresses change randomly every time HOT 1
- [Feature][Help wanted] Killswitch on internet connection HOT 1
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.