Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up cmd not supported #93

Closed
GoogleCodeExporter opened this issue Mar 19, 2015 · 9 comments
Closed

up cmd not supported #93

GoogleCodeExporter opened this issue Mar 19, 2015 · 9 comments
Labels

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. In the Custom Options menu, add the command: up 'echo up'
2.
3.

What is the expected output? What do you see instead?
The VPN connection is not set up.
In the OpenVPN Log, I see:
Assertion failed at openvpn//src/openvpn/misc.c:116

What mobile phone are you using?
Nexus S

Which Android Version and stock ROM or aftermarket like cyanogenmod?
Android 4.1.1

Please provide any additional information below.
If I add the 'up' in a config, it is not loaded.

Original issue reported on code.google.com by [email protected] on 24 Sep 2012 at 3:46

@GoogleCodeExporter
Copy link
Author

Problem is that open_tun that does not set the actual device name.  Calling the 
script needs the actual device name as parameter. 

Setting the actual real device name is rather compliacted I think I will 
something like "android-tun" instead of tun0/tun1.

Original comment by [email protected] on 25 Sep 2012 at 2:52

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 5707247c7a95.

Original comment by [email protected] on 25 Sep 2012 at 4:32

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

A build with the change included can be found here: 
http:https://plai.de/android/icsopenvpn0523pre2.apk

Original comment by [email protected] on 25 Sep 2012 at 4:33

@GoogleCodeExporter
Copy link
Author

Thanks for the apk.
Now I have got a new problem:
MNGT:Got unrecognized command>FATAL:
WARNING:Failed running command (--up/--down): could not execute external program

My up command is: up 'echo up'

Original comment by [email protected] on 26 Sep 2012 at 7:54

@GoogleCodeExporter
Copy link
Author

Yes. OpenVPN is right. You probably don't have an echo program on your 
telephone. :)

Original comment by [email protected] on 26 Sep 2012 at 8:12

@GoogleCodeExporter
Copy link
Author

That's right.

I would like to launch an application when the VPN is up.

I've written a script that calls the 'am' command to start my application.
If I execute 'sh /sdcard/vpn.sh' from adb shell, it starts my application as 
expected.
But if I insert the command: up /sdcard/vpn.sh in the openvpn config, I've got 
the previous error.

How could I sort out this problem ?
Thanks.

Original comment by [email protected] on 26 Sep 2012 at 8:56

@GoogleCodeExporter
Copy link
Author

have you tried providing the full to sh?

Original comment by [email protected] on 26 Sep 2012 at 9:02

@GoogleCodeExporter
Copy link
Author

Should have read full path.

Original comment by [email protected] on 26 Sep 2012 at 9:04

@GoogleCodeExporter
Copy link
Author

Latest news:

Now, I'm able to execute a script file.
To achieve that, I've added the following line in the config file:
   up "/system/bin/sh /sdcard/vpn.sh"

Hereafter is a copy of vpn.sh (3 lines)
#!/system/bin/mksh
export PATH=$PATH:/system/bin
am start -a android.intent.action.MAIN -n 
com.csipsimple/com.csipsimple.ui.SipHome


But my application is not started. It seems that openvpn has not the right to 
launch another application.


Original comment by [email protected] on 26 Sep 2012 at 10:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant