Comments (15)
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.
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.
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.
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.
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.
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.
@yunolawliet can share what you do please , i have same problem as you
from simpleopenvpn-android.
@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.
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.
@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.
Do you mean that the back-end service of the application has been killed by the system? @yunolawliet
from simpleopenvpn-android.
@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.
@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.
@nnjun got it. Thank you. Loving your module so far. :)
from simpleopenvpn-android.
@yunolawliet Thank you. Remember to pay close attention to me. Ha ha ha ha ha ha ha
from simpleopenvpn-android.
Related Issues (10)
- Set username and pwd HOT 12
- Android 29 连接不了 HOT 1
- 缺少一個變量
- Unable to reconnect HOT 9
- 一点开始就断开了也不报错。不知道什么问题,麻烦帮忙看下,谢谢 HOT 1
- 动态设置ip无效,服务器得到的,依旧是本机的ip HOT 1
- 可以用主机跟端口号,账号密码登录。 HOT 5
- 连接成功之后,ip没有更换,是哪里还需要配置吗? HOT 2
- 不是openvpn服务器的vpn服务器可以连接吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleopenvpn-android.