Turning VPNs on/off without hassle
Moderator: Martin
-
- Posts: 6
- Joined: 12 Jan 2018 08:53
Re: Turning VPNs on/off without hassle
Thanks !!
Works great !
Works great !
Re: Turning VPNs on/off without hassle
Very nice! I am actualy working to automate my PIA VPN via the app. I never thought to do it directly from the Android VPN interface.
I am trying to understand your scripts so I can modify them to automatically connect to a specific VPN. Right now, if I run the flow while my VPN is connected it stil lasks me to select a VPN from the list. So I'm not sure if something is wonky on my phone. I have a Pixel XL, Oreo, Rooted, stock rom.
If you are able to provide any insight or assistance with modifying your flow it would be greatly appreciated.
Thank you
I am trying to understand your scripts so I can modify them to automatically connect to a specific VPN. Right now, if I run the flow while my VPN is connected it stil lasks me to select a VPN from the list. So I'm not sure if something is wonky on my phone. I have a Pixel XL, Oreo, Rooted, stock rom.
If you are able to provide any insight or assistance with modifying your flow it would be greatly appreciated.
Thank you
Re: Turning VPNs on/off without hassle
Hi sitruk, the flow should ask which VPN you want to connect to, well at least that is what I intended.sitruk wrote:Very nice! I am actualy working to automate my PIA VPN via the app. I never thought to do it directly from the Android VPN interface.
I am trying to understand your scripts so I can modify them to automatically connect to a specific VPN. Right now, if I run the flow while my VPN is connected it stil lasks me to select a VPN from the list. So I'm not sure if something is wonky on my phone. I have a Pixel XL, Oreo, Rooted, stock rom.
If you are able to provide any insight or assistance with modifying your flow it would be greatly appreciated.
Thank you
It should recognize by the text "connected" (in case of english) under the respective VPN entry that a connection (not via a 3rd party VPN app) already exists and if that is the case just disconnect the current connection.
If you have multiple VPN entries and always want to connect to a certain VPN entry, you should (in short terms) skip the last condition "VPNs != 1" and adjust the action "connect single VPN" according the id of the VPN entry (starting from top with 0).
A little more detailed:
- Delete the (false) connection between the last two conditions (VPN connected and VPNs != 1)
- Make a (false) connection between VPN connected and connect single VPN
- Open action connect single VPN and adjust the line 1st entry is 0, 2nd entry is 1 and so on...
Code: Select all
click(getElement(vpns,0));
Re: Turning VPNs on/off without hassle
gyst wrote:Hi sitruk, the flow should ask which VPN you want to connect to, well at least that is what I intended.sitruk wrote:Very nice! I am actualy working to automate my PIA VPN via the app. I never thought to do it directly from the Android VPN interface.
I am trying to understand your scripts so I can modify them to automatically connect to a specific VPN. Right now, if I run the flow while my VPN is connected it stil lasks me to select a VPN from the list. So I'm not sure if something is wonky on my phone. I have a Pixel XL, Oreo, Rooted, stock rom.
If you are able to provide any insight or assistance with modifying your flow it would be greatly appreciated.
Thank you
It should recognize by the text "connected" (in case of english) under the respective VPN entry that a connection (not via a 3rd party VPN app) already exists and if that is the case just disconnect the current connection.
If you have multiple VPN entries and always want to connect to a certain VPN entry, you should (in short terms) skip the last condition "VPNs != 1" and adjust the action "connect single VPN" according the id of the VPN entry (starting from top with 0).
A little more detailed:Since I don't have an Android Oreo device, I'm not sure how exactly VPN settings or text elements are handled in Oreo, this could be (if applicable) an explanation that it doesn't work as intended for you.
- Delete the (false) connection between the last two conditions (VPN connected and VPNs != 1)
- Make a (false) connection between VPN connected and connect single VPN
- Open action connect single VPN and adjust the line
1st entry is 0, 2nd entry is 1 and so on...Code: Select all
click(getElement(vpns,0));
Ahh, ok. I see. My VPN is configured in a 3rd party app but it is present in the UI (see screenshot). After making the suggested modifications, the flow appears to open the VPN settings and just hang on the "connect single VPN" action.
- Attachments
-
- Screenshot_20180502-111331.png (66.01 KiB) Viewed 28461 times
Re: Turning VPNs on/off without hassle
The modifications I explained in my previous post only apply for the stock Android VPN configuration.
You have to check if the elements in the script from "connect single VPN" will work out for your use case, because it seems like there are some differences, and it can't break out of one of those (3) while-loops.
Show the overlay control and lookup/compare the elements/IDs with your VPN settings.
You have to check if the elements in the script from "connect single VPN" will work out for your use case, because it seems like there are some differences, and it can't break out of one of those (3) while-loops.
Show the overlay control and lookup/compare the elements/IDs with your VPN settings.
-
- Posts: 6
- Joined: 12 Jan 2018 08:53
Re: Turning VPNs on/off without hassle
Hi.
Now it dont work because of Android 8.0 API26...
Now it dont work because of Android 8.0 API26...
- Attachments
-
- Screenshot_20180613-225221.png (185.42 KiB) Viewed 28169 times
Re: Turning VPNs on/off without hassle
My flow is still working on my Pixel XL with android 8 June update.
I just left the PIA notification visible and interact with that for disconnecting. I have PIA auto connect on launch so all I need to do is start the app to connect.
I just left the PIA notification visible and interact with that for disconnecting. I have PIA auto connect on launch so all I need to do is start the app to connect.
-
- Posts: 6
- Joined: 12 Jan 2018 08:53
Re: Turning VPNs on/off without hassle
sitruk wrote:My flow is still working on my Pixel XL with android 8 June update.
I just left the PIA notification visible and interact with that for disconnecting. I have PIA auto connect on launch so all I need to do is start the app to connect.
But you have to pay for VPN PIA
Re: Turning VPNs on/off without hassle
This is true.morpheus999 wrote:sitruk wrote:My flow is still working on my Pixel XL with android 8 June update.
I just left the PIA notification visible and interact with that for disconnecting. I have PIA auto connect on launch so all I need to do is start the app to connect.
But you have to pay for VPN PIA
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Turning VPNs on/off without hassle
In case of using a good and reliable VPN, the rule of fist sounds pretty much like this:
Never settle for free VPN.
PIA VPN offers a great fully-featured 1-year service for the price of 1 month's worth of mobile phone use (2 years payment even less).
I'm not getting payed to say that I just take security serious and sharing my personal experience.
Note that they offer no dedicated IP address. More anonymous and safer, but no good if you want to make use of a home-server, ip-camera or other IoT.
Never settle for free VPN.
PIA VPN offers a great fully-featured 1-year service for the price of 1 month's worth of mobile phone use (2 years payment even less).
I'm not getting payed to say that I just take security serious and sharing my personal experience.
Note that they offer no dedicated IP address. More anonymous and safer, but no good if you want to make use of a home-server, ip-camera or other IoT.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)