-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix premature psiphon CONNECTED state #65
Fix premature psiphon CONNECTED state #65
Conversation
@ameerhossein Can you test the current |
@markpash I tested the v1 release and it connects like usual. Actually I did not touch the way it tries to connect. I just modified the way it presents the connection state. So can you please try some steps to investigate the issue? Can you confirm you reach this log on v1 logs and it still says CONNECTING? If it reaches this log and still says CONNECTING, please try and check if you actually can access any website now or no? It might log psiphon started but if its connected without being able to access internet, its not really useful and it makes sense to not show the CONNECTED state. If you can confirm it reaches the psiphon started log and its able to access the internet, then it's a problem caused by this PR and we need to investigate further. If it does not reach the psiphon started log, please try the previous version. Was it reaching this log on old versions? Can you confirm it was not a false positive and is able to access the internet? Because this PR eliminates false positives, We need to make sure previous CONNECTED states in old version were true and not just connected but unable to access the internet. Thanks. |
@ameerhossein I'm unable to test this at the moment. Maybe @DanielcoderX can help and try to recreate the issue and post the logs? |
Give me a minute |
I did a test in an android emulator in the (Android 14 image) and everything works perfectly. But on my personal phone running Android 13, the Psiphon mode doesn't work. This is just an anecdote. BTW I'm the UK so there's no filtering or strange networking happening. |
@ameerhossein |
92a9c74 just decouples the same code from each activity so its effectively the same. 6e6c129 just avoids multiple calls for the same state. This has nothing to do with state changes. a6a3311 This could be the issue but I can't reproduce it. First I need to know the problem is occuring on which level. Is psiphon started but the state is not being updated? I need someone with this problem help me identify the cause. @DanielcoderX did you have this problem too? Did you check the logs? Btw we released v1 too early. Android apps need more testing due to their nature (strange behaviors across different OEMs) |
The problem is that the app works well on the emulator but not on a Real device, LOL yeah, that was too soon for releasing version 1 but unfortunately, users community was embarsed by the slow development due to political, social, and security reasons and we needed some sedative ASAP. |
I just took a quick look at the code. Could this be the problem? I was playing with the app in an emulator with api version 31. I tried normal mode and psiphon and they worked fine. Then I tried gool and it didn't work until a couple of reconnects and waiting. Perhaps the bug exists for gool mode? |
In the exact moment, I'm using Psiphon mode and it's working very well with high speed connection :/ everything works as expected. |
That just keeps pinging 1.1.1.1 until the first successful request which means you now have access to the internet. because you don't have access to internet while psiphon is trying to connect through warp. so just checking the local port is not enough to present the connected state. This behavior is for psiphon mode only so normal or gool mode is still the same as previous version.
I guess this has something to do with Cloudflare ip scanner of Go lib. You connect to warp through different IPs each time you try to connect. If you clear the endpoint option in settings, it shouldn't run the scanner so it worth trying it. It seems it only runs the IP scanner on each connection attempt if the value of that option equals "engage.cloudflare.com:2408" I don't think the problem is pinging. even if we don't ping to ensure connection, the connected state is just fake and you'd be unable to access the internet. I'm suspicious to the built-in IP scanner because @DanielcoderX says the behavior is random. That's the only thing that changes on every reconnect. |
Are they using the same network? I switched to Irancell and none of the methods connects. the normal mode says connected but it has no access to the internet (false-positive because the ping is only on psiphon mode.) |
When using Psiphon mode, the local port (default 8086) is opened before psiphon is actually connected. This confuses OblivionVpnService into thinking the connection is made, publishing invalid CONNECTED state too early. This PR implements a method to wait for psiphon to completely connect, then publish CONNECTED state.