schwabe / ics-openvpn

OpenVPN for Android
3.34k stars 1.2k forks source link

Stuck on permission on ICS Open VPN #465

Closed aneeshATgithub closed 8 years ago

aneeshATgithub commented 8 years ago

While connecting from a remote app to start VPN on ICS Open VPN, "trust this application" dialog is coming , and when we click on OK button with agree "I trust this application", there is no connecting process is going forward and the app is stuck on.The issue will still be there on all HighEnd phones with 4.4.4 and above including NEXUS 5. In the older version of the ICS OpenVPN, Once the agree button is clicked - the vpn connection will start connecting.

schwabe commented 8 years ago

See FAQ and issue #185

aneeshATgithub commented 8 years ago

I can tick and click "OK" button, then the App getting stuck on requesting permission.. Is this caused by some network monitoring app?

schwabe commented 8 years ago

I still cannot reproduce this. What happens if you try it a second time? Does it show the permission dialog again?

aneeshATgithub commented 8 years ago

We are connecting to VPN using a switch, After turn on first time, we can't turn off switch, switch on screen is not responsive as well.

schwabe commented 8 years ago

Are you checking prepareVPNService before trying to connect?

aneeshATgithub commented 8 years ago

Yes, This intent is not null while running first time after rebooting, and other times this prepareVPNService intent is null... and while calling startVpn() getting "USER_VPN_PERMISSION". I am testing on Nexus 5 with 4.4.4 OS

For newStatus() method in iOpenVPNStatusCallback, the state is USER_VPN_PERMISSION

schwabe commented 8 years ago

Fixed by b889ea77baf597d02e4d3fbfb2e54b7f58d89253

nano2007 commented 8 years ago

Thanks for the great app. Here is the issue I am seeing on a Samsung Tab(SM-T231) running Android 4.4.2. This happens only the first time after a reboot.

  1. On calling prepareVPNService, we get a non-null intent.
  2. We call startActivity passing in the intent received in step 1
  3. There is an alert saying "OpenVpn for Android is attempting to create a VPN connection" with a I trust this application checkbox and OK/Cancel buttons. But the alert box is not visible on the screen, but user can only get to it if he/she clicks on the "windows" button and selects OpenVpn for Android.

How can we force this dialog to display in the foreground and if possible to continue connecting to VPN.

The behaviour we had until version 47 was that we could just call startVpn(ovpnFile) (without calling prepareVPNService) and everything used to work. I have gone through the specific change 5e07802 but not able to figure out how to fix our app to behave properly.

schwabe commented 8 years ago

Hm, I am trying to reproduce this on my devices. And at least the remoteExample does not have this behaviour. Also with the current version directly calling startVPN seems work again (quick hack with if(true || requestpermission == null) { in remoteExample).

There is one fix in b889ea77baf597d02e4d3fbfb2e54b7f58d89253 that starting a vpn with permissions did not work.

nano2007 commented 8 years ago

We tried the remote example too and did not see the issue. We are calling prepareVpnService (and subsequent startActivity) from within a service. Could this be causing the strange behavior?

schwabe commented 8 years ago

Yes calling from a service might have a different behaviour. Are you using the new task flag?

nano2007 commented 8 years ago

Here is the code we use to start the activity for the intent returned from prepareVPNService.

 logger.error("startActivityForVPNPermission");
 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 startActivity(intent);

I will try to modify our app to call these from a normal flow and see if that helps too.

aneeshATgithub commented 8 years ago

Hi, I changed all the VPN connecting processes of my app from Service class to Fragment class as in RemoteExample.

And it works fine on Android 4.2.2 Google Nexus 10 virtual device (Genymotion emulator), then the testing on Android 4.4.4 Google Nexus 5 (Genymotion emulator) was a failure.

While testing on Android 4.4.4, On each IOpenVPNStatusCallback status while connecting to VPN is below,

msg.obj: VPN_GENERATE_CONFIG| msg.obj: WAIT|,,,,, msg.obj: AUTH|,,,,, msg.obj: GET_CONFIG|,,,,, msg.obj: ASSIGN_IP|,10.0.0.6,,,, msg.obj: ADD_ROUTES|,,,,, msg.obj: NOPROCESS|No process running.

schwabe commented 8 years ago

IIrc the 4.4 Android emulator's VPNService is broken. I have no idea about the Genymotion one but I would try to see if a normal VPN setup works or if it works on a real device.

aneeshATgithub commented 8 years ago

have it tested on a real device?

schwabe commented 8 years ago

On my real devices it works on a 4.4 emulator it does not work. If it dows not work on a real device I would suggest to look into ics-openvpn's log window why it fails.

aneeshATgithub commented 8 years ago

When i tested with ICSOpenVPN version 0.6.56, I got the following logs. and I could not run with versions 0.6.55, 0.6.57 Android OS version I used : 4.4.4

4:41 PM OpenVPN 2.4-icsopenvpn [git:icsopenvpn-405405df9379394e+] android-14-x86 [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH] [IPv6] built on Jun 16 2016

4:41 PM library versions: OpenSSL 1.0.2h 3 May 2016, LZO 2.09

4:41 PM WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.

4:41 PM TCP/UDP: Preserving recently used remote address: [AF_INET]54.209.116.255:3276

4:41 PM UDP link local: (not bound)

4:41 PM UDP link remote: [AF_INET]54.209.116.255:3276

4:41 PM WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1570', remote='link-mtu 1342'

4:41 PM WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1272'

4:41 PM [Enforcer 1] Peer Connection Initiated with [AF_INET]54.209.116.255:3276

4:41 PM Option 'explicit-exit-notify' in [PUSH-OPTIONS]:6 is ignored by previous blocks

4:41 PM do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0

4:41 PM Failed to open the tun interface

4:41 PM Error: command '979 interface fwmark rule add tun0' failed with '400 979 Failed to add fwmark rule (Success)'

4:41 PM MGMT: Got unrecognized command>FATAL:ERROR: Cannot open TUN

4:41 PM ERROR: Cannot open TUN

4:41 PM Exiting due to fatal error

4:41 PM Process exited with exit value 1

schwabe commented 8 years ago

Sorry that looks like a broken device/emulator without working VPNService. In my experience is there workaround. Try another device.

aneeshATgithub commented 8 years ago

when I tested on 4.4.2 real device, the ICSOpenVPN log is below,

2016-07-07 13:01:28 MANAGEMENT: >STATE:1467876688,CONNECTED,SUCCESS,10.0.0.6,52.91.217.102,3341,, 2016-07-07 13:01:28 Initialization Sequence Completed 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'OPENTUN' ok' 2016-07-07 13:01:28 VpnService routes installed: 10.0.0.0/8, 172.16.0.0/13, 172.24.4.0/22, 172.24.8.0/21, 172.24.16.0/20, 172.24.32.0/19, 172.24.64.0/18, 172.24.128.0/17, 172.25.0.0/16, 172.26.0.0/15, 172.28.0.0/14, 192.168.0.0/16 2016-07-07 13:01:28 Routes excluded: 172.24.1.149/22 2016-07-07 13:01:28 Routes: 10.0.0.0/8, 10.0.0.1/32, 172.16.0.0/12, 192.168.0.0/16 2016-07-07 13:01:28 DNS Server: 192.168.10.20, Domain: null 2016-07-07 13:01:28 Local IPv4: 10.0.0.6/30 IPv6: null MTU: 1272 2016-07-07 13:01:28 Forcing MTU to 1280 instead of 1272 to workaround Android Bug #70916 2016-07-07 13:01:28 Opening tun interface: 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'PERSIST_TUN_ACTION' OPEN_AFTER_CLOSE' 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'DNSSERVER' ok' 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'ROUTE' ok' 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'ROUTE' ok' 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'ROUTE' ok' 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'ROUTE' ok' 2016-07-07 13:01:28 MANAGEMENT: >STATE:1467876688,ADD_ROUTES,,,,,, 2016-07-07 13:01:28 MANAGEMENT: CMD 'needok 'IFCONFIG' ok' 2016-07-07 13:01:28 MANAGEMENT: >STATE:1467876688,ASSIGN_IP,,10.0.0.6,,,, 2016-07-07 13:01:28 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0 2016-07-07 13:01:28 ROUTE_GATEWAY 127.100.103.119/255.0.0.0 IFACE=lo HWADDR=00:00:00:00:00:00 2016-07-07 13:01:28 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified 2016-07-07 13:01:28 OPTIONS IMPORT: route options modified 2016-07-07 13:01:28 OPTIONS IMPORT: --ifconfig/up options modified 2016-07-07 13:01:28 OPTIONS IMPORT: explicit notify parm(s) modified 2016-07-07 13:01:28 OPTIONS IMPORT: timers and/or timeouts modified 2016-07-07 13:01:28 Option 'explicit-exit-notify' in [PUSH-OPTIONS]:6 is ignored by previous blocks 2016-07-07 13:01:28 PUSH: Received control message: 'PUSH_REPLY,inactive 300,route 10.0.0.0 255.0.0.0,route 192.168.0.0 255.255.0.0,route 172.16.0.0 255.240.0.0,dhcp-option DNS 192.168.10.20,explicit-exit-notify 1,route 10.0.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.0.0.6 10.0.0.5' 2016-07-07 13:01:27 SENT CONTROL [Enforcer 1]: 'PUSH_REQUEST' (status=1) 2016-07-07 13:01:27 MANAGEMENT: >STATE:1467876687,GET_CONFIG,,,,,, 2016-07-07 13:01:26 [Enforcer 1] Peer Connection Initiated with [AF_INET]52.91.217.102:3341 2016-07-07 13:01:26 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 DHE-RSA-AES256-GCM-SHA384, 1024 bit RSA 2016-07-07 13:01:26 Data Channel Decrypt: Using 256 bit message hash 'SHA256' for HMAC authentication 2016-07-07 13:01:26 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key 2016-07-07 13:01:26 Data Channel Encrypt: Using 256 bit message hash 'SHA256' for HMAC authentication 2016-07-07 13:01:26 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key 2016-07-07 13:01:25 VERIFY OK: depth=0, CN=Enforcer 1 2016-07-07 13:01:25 VERIFY OK: depth=1, CN=PolicyServer CA, OU=Trust, O=Certes Networks, L=Pittsburgh, ST=Pennsylvania, C=US 2016-07-07 13:01:25 TLS: Initial packet from [AF_INET]52.91.217.102:3341, sid=29cd9784 65f9bfdb 2016-07-07 13:01:25 MANAGEMENT: >STATE:1467876685,AUTH,,,,,, 2016-07-07 13:01:24 MANAGEMENT: >STATE:1467876684,WAIT,,,,,, 2016-07-07 13:01:24 UDP link remote: [AF_INET]52.91.217.102:3341 2016-07-07 13:01:24 UDP link local: (not bound) 2016-07-07 13:01:24 MANAGEMENT: CMD 'needok 'PROTECTFD' ok' 2016-07-07 13:01:24 Socket Buffers: R=[163840->163840] S=[163840->163840] 2016-07-07 13:01:24 TCP/UDP: Preserving recently used remote address: [AF_INET]52.91.217.102:3341 2016-07-07 13:01:24 Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1342,tun-mtu 1272,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA256,keysize 256,key-method 2,tls-server' 2016-07-07 13:01:24 Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1342,tun-mtu 1272,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA256,keysize 256,key-method 2,tls-client' 2016-07-07 13:01:24 Data Channel MTU parms [ L:1342 D:1342 EF:70 EB:359 ET:0 EL:3 ] 2016-07-07 13:01:24 Control Channel MTU parms [ L:1342 D:1212 EF:38 EB:0 ET:0 EL:3 ] 2016-07-07 13:01:24 WARNING: normally if you use --mssfix and/or --fragment, you should also set --tun-mtu 1500 (currently it is 1272) 2016-07-07 13:01:24 LZO compression initializing 2016-07-07 13:01:24 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. 2016-07-07 13:01:24 MANAGEMENT: CMD 'proxy NONE' 2016-07-07 13:01:24 MANAGEMENT: CMD 'state on' 2016-07-07 13:01:24 MANAGEMENT: CMD 'bytecount 2' 2016-07-07 13:01:24 MANAGEMENT: CMD 'hold release' 2016-07-07 13:01:24 MANAGEMENT: Connected to management server at /data/data/de.blinkt.openvpn/cache/mgmtsocket 2016-07-07 13:01:24 library versions: OpenSSL 1.0.2h 3 May 2016, LZO 2.09 2016-07-07 13:01:24 OpenVPN 2.4-icsopenvpn [git:icsopenvpn-8c4d6896cff89e57+] android-14-armeabi-v7a [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH] [IPv6] built on May 5 2016 2016-07-07 13:01:24 auth_user_pass_file = '[UNDEF]' 2016-07-07 13:01:24 pull = ENABLED 2016-07-07 13:01:24 client = ENABLED 2016-07-07 13:01:24 tls_auth_file = '[UNDEF]' 2016-07-07 13:01:24 tls_exit = DISABLED 2016-07-07 13:01:24 push_peer_info = DISABLED 2016-07-07 13:01:24 single_session = DISABLED 2016-07-07 13:01:24 transition_window = 3600 2016-07-07 13:01:24 handshake_window = 60 2016-07-07 13:01:23 renegotiate_seconds = 3600 2016-07-07 13:01:23 renegotiate_packets = 0 2016-07-07 13:01:23 renegotiate_bytes = 0 2016-07-07 13:01:23 tls_timeout = 2 2016-07-07 13:01:23 ssl_flags = 0 2016-07-07 13:01:23 remote_cert_eku = '[UNDEF]' 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 remote_cert_ku[i] = 0 2016-07-07 13:01:23 ns_cert_type = 0 2016-07-07 13:01:23 crl_file = '[UNDEF]' 2016-07-07 13:01:23 verify_x509_name = '[UNDEF]' 2016-07-07 13:01:23 verify_x509_type = 0 2016-07-07 13:01:23 tls_export_cert = '[UNDEF]' 2016-07-07 13:01:23 tls_verify = '[UNDEF]' 2016-07-07 13:01:23 cipher_list = '[UNDEF]' 2016-07-07 13:01:23 pkcs12_file = '[UNDEF]' 2016-07-07 13:01:23 priv_key_file = '[[INLINE]]' 2016-07-07 13:01:23 extra_certs_file = '[UNDEF]' 2016-07-07 13:01:23 cert_file = '[[INLINE]]' 2016-07-07 13:01:23 dh_file = '[UNDEF]' 2016-07-07 13:01:23 ca_path = '[UNDEF]' 2016-07-07 13:01:23 ca_file = '[[INLINE]]' 2016-07-07 13:01:23 key_method = 2 2016-07-07 13:01:23 tls_client = ENABLED 2016-07-07 13:01:23 tls_server = DISABLED 2016-07-07 13:01:23 test_crypto = DISABLED 2016-07-07 13:01:23 use_iv = ENABLED 2016-07-07 13:01:23 packet_id_file = '[UNDEF]' 2016-07-07 13:01:23 replay_time = 15 2016-07-07 13:01:23 replay_window = 64 2016-07-07 13:01:23 mute_replay_warnings = DISABLED 2016-07-07 13:01:23 replay = ENABLED 2016-07-07 13:01:23 engine = DISABLED 2016-07-07 13:01:23 keysize = 0 2016-07-07 13:01:23 prng_nonce_secret_len = 16 2016-07-07 13:01:23 prng_hash = 'SHA1' 2016-07-07 13:01:23 authname = 'SHA256' 2016-07-07 13:01:23 authname_defined = ENABLED 2016-07-07 13:01:23 ciphername = 'AES-256-CBC' 2016-07-07 13:01:23 ciphername_defined = ENABLED 2016-07-07 13:01:23 key_direction = 0 2016-07-07 13:01:23 shared_secret_file = '[UNDEF]' 2016-07-07 13:01:23 management_flags = 4390 2016-07-07 13:01:23 management_client_group = '[UNDEF]' 2016-07-07 13:01:23 management_client_user = '[UNDEF]' 2016-07-07 13:01:23 management_write_peer_info_file = '[UNDEF]' 2016-07-07 13:01:23 management_echo_buffer_size = 100 2016-07-07 13:01:23 management_log_history_cache = 250 2016-07-07 13:01:23 management_user_pass = '[UNDEF]' 2016-07-07 13:01:23 management_port = 'unix' 2016-07-07 13:01:23 management_addr = '/data/data/de.blinkt.openvpn/cache/mgmtsocket' 2016-07-07 13:01:23 allow_pull_fqdn = DISABLED 2016-07-07 13:01:23 route_gateway_via_dhcp = DISABLED 2016-07-07 13:01:23 route_nopull = DISABLED 2016-07-07 13:01:23 route_delay_defined = DISABLED 2016-07-07 13:01:23 route_delay_window = 30 2016-07-07 13:01:23 route_delay = 0 2016-07-07 13:01:23 route_noexec = DISABLED 2016-07-07 13:01:23 route_default_metric = 0 2016-07-07 13:01:23 route_default_gateway = '[UNDEF]' 2016-07-07 13:01:23 route_script = '[UNDEF]' 2016-07-07 13:01:23 comp.flags = 1 2016-07-07 13:01:23 comp.alg = 2 2016-07-07 13:01:23 fast_io = DISABLED 2016-07-07 13:01:23 sockflags = 0 2016-07-07 13:01:23 sndbuf = 0 2016-07-07 13:01:23 rcvbuf = 0 2016-07-07 13:01:23 occ = ENABLED 2016-07-07 13:01:23 status_file_update_freq = 60 2016-07-07 13:01:23 status_file_version = 1 2016-07-07 13:01:23 status_file = '[UNDEF]' 2016-07-07 13:01:23 gremlin = 0 2016-07-07 13:01:23 mute = 0 2016-07-07 13:01:23 verbosity = 4 2016-07-07 13:01:23 nice = 0 2016-07-07 13:01:23 machine_readable_output = ENABLED 2016-07-07 13:01:23 suppress_timestamps = DISABLED 2016-07-07 13:01:23 log = DISABLED 2016-07-07 13:01:23 inetd = 0 2016-07-07 13:01:23 daemon = DISABLED 2016-07-07 13:01:23 up_delay = DISABLED 2016-07-07 13:01:23 up_restart = DISABLED 2016-07-07 13:01:23 down_pre = DISABLED 2016-07-07 13:01:23 down_script = '[UNDEF]' 2016-07-07 13:01:23 up_script = '[UNDEF]' 2016-07-07 13:01:23 writepid = '[UNDEF]' 2016-07-07 13:01:23 cd_dir = '[UNDEF]' 2016-07-07 13:01:23 chroot_dir = '[UNDEF]' 2016-07-07 13:01:23 groupname = '[UNDEF]' 2016-07-07 13:01:23 username = '[UNDEF]' 2016-07-07 13:01:23 resolve_in_advance = ENABLED 2016-07-07 13:01:23 resolve_retry_seconds = 1000000000 2016-07-07 13:01:23 passtos = DISABLED 2016-07-07 13:01:23 persist_key = DISABLED 2016-07-07 13:01:23 persist_remote_ip = DISABLED 2016-07-07 13:01:23 persist_local_ip = DISABLED 2016-07-07 13:01:23 persist_tun = ENABLED 2016-07-07 13:01:23 remap_sigusr1 = 0 2016-07-07 13:01:23 ping_timer_remote = DISABLED 2016-07-07 13:01:23 ping_rec_timeout_action = 0 2016-07-07 13:01:23 ping_rec_timeout = 0 2016-07-07 13:01:23 ping_send_timeout = 0 2016-07-07 13:01:23 inactivity_timeout = 300 2016-07-07 13:01:23 keepalive_timeout = 0 2016-07-07 13:01:23 keepalive_ping = 0 2016-07-07 13:01:23 mlock = DISABLED 2016-07-07 13:01:23 mtu_test = 0 2016-07-07 13:01:23 shaper = 0 2016-07-07 13:01:23 ifconfig_ipv6_remote = '[UNDEF]' 2016-07-07 13:01:23 ifconfig_ipv6_netbits = 0 2016-07-07 13:01:23 ifconfig_ipv6_local = '[UNDEF]' 2016-07-07 13:01:23 ifconfig_nowarn = ENABLED 2016-07-07 13:01:23 ifconfig_noexec = DISABLED 2016-07-07 13:01:23 ifconfig_remote_netmask = '[UNDEF]' 2016-07-07 13:01:23 ifconfig_local = '[UNDEF]' 2016-07-07 13:01:23 tun_ipv6 = DISABLED 2016-07-07 13:01:23 topology = 1 2016-07-07 13:01:23 lladdr = '[UNDEF]' 2016-07-07 13:01:23 dev_node = '[UNDEF]' 2016-07-07 13:01:23 dev_type = '[UNDEF]' 2016-07-07 13:01:23 dev = 'tun' 2016-07-07 13:01:23 ipchange = '[UNDEF]' 2016-07-07 13:01:23 remote_random = DISABLED 2016-07-07 13:01:23 Connection profiles END 2016-07-07 13:01:23 explicit_exit_notification = 0 2016-07-07 13:01:23 mssfix = 1450 2016-07-07 13:01:23 fragment = 0 2016-07-07 13:01:23 mtu_discover_type = -1 2016-07-07 13:01:23 tun_mtu_extra_defined = DISABLED 2016-07-07 13:01:23 tun_mtu_extra = 0 2016-07-07 13:01:23 link_mtu_defined = DISABLED 2016-07-07 13:01:23 link_mtu = 1500 2016-07-07 13:01:23 tun_mtu_defined = ENABLED 2016-07-07 13:01:23 tun_mtu = 1272 2016-07-07 13:01:23 socks_proxy_retry = DISABLED 2016-07-07 13:01:23 socks_proxy_port = '[UNDEF]' 2016-07-07 13:01:23 socks_proxy_server = '[UNDEF]' 2016-07-07 13:01:23 connect_timeout = 120 2016-07-07 13:01:23 connect_retry_seconds = 5 2016-07-07 13:01:23 bind_ipv6_only = DISABLED 2016-07-07 13:01:23 bind_local = DISABLED 2016-07-07 13:01:23 bind_defined = DISABLED 2016-07-07 13:01:23 remote_float = DISABLED 2016-07-07 13:01:23 remote_port = '3341' 2016-07-07 13:01:23 remote = 'cfae.skybridge.certesnetworks.com' 2016-07-07 13:01:23 local_port = '[UNDEF]' 2016-07-07 13:01:23 local = '[UNDEF]' 2016-07-07 13:01:23 proto = udp 2016-07-07 13:01:23 Connection profiles [0]: 2016-07-07 13:01:23 connect_retry_max = 5 2016-07-07 13:01:23 show_tls_ciphers = DISABLED 2016-07-07 13:01:23 key_pass_file = '[UNDEF]' 2016-07-07 13:01:23 genkey = DISABLED 2016-07-07 13:01:23 show_engines = DISABLED 2016-07-07 13:01:23 show_digests = DISABLED 2016-07-07 13:01:23 show_ciphers = DISABLED 2016-07-07 13:01:23 mode = 0 2016-07-07 13:01:23 config = '/data/data/de.blinkt.openvpn/cache/android.conf' 2016-07-07 13:01:23 Current Parameter Settings: 2016-07-07 13:01:23 Network Status: CONNECTED to WIFI "egress-2" 2016-07-07 13:01:23 started Socket Thread 2016-07-07 13:01:23 Building configuration… 2016-07-07 13:00:11 Reread (628) log items from log cache file 2016-07-07 13:02:26 official build 0.6.55 running on samsung SM-T231 (PXA1088), Android 4.4.2 (KOT49H) API 19, ABI armeabi-v7a, (samsung/degas3gxx/degas3g:4.4.2/KOT49H/T231XXU0ANJ4:user/release-keys) 2016-07-07 13:02:26 Reread (246) log items from log cache file

schwabe commented 8 years ago

Apart from the log being reversed it looks perfectly fine.

aneeshATgithub commented 8 years ago

ok, then this log is enough to why it fails? and what the real cause is?

schwabe commented 8 years ago

Can you clarify the question? Are you asking why it is failing on the emulator?

aneeshATgithub commented 8 years ago

no, why it is failing on a real device with Android OS version 4.4.2 ? We could not connect on a real device with Android OS version 4.4.2

schwabe commented 8 years ago

The log you pasted is from a working connection. What probelmatic behaviour are you seeing on your real 4.4 device. Note that in particular 4.4.0-4.4.2 are even more buggy than later 4.4 versions with regards to VPN.

aneeshATgithub commented 8 years ago

ok, then there is no workaround for this problem for these versions?

schwabe commented 8 years ago

You still have no told me your problem other than it is not working on the emulator.

aneeshATgithub commented 8 years ago

Sorry, The problem is, when we connect using switch on notification bar, the black dialog - "OpenVPN for Android attempts to create a VPN connection" is not coming to foreground. And we need to take manually the ICSOpenVPN app and then we can tick 'I trust this application' and click 'OK'. This behaviour is in a real device with Android OS version 4.4.2

aneeshATgithub commented 8 years ago

hello cau you please reply what causes for this? or how we can bring the OpenVPN app that showing the dialog to foreground?

schwabe commented 8 years ago

I currently strapped for time. I also don't understand Android task and the flags associated with them (NEW_FLAG) etc. to figure out what happens when you start an activity from a service, so currently I don't really the time to fix it.

Also I also would need to first to replicate the bug.

aneeshATgithub commented 8 years ago

Thanks for the great app, the "FLAG_ACTIVITY_NEW_TASK" has been resolved that issue, and it works fine in all the Android OS versions...