[strongSwan] automating Strongswan for Android with Tasker

David H. Durgee dhdurgee at verizon.net
Fri Feb 7 17:34:57 CET 2020


Tobias Brunner wrote:
> Hi David,
>
>> Neither of the above does anything when I run them.  If you see an error
>> in the above please let me know.
> arg0 and arg4 seem to be OK, but not sure about arg7.  Maybe the package
> name should actually be in arg6.  But it's difficult to say because I've
> not found any documentation of that format.
>
> Regards,
> Tobias
>
I looked a bit further and found another way to export the tasks:

    Enter_VPN (2)
        A1: Send Intent [
Action:org.strongswan.android.action.START_PROFILE Cat:Browsable Mime
Type: Data: Extra:org.strongswan.android.VPN_PROFILE_ID :
8d582063-fb0d-4234-aa1b-23d961583dd8 Extra: Extra:
Package:org.strongswan.android Class: Target:Broadcast Receiver ]

I think that can be reformatted a bit as:

Enter_VPN (2)
        A1: Send Intent [
                                   
Action:org.strongswan.android.action.START_PROFILE
                                    Cat:Browsable
                                    Mime Type:
                                    Data:
                                   
Extra:org.strongswan.android.VPN_PROFILE_ID :
8d582063-fb0d-4234-aa1b-23d961583dd8
                                    Extra:
                                    Extra:
                                    Package:org.strongswan.android
                                    Class:
                                    Target:Broadcast Receiver
                                  ]

Exit_VPN (3)
        A1: Send Intent [
Action:org.strongswan.android.action.DISCONNECT Cat:None Mime Type:
Data: Extra:org.strongswan.android.VPN_PROFILE_ID :
8d582063-fb0d-4234-aa1b-23d961583dd8 Extra: Extra:
Package:org.strongswan.android Class: Target:Broadcast Receiver ]

Once again reformatting as:

Exit_VPN (3)
        A1: Send Intent [
                                   
Action:org.strongswan.android.action.DISCONNECT
                                    Cat:None
                                    Mime Type:
                                    Data:
                                   
Extra:org.strongswan.android.VPN_PROFILE_ID :
8d582063-fb0d-4234-aa1b-23d961583dd8
                                    Extra:
                                    Extra:
                                    Package:org.strongswan.android
                                    Class:
                                    Target:Broadcast Receiver
                                 ]

If I understand this correctly this appears to match the directions in
the Wiki, so I am puzzled why these don't work.

If nobody here sees why this isn't working I guess I will have to try
contacting tasker support.

Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4056 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.strongswan.org/pipermail/users/attachments/20200207/a2659780/attachment.bin>


More information about the Users mailing list