Coder Social home page Coder Social logo

Connect Problem about simpleopenvpn-android HOT 15 CLOSED

nnjun avatar nnjun commented on September 21, 2024
Connect Problem

from simpleopenvpn-android.

Comments (15)

nnjun avatar nnjun commented on September 21, 2024

Are you sure the connection has been successful? If the connection is inexplicably disconnected after success, then it is recommended to pay attention to the server log!

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

Hello nnjun, thanks for the hard work.

It connects then exits when getting to the "Getting client config" part.
I didn't change anything but the data string.
I'm getting the connection closed for some reason.

logcat:

OpenVPN: Starting openvpn

OpenVPN: OpenVPN process exited

TAG: 连接关闭

OpenVPN: Exiting

This is the server log:
My config is okay,
My credentials are okay,
The server recognizes it as normal.
If you connect to the server with a regular client then exit it, it produces this same log.

Any idea why?

peer-id 0' (status=1)
Connection reset, restarting [0]
SIGUSR1[soft,connection-reset] received,
client-instance restarting

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

Hello, there are many reasons for this. What I've encountered is that two clients use this configuration at the same time, resulting in crowding out each other. If you don't have this situation, it's advisable to sort out other problems. Google searches for "openvpn Connection reset, restarting [0].

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

I've already done that.
I've solved the problem by using https://github.com/micer/openvpn-sample-app
Module instead, and porting your VPNActivity with it.
The problem now is the service isn't working properly.

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

Okay, managed to port everything now including the VPNService.
I don't know what actually is wrong, micer's module is much older than what you are using, nonetheless thank you so much. It's really hard to find a good OpenVPN for android source and you got one. It actually helped me a lot in understanding the process core of Schwabe's openvpn. Also the VPNActivity is just a genius class, made my life easier. thanks!

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

Yes, it's hard to find the right code for OpenVpn, and I'd like to make it easier for people in trouble. Demo is the most basic connection. In fact, OpenVpn involves much more than you might think. We should expand it. Of course, the original intention of this library is to make it more convenient. For expanding or more functions, developers can explore for themselves. He's much stronger than we thought!

from simpleopenvpn-android.

sysxda avatar sysxda commented on September 21, 2024

@yunolawliet can share what you do please , i have same problem as you

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

@yunolawliet can share what you do please, I have the same problem as you

@coderzstas I suggest you get a module from an openvpn android client and follow these steps:
Import module,
Import nnjun's VPNActivity and Service to it.

The problem I have right now is with the notification.
When I click it doesn't show the app.
Must be a binding problem, I yet to still solve.

@nnjun He has the same problem as mine, any idea?

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

I've added support for him and a new way of listening. See Readme for details. I have updated the code! @yunolawliet

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

@nnjun great, I've tested the intent part and it works. Any idea on how to preserve the app while the service is running? The app keeps closing while the server is alive.

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

Do you mean that the back-end service of the application has been killed by the system? @yunolawliet

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

@nnjun Yes. But the a better approach would be checking if the service is running. So if the system killed the back end, you can adjust the layout. Or my approach is wrong? Do you have a better idea? Also, it's nice that you made the code neat. Also having access to the state and it's equivalent strings would be great.

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

@yunolawliet Firstly, mobile ROM is involved. Different manufacturers have different limitations. Secondly, we can adjust the parameters of the server, such as keepalive 10 120. We can slightly shorten the Ping time to enhance connectivity. For example, keep alive 5 120, more still need to look at mobile phones.

from simpleopenvpn-android.

yunolawliet avatar yunolawliet commented on September 21, 2024

@nnjun got it. Thank you. Loving your module so far. :)

from simpleopenvpn-android.

nnjun avatar nnjun commented on September 21, 2024

@yunolawliet Thank you. Remember to pay close attention to me. Ha ha ha ha ha ha ha

from simpleopenvpn-android.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.