CPAProxy
CPAProxy copied to clipboard
Tor connection is not working once app becomes active after iPhone unlock screen
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,
- Launch the app
- Establish a connection to tor
- Access the server through tor session. works fine
- Press 'power' button the iPhone is locked and screen becomes black. 5.Now press 'Home' button and unlock the screen
- 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
- didDisconnectError Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0x17067bf40 {NSLocalizedDescription=Socket closed by remote peer}
- idDisconnectError Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo=0x170a77740 {NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}
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