mysteriumnetwork / go-openvpn

GNU Affero General Public License v3.0
113 stars 33 forks source link

I need help with this error log #67

Open drksbr opened 1 year ago

drksbr commented 1 year ago

I have a connection profile that works perfectly if I issue the command:

openvpn --config PROFILE.ovpn

however, when using the desktop example it returns the following LOG and does not complete the connection:

Library check >> OpenVPN core 3.git:master linux x86_64 64-bit built on Nov 29 2018 15:36:22 Library check >> Copyright (C) 2012-2017 OpenVPN Inc. All rights reserved. Openvpn log >> Frame=512/2048/512 mssfix-ctrl=1250 Openvpn log >> Openvpn log >> UNUSED OPTIONS Openvpn log >> 1 [nobind] Openvpn log >> Openvpn event >> {Fatal:false Error:false Name:RESOLVE Info:} Openvpn log >> Contacting 173.212.XXX.XXX:1194 via UDP Openvpn log >> Openvpn event >> {Fatal:false Error:false Name:WAIT Info:} Openvpn log >> Connecting to [ovpn.XXX.app]:1194 (173.212.XXX.XXX) via UDPv4 Openvpn log >> Openvpn event >> {Fatal:false Error:false Name:CONNECTING Info:} Openvpn log >> Tunnel Options:V4,dev-type tun,link-mtu 1541,tun-mtu 1500,proto UDPv4,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,tls-auth,key-method 2,tls-client Openvpn log >> Openvpn log >> Creds: UsernameEmpty/PasswordEmpty Openvpn log >> Openvpn log >> Peer Info: Openvpn log >> IV_GUI_VER=cli 1.0 Openvpn log >> IV_VER=3.git:master Openvpn log >> IV_PLAT=linux Openvpn log >> IV_NCP=2 Openvpn log >> IV_TCPNL=1 Openvpn log >> IV_PROTO=2 Openvpn log >> IV_AUTO_SESS=1 Openvpn log >> IV_BS64DL=1 Openvpn log >> Openvpn log >> Openvpn log >> VERIFY OK : depth=1 Openvpn log >> cert. version : 3 Openvpn log >> serial number : 08:F2:21:DE:A1:BE:2E:0C:34:47:11:F9:A9:C1:39:58:4E:5E:51:33 Openvpn log >> issuer name : CN=XXXApp Openvpn log >> subject name : CN=XXXApp Openvpn log >> issued on : 2022-11-01 17:39:34 Openvpn log >> expires on : 2032-10-29 17:39:34 Openvpn log >> signed using : RSA with SHA-256 Openvpn log >> RSA key size : 2048 bits Openvpn log >> basic constraints : CA=true Openvpn log >> key usage : Key Cert Sign, CRL Sign Openvpn log >> Openvpn log >> Openvpn log >> VERIFY OK : depth=0 Openvpn log >> cert. version : 3 Openvpn log >> serial number : 04:29:0C:DD:EF:56:19:1E:2F:23:2B:4F:B1:AA:95:07 Openvpn log >> issuer name : CN=XXXApp Openvpn log >> subject name : CN=ovpn.XXX.app Openvpn log >> issued on : 2022-11-01 18:02:37 Openvpn log >> expires on : 2025-02-03 18:02:37 Openvpn log >> signed using : RSA with SHA-256 Openvpn log >> RSA key size : 2048 bits Openvpn log >> basic constraints : CA=false Openvpn log >> subject alt name : ovpn.XXX.app Openvpn log >> key usage : Digital Signature, Key Encipherment Openvpn log >> ext key usage : TLS Web Server Authentication Openvpn log >> Openvpn log >> Openvpn stats >> {BytesIn:2420 BytesOut:534} Openvpn stats >> {BytesIn:2420 BytesOut:726} Openvpn stats >> {BytesIn:2420 BytesOut:918} Openvpn stats >> {BytesIn:2420 BytesOut:1110} Openvpn stats >> {BytesIn:2420 BytesOut:1302} Openvpn stats >> {BytesIn:2420 BytesOut:1494} Openvpn stats >> {BytesIn:2420 BytesOut:1686} Openvpn stats >> {BytesIn:2420 BytesOut:1878} Openvpn stats >> {BytesIn:2420 BytesOut:2070} Openvpn stats >> {BytesIn:2420 BytesOut:2262} Openvpn event >> {Fatal:true Error:true Name:CONNECTION_TIMEOUT Info:} Openvpn event >> {Fatal:false Error:false Name:DISCONNECTED Info:} Openvpn log >> Openvpn3 session ended Graceful exit

lukx33 commented 1 year ago

Openvpn log >> Creds: UsernameEmpty/PasswordEmpty

eg session := openvpn3.NewSession(config, openvpn3.UserCredentials{ Username: "user", Password: "pass", }, &loggingCallbacks{})

antonyr commented 9 months ago

It is still the same even now. We don't necessarily need to send the username and password.

antonyr commented 9 months ago

This is the error I am seeing on the server:

2023-09-19 16:11:13 223.178.85.195:10749 OpenSSL: error:0A0000C7:SSL routines::peer did not return a certificate
2023-09-19 16:11:13 223.178.85.195:10749 TLS_ERROR: BIO read tls_read_plaintext error
2023-09-19 16:11:13 223.178.85.195:10749 TLS Error: TLS object -> incoming plaintext read error
2023-09-19 16:11:13 223.178.85.195:10749 TLS Error: TLS handshake failed
2023-09-19 16:11:13 223.178.85.195:10749 SIGUSR1[soft,tls-error] received, client-instance restarting

however when I use it with the openvpn client, it just works

nikohpng commented 8 months ago

@antonyr I have same issue, do you have solve it?

antonyr commented 8 months ago

Hi @nikohpng nope, I couldn't resolve it and I had to use a different software to get around it.

nikohpng commented 8 months ago

@antonyr do you find other like go-openvpn?I don't want to use cmd to control openvpn in golang. can you share it if you find it. maybe I need to fix it if can't find library.

antonyr commented 8 months ago

It was not a go based one. It is entirely a different one for windows.

nikohpng commented 8 months ago

I update openvpn library to solve it. maybe the library is oldest. If someone need it, please contact me.

xuecangqiuye commented 4 weeks ago

I update openvpn library to solve it. maybe the library is oldest. If someone need it, please contact me.

Hi, I have a problem with building an OpenVPN app for windows, can you share it with me, maybe it can help to solve the problem. Thanks!