Tobias Brunner
a39a301a12
Don't set the source address on Android
2012-08-13 11:11:37 +02:00
Tobias Brunner
644db4d7c5
Close IKE_SA on Android immediately if setting up CHILD_SA fails
2012-08-13 11:11:20 +02:00
Tobias Brunner
76e55491eb
Reduce number of retransmits on Android
2012-08-13 11:09:34 +02:00
Tobias Brunner
2483f6a4e0
Job added which handles plain text packets read from TUN device
2012-08-13 11:09:34 +02:00
Tobias Brunner
d9531100fa
Added a handler that writes inbound plain text packets to the TUN device
2012-08-13 11:09:34 +02:00
Tobias Brunner
3b3cf0c87a
Add simple callbacks to receive/send ESP packets via libipsec/receiver.
2012-08-13 11:09:34 +02:00
Tobias Brunner
30ba2ff777
Add routes based on the installed IPsec policies to the TUN device builder
2012-08-13 11:09:34 +02:00
Tobias Brunner
62e6630b24
Add virtual IP to the TUN device builder
...
After the CHILD_SA is established we can easily get this address from
the IKE_SA.
2012-08-13 11:09:34 +02:00
Tobias Brunner
a2993d7243
Create a TUN device via VpnService.Builder once the CHILD_SA is established
2012-08-13 11:09:34 +02:00
Tobias Brunner
3a05756b42
An Android specific attribute handler installs DNS servers via Builder
2012-08-13 11:09:33 +02:00
Tobias Brunner
ae4f1ea180
Native counterpart of VpnService.Builder added, exposed by charonservice
2012-08-13 11:09:33 +02:00
Tobias Brunner
c6c39c783b
Initiate an SA via native JNI method
2012-08-13 11:00:28 +02:00
Tobias Brunner
66211196a7
android_service_t handles initiation of an SA and tracks its progress
...
Status updates are delivered via charonservice (JNI).
2012-08-13 11:00:28 +02:00
Tobias Brunner
3aa5c609c3
Android specific credential set also provides user credentials
2012-08-13 11:00:28 +02:00
Tobias Brunner
8430e54d83
Added an Android specific credential set that provides CA certificates via JNI
2012-08-13 11:00:28 +02:00
Tobias Brunner
2bec193a1b
CharonVpnService provides a function to get trusted certificates via JNI
2012-08-13 11:00:28 +02:00
Tobias Brunner
8c2af60ceb
Function added that allows to update VPN state via JNI
2012-08-13 11:00:28 +02:00
Tobias Brunner
d4f7675199
Implement kernel_ipsec_t.bypass_socket() via JNI and VpnService.protect()
2012-08-13 11:00:27 +02:00
Tobias Brunner
175088517f
Add an Android specific kernel_ipsec_t implementation
...
This is pretty much a proxy class that delegates everything (that is
currently supported) to libipsec.
2012-08-13 11:00:27 +02:00
Tobias Brunner
24447cf49f
Add an Android specific kernel_net_t implementation
...
This currently provides only no-ops and is just added because a
kernel-net implementation is required and kernel-netlink can't be used
at the moment.
2012-08-13 11:00:27 +02:00
Tobias Brunner
529c8c88a3
Keep a global reference to the CharonVpnService object in charonservice
2012-08-13 11:00:26 +02:00
Tobias Brunner
a304874319
Add signal handler for fatal signals to libandroidbridge
2012-08-13 11:00:26 +02:00
Tobias Brunner
d200749424
Set default log level in libandroidbridge
2012-08-13 11:00:25 +02:00
Tobias Brunner
19567a5e3a
Helper function added to handle Java exceptions in native code
2012-08-13 11:00:25 +02:00
Tobias Brunner
95e9a12c28
Don't attach to actual Java threads (or already attached ones)
...
We check this by trying to retrieve a JNIEnv object from the JVM,
if one is returned the current thread is not native (created from Java)
or the thread is already attached.
2012-08-13 11:00:25 +02:00
Tobias Brunner
8bf3027643
Moved CharonVpnService to logic sub-package
2012-08-08 15:41:04 +02:00
Tobias Brunner
6f11e94134
Global charonservice_t object added to libandroidbridge
...
This is later used to call Java methods on CharonVpnService via JNI.
2012-08-08 15:41:04 +02:00
Tobias Brunner
f83f65be08
Added functions to attach/detach native threads to the JVM
...
Even though native threads are automatically detached from the JVM with
help of a thread-local destructor it is recommended to detach as soon as
possible as local JNI references are not freed until a thread detaches.
2012-08-08 15:41:04 +02:00
Tobias Brunner
cb887af4cf
Moved JNI helper macros to a separate file
...
Also initialize a reference to the CharonVpnService class during
JNI_OnLoad, which allows us later to call methods from C to Java.
2012-08-08 15:41:03 +02:00
Tobias Brunner
95dacbbc70
Allocate UDP ports randomly in Android NDK build.
2012-08-08 15:30:28 +02:00
Tobias Brunner
06ed785e5a
Load libipsec in Android app.
2012-08-08 15:12:24 +02:00
Tobias Brunner
4a20814300
Added android.net.VpnService wrapper around charon (loaded via JNI).
2012-08-08 15:09:31 +02:00
Tobias Brunner
2f203aee0e
Android.mk for NDK build added.
2012-08-08 15:09:30 +02:00