gayanvoice / android-vpn-client-ics-openvpn

⭐ Create your Android VPN App by using Android Studio and publish to Google Play Store 🤖
https://gayanvoice.medium.com/develop-a-vpn-app-in-java-using-android-studio-6f1f2d66031e
MIT License
583 stars 317 forks source link

When click on Connect button , I am Getting Error :- Error in configuration . You must select a User certificate . #19

Closed varundtsfi closed 4 years ago

tahsinjawad commented 4 years ago

You to config two json file in welcome activity

StringGetAppURL = "https://api.myjson.com/bins/lxsam"; StringGetConnectionURL = "https://api.myjson.com/bins/17ytoe";

use this two variable in welcome activity.

gayanvoice commented 4 years ago

Check your filedetails and appdetails JSON files are valid

asadd00 commented 4 years ago

Check your filedetails and appdetails JSON files are valid

I am using built-in json file, when I run app first time connection is made successfully but when disconnect and quit app, and start again and try to reconnect, it gives this "You must select a User certificate" error, please tell me what I am doing wrong, or where should I put my username and password

gayanvoice commented 4 years ago

The certificate has an error. Check if the certificate is correct, and did you use the same certificate to create the connection at the first time or a different one? @asadd00

varundtsfi commented 4 years ago

Check your filedetails and appdetails JSON files are valid

@gayanvoice

Yes both file details details are working with

Even I have my client.ovpn file which is working fine with above app but with this code it's not working

varundtsfi commented 4 years ago

You to config two json file in welcome activity

StringGetAppURL = "https://api.myjson.com/bins/lxsam"; StringGetConnectionURL = "https://api.myjson.com/bins/17ytoe";

use this two variable in welcome activity.

did that still not working its showing no process running on UI when click on connect button

gayanvoice commented 4 years ago

@varundtsfi Can you describe the error? Did you check Logs? If the problem exists create another clone.

asadd00 commented 4 years ago

problem was with configuration, and its resolved, thanks

farazh12 commented 4 years ago

prob

how to configure the files ?

asadd00 commented 4 years ago

you should have your certificate(ca) and tls-auth to add these in config file along with these commands: client proto tcp comp-lzo mssfix persist-key persist-tun dev tun auth SHA256 auth-user-pass tls-client

ElysiumGit commented 4 years ago

you should have your certificate(ca) and tls-auth to add these in config file along with these commands: client proto tcp comp-lzo mssfix persist-key persist-tun dev tun auth SHA256 auth-user-pass tls-client

could you post the config files you're using for an example? I'm having trouble figuring out what is wrong with mine. appdetails: https://api.myjson.com/bins/eeb8c filedetails.json: https://api.myjson.com/bins/cdfrw

gayanvoice commented 4 years ago

Did you check if the JSON files valid or not?

ElysiumGit commented 4 years ago

Did you check if the JSON files valid or not?

Yes, they are valid. I used jsonlint to check. If anyone's openvpn config files are working I'd love to take a look and figure out where I'm going wrong.

jhaycy17 commented 4 years ago

how to put this in json

auth-user-pass client dev tun proto udp remote 195.123.237.203 25000 persist-key persist-tun pull resolv-retry infinite nobind user nobody comp-lzo remote-cert-tls server verb 3 mute 2 connect-retry 5 5 connect-retry-max 8080 mute-replay-warnings redirect-gateway def1 script-security 2 cipher none

-----BEGIN CERTIFICATE----- MIIDKzCCAhOgAwIBAgIJAJBlrUZfzjKFMA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV BAMMCENoYW5nZU1lMB4XDTIwMDMwNTE1NDgxM1oXDTMwMDMwMzE1NDgxM1owEzER MA8GA1UEAwwIQ2hhbmdlTWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB AQC9fJre8DCc2/9pDJqfmKH8QpGJ1vmzGvTtzrsNY52FjlbwlwJ8OoL42yehtJr1 SocuynepIAtCM00fhcWik12m9WwkpLB3OLuneM7H/m2+YZPPQuIFxSmUagIZG6Rz iK3Bqvw+vhiey+cOuHlpYsyGrSCWeMwFjhvHjG8SFdrCtNXrpRDnapa11STOW6bC IbnuVai2C7A+3JM4F1KJHJhDs/oGjeklRzD+XP6uGtyZent6nPg6B0ac02Wkp7Ad hIicuECpIX7TzgWfrks0Jf/B7zjVY5hXVG//wF4y+it4ReL1YGIMiIJDDfBAP/w5 y9PP1rw1Yxa0bV7V7vBX6IsRAgMBAAGjgYEwfzAdBgNVHQ4EFgQUlpHmK68HH1gl aaZC6D5fQM0swEswQwYDVR0jBDwwOoAUlpHmK68HH1glaaZC6D5fQM0swEuhF6QV MBMxETAPBgNVBAMMCENoYW5nZU1lggkAkGWtRl/OMoUwDAYDVR0TBAUwAwEB/zAL BgNVHQ8EB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 years ago

how to make valid

jhaycy17 commented 4 years ago

problem was with configuration, and its resolved, thanks

how to resolve bro

sathis810 commented 4 years ago

How you resovled

you should have your certificate(ca) and tls-auth to add these in config file along with these commands: client proto tcp comp-lzo mssfix persist-key persist-tun dev tun auth SHA256 auth-user-pass tls-client

How you resolved bro.

tomsoyer commented 4 years ago

Did any one resolve this problem? can you send example ovpn file here.

xDeepdive commented 3 years ago

I also have this problem now , How to fix this

alfinforwork commented 1 year ago

2022 still got same error