Skip to content
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

Tor connection is not working once app becomes active after iPhone unlock screen #37

Open
avaan opened this issue Feb 28, 2016 · 1 comment

Comments

@avaan
Copy link

avaan commented Feb 28, 2016

As per the steps I have integrated the CpaProxy to my app. Its works fine as long as the application is active.but only in the following scenario CpaProxy is not working,

  1. Launch the app
  2. Establish a connection to tor
  3. Access the server through tor session. works fine
  4. Press 'power' button the iPhone is locked and screen becomes black.
    5.Now press 'Home' button and unlock the screen
  5. My app becomes active
    7.Now i try to access server, i get server not reachable error.

I checked the CPAProxyManager status it shows 'CPAStatusOpen'. can you please let me know whats the problem.

I tried to connect again Tor by calling "setupWithCompletion" it still did not helped me.

Update:-

for further analysis i am getting below errors in
-- (void)socketManager:(CPASocketManager *)manager didDisconnectError:(NSError *)error method call

  1. didDisconnectError Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0x17067bf40 {NSLocalizedDescription=Socket closed by remote peer}
  2. idDisconnectError Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo=0x170a77740 {NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}
@ddeneka
Copy link
Contributor

ddeneka commented May 16, 2017

Hi @avaan,

Were you able to solve this? I've encountered similar problem.

@chrisballinger if you have time, please take a look at my example: https://www.dropbox.com/s/00yttq3kmp8xrix/TorBackground.zip?dl=0

Steps to reproduce:

run on device
go to background
wait 3 minutes until app is suspended
go to foreground
app is no longer able to use TOR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants