{"id":2958,"date":"2024-10-23T11:00:20","date_gmt":"2024-10-23T11:00:20","guid":{"rendered":"https:\/\/liljenfeldt.ch\/?p=2958"},"modified":"2024-10-23T11:00:22","modified_gmt":"2024-10-23T11:00:22","slug":"vpn-on-the-go","status":"publish","type":"post","link":"https:\/\/webbservern.se\/~jonas\/wordpress\/?p=2958","title":{"rendered":"VPN on the go"},"content":{"rendered":"\n<p>I have until recently been connecting manually to the &#8220;home VPN&#8221; on the mobile when not being connected to the home network. I knew it should be possible to automate with Tasker and it turned out to be very easy.<\/p>\n\n\n\n<p>To start with, yes I am still using OpenVPN. I have too many things automated using OpenVPN to jump ship for Wireguard as long as OpenVPN is a decent option doing what it is supposed to do.<\/p>\n\n\n\n<p>Next thing, which Android client to use. I would say <a href=\"https:\/\/github.com\/schwabe\/ics-openvpn\" title=\"\">Arne Schwabe&#8217;s open source client<\/a> is a good choice.<\/p>\n\n\n\n<p>Then in Tasker you set up two new profiles, one for when you are connected to your home WiFi and one for when you are not. For the not-at-home profile you add a task &#8220;Connect VPN&#8221;, with a Task of type &#8220;Send Intent&#8221;:<\/p>\n\n\n\n<p><code>Action: android.intent.action.MAIN<br>Extra: de.blinkt.openvpn.api.profileName:&lt;your-vpn-profile-from-the-openvpn-client><br>Package: de.blinkt.openvpn<br>Class: de.blinkt.openvpn.api.ConnectVPN<br>Target: Activity<\/code><\/p>\n\n\n\n<p>For the at-home profile you add a task &#8220;Disconnect VPN&#8221;, with a Task of type &#8220;Send Intent&#8221;:<\/p>\n\n\n\n<p><code>Action: android.intent.action.MAIN<br>Extra: de.blinkt.openvpn.api.profileName:&lt;your-vpn-profile-from-the-openvpn-client><br>Package: de.blinkt.openvpn<br>Class: de.blinkt.openvpn.api.DisconnectVPN<br>Target: Activity<\/code><\/p>\n\n\n\n<p>Easy peasy, try it out with connecting and disconnecting from the home WiFi.<\/p>\n\n\n\n<p>I can not say I use Tasker for a lot but for creating a hotspot automatically in the car (based on the bluetooth conenction to the navigator) and at my workplace (based on the geographical position), I find it very useful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have until recently been connecting manually to the &#8220;home VPN&#8221; on the mobile when not being connected to the home network. I knew it should be possible to automate with Tasker and it turned out to be very easy. &hellip; <a href=\"https:\/\/webbservern.se\/~jonas\/wordpress\/?p=2958\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,11,16],"tags":[56,753,429,832],"class_list":["post-2958","post","type-post","status-publish","format-standard","hentry","category-datorer","category-datorsakerhet","category-hardvara","category-linux","tag-android","tag-home-automation","tag-openvpn","tag-tasker"],"_links":{"self":[{"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2958"}],"version-history":[{"count":1,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2958\/revisions"}],"predecessor-version":[{"id":2959,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/2958\/revisions\/2959"}],"wp:attachment":[{"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webbservern.se\/~jonas\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}