2013-08-22 23:38:44 +02:00
|
|
|
ATTENTION
|
|
|
|
================
|
2017-08-20 21:30:13 +02:00
|
|
|
Before doing anything, please read the first FAQ point in this file, especially if
|
|
|
|
you plan to build commercial software from this client. Also make sure you
|
|
|
|
understand the licenses of the code. OpenVPN for Android is GPL-licensed. You
|
2014-03-06 17:56:42 +01:00
|
|
|
_CANNOT_ build a closed sourced custom UI application without acquiring a different
|
2014-01-03 04:21:15 +01:00
|
|
|
(paid) license for UI code.
|
|
|
|
|
2015-06-24 10:10:54 +02:00
|
|
|
The use of the AIDL API to control OpenVPN for Android from an external app is
|
|
|
|
not subject to the license. The remoteExample project is licensed under the Apache 2.0 license.
|
2014-04-28 17:48:25 +02:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
When in doubt, mail me about it.
|
2012-04-23 00:07:02 +02:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
See the file todo.txt for ideas/not-yet-implemented features (and the bug tracker).
|
2012-04-23 00:07:02 +02:00
|
|
|
|
2015-03-19 15:07:24 +01:00
|
|
|
Build instructions:
|
2012-05-07 13:17:22 +02:00
|
|
|
|
2018-06-13 13:03:53 +02:00
|
|
|
- Install sdk, ndk, cmake (e.g. with Android studio), swig (3.0+), on
|
|
|
|
Windows perl might be needed for mbedtls
|
2012-05-25 13:39:54 +02:00
|
|
|
|
2018-06-13 13:03:53 +02:00
|
|
|
Fetch the git submodules (the default urls for the submodules work as
|
|
|
|
long as the main repo url is on github):
|
2015-04-22 10:50:30 +02:00
|
|
|
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
|
2019-11-25 16:30:04 +01:00
|
|
|
Build the project using "gradle build" (Or use Android Studio). Ensure that
|
|
|
|
the swig executable is the path, otherwise the build will fail.
|
2018-01-03 09:31:45 +01:00
|
|
|
|
|
|
|
Android studio tends to the whole build of binaries in its sync gradle
|
|
|
|
phase to 15 minutes for initial gradle sync are completely normal.
|
|
|
|
|
2019-11-25 16:30:04 +01:00
|
|
|
To have a version with UI be sure to select the UI variant in Android studio under
|
|
|
|
build variants.
|
|
|
|
|
|
|
|
The native build should work with Windows and Linux but is rarely tested
|
|
|
|
since my main development platform is macOS.
|
2015-02-17 11:27:37 +01:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
|
2013-02-11 16:32:07 +01:00
|
|
|
FAQ
|
|
|
|
|
2018-01-26 18:47:34 +01:00
|
|
|
Q: Why are you not answering my questions about modifying
|
|
|
|
ics-openvpn/why do not help build my app on top of ics-openvpn? I
|
|
|
|
thought this is open source.
|
2013-06-11 12:59:29 +02:00
|
|
|
|
2018-01-26 18:47:34 +01:00
|
|
|
A: There are many people building/wanting to build commercial VPN
|
|
|
|
clients on top of my of my client. These client often do not even
|
2017-08-20 21:30:13 +02:00
|
|
|
honour the license of my app or the license of OpenVPN. Even if
|
|
|
|
these modified software do honour the license, I don't like doing
|
|
|
|
unpaid work/giving advice for free to commercial software
|
|
|
|
developers.
|
2013-06-11 12:59:29 +02:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
If you have a legitimate non-commercial open source project, I will
|
|
|
|
gladly help you, but please understand my initial reservations.
|
2013-06-11 12:59:29 +02:00
|
|
|
|
2013-02-11 16:36:20 +01:00
|
|
|
Q: How is the OpenVPN version different from normal OpenVPN
|
|
|
|
|
2018-01-26 18:47:34 +01:00
|
|
|
A: OpenVPN for Android uses a OpenVPN master branch + dual stack
|
|
|
|
client patches. A git repository of the OpenVPN source code and
|
|
|
|
changes is under: https://github.com/schwabe/openvpn/
|
2013-02-11 16:36:20 +01:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
Q: What is minivpn?
|
2013-02-11 16:32:07 +01:00
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
A: minivpn is only a executable that links against libopenvpn, which
|
|
|
|
is the normal openvpn built as a library. It is done this way so
|
|
|
|
the Android Play/Store apk will treat the library as a normal
|
|
|
|
library and update it on updates of the application. Also, the
|
|
|
|
application does not need to take care of keeping minivpn up to
|
|
|
|
date because it contains no code. For almost all intents and
|
|
|
|
purposes minivpn + libopenvpn.so is the same as the normal openvpn
|
|
|
|
binary.
|
2012-06-18 23:37:33 +02:00
|
|
|
|
2014-07-21 12:49:15 +02:00
|
|
|
Q: How do I start a VPN by name from an external app?
|
2012-06-18 23:37:33 +02:00
|
|
|
|
2013-02-11 16:36:20 +01:00
|
|
|
A: public class StartOpenVPNActivity extends Activity {
|
2012-06-18 23:37:33 +02:00
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.main);
|
|
|
|
|
2018-03-22 13:51:07 +01:00
|
|
|
final String EXTRA_NAME = "de.blinkt.openvpn.api.profileName";
|
2012-06-18 23:37:33 +02:00
|
|
|
|
|
|
|
Intent shortcutIntent = new Intent(Intent.ACTION_MAIN);
|
2018-03-22 13:51:07 +01:00
|
|
|
shortcutIntent.setClassName("de.blinkt.openvpn", "de.blinkt.openvpn.api.ConnectVPN");
|
2012-06-18 23:37:33 +02:00
|
|
|
shortcutIntent.putExtra(EXTRA_NAME,"upb ssl");
|
|
|
|
startActivity(shortcutIntent);
|
|
|
|
}
|
2012-09-07 23:38:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
or from the shell:
|
|
|
|
|
|
|
|
am start -a android.intent.action.MAIN -n de.blinkt.openvpn/.LaunchVPN -e de.blinkt.openvpn.shortcutProfileName Home
|
|
|
|
|
2017-08-20 21:30:13 +02:00
|
|
|
Q: How can I control the app from an external app?
|
2013-06-11 00:02:17 +02:00
|
|
|
|
2014-07-21 12:49:15 +02:00
|
|
|
A: There is an AIDL interface. See src/de/blinkt/openvpn/api/IOpenVPNAPIService.aidl. See the normal Android documentation how to use AIDL.
|
|
|
|
See also the example project under remoteExample.
|
|
|
|
|