0

I have a websocket enabled webapp and I use SocketRocket to work with it from my iOS app. Everything was fine until I changed network settings on iPad to work without DNS and thru proxy. Now I cannot connect to my web app via iOS app although I can connect to it via mobile safari.

I use wss scheme and self signed certificates. Both DNS host name "example.net" or ip 10.10.1.1 do not work. I receive error NSPOSIXErrorDomain 64 "Host is down" or NSPOSIXErrorDomain 60 "Operation timed out".

I would appreciate any ideas why this happens.

user1264176
  • 1,118
  • 1
  • 9
  • 26

1 Answers1

0

Ok, so after some digging into SocketRocket code it appears that they do not support connections thru proxy.

I was getting NSPOSIXErrorDomain 64 "Host is down" or NSPOSIXErrorDomain 60 "Operation timed out" because obviously I can't reach needed host directly.

user1264176
  • 1,118
  • 1
  • 9
  • 26
  • @madlymad There is no workaround. You can just grab forks of SocketRocket or PocketSocket libraries which have this implemented https://github.com/strukturag/PocketSocket – user1264176 Jul 28 '16 at 14:15
  • Yes it's been a while that a user made a push commit about HTTP proxy support in SocketRocket. – madlymad Jul 28 '16 at 14:20
  • Well I use that library for quite some time and it is proven to be stable. It should not be that hard to merge with upstream if you really need it though. – user1264176 Jul 28 '16 at 14:22