tillicollapse / iphone-socks-proxy

Automatically exported from code.google.com/p/iphone-socks-proxy
GNU General Public License v2.0
0 stars 0 forks source link

'Stream open error' when browsing certain webpages #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. After setup, browse to newsvine.com

What is the expected output? What do you see instead?
Before complete load of page, the status label shows "Stream open error"

Console output contains:
2010-01-13 10:23:21.984 SOCKS[6987:207] Error C>P i.newsvine.com:80
2010-01-13 10:23:21.986 SOCKS[6987:207] code 57
2010-01-13 10:23:22.035 SOCKS[6987:207] domain NSPOSIXErrorDomain
2010-01-13 10:23:22.039 SOCKS[6987:207] userInfo (null)
2010-01-13 10:23:22.053 SOCKS[6987:207] Connection ended 30 30: Stream open 
error

Code 57 indicates that the network socket is not connected

Was able to reproduce on cnn.com, however initial testing shows that google.com 
<b>does 
not</b> get this error.  Also checking mail with OSX Mail application <b>does 
not</b> get 
error.

Could be that the offending web server is prematurely RSTing the connection.  

Original issue reported on code.google.com by jagreenw...@gmail.com on 13 Jan 2010 at 3:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm not sure if the issue I'm facing is related to this, but here it goes.

What steps will reproduce the problem?
1. Setup and start the SOCKS app as directed
2. Configure browser as directed
3. Browse any website, or use tsocks as directed
4. iPhone screen shows that a connection is being attempted, but the first 
octet followed by 0.0.0 and the port number; browser/tsocks connection times 
out. Screen shows "Stream open error".

What is the expected output? What do you see instead?
Connection gets established, no time outs.

What version of the product are you using? On what operating system?
I checked out the latest at the moment (r19), running this on iPhone 4 with iOS 
4.

Please provide any additional information below.
Screen captures:
 - http://files.ryanlim.com/img/IMG_0685.PNG
 - http://files.ryanlim.com/img/IMG_0684.PNG

Original comment by lwh.ryan@gmail.com on 6 Jul 2010 at 3:13

GoogleCodeExporter commented 8 years ago
This seems to be a fix for the issue I experienced. Probably not the cleanest, 
but it works.

Original comment by lwh.ryan@gmail.com on 6 Jul 2010 at 4:23

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the report+patch. Yes there was a bug, and it was fix in r20.
The bug happened if the laptop decided to use a binary form of an IP address 
and not a host name.
My guess is that this happened only if the IP was stored in the cache of the 
DNS client of the laptop.
The way to reproduce it was to use "tsocks telnet 10.0.0.1 80" and configure 
tsocks to use the iPhone proxy.

The bug was because  *(int8_t *)s was passed as an argument to ntohl but it 
should have been *(int32_t *)s

Many thanks, Udi

Original comment by udi.benr...@gmail.com on 6 Jul 2010 at 10:19

GoogleCodeExporter commented 8 years ago
Hah! I didn't even notice it was an int8_t pointer. :)

Thanks for fixing this.

Original comment by lwh.ryan@gmail.com on 6 Jul 2010 at 10:51