www.nbc.com could not be loaded with simpleSocks server.
I've been playing with simpleSocks server on canary build, 41.0.2262.0 canary (64-bit). Firefox is configured to use localhost:9999 as socks proxy. www.cnn.com, www.epochtimes.com, and many other sites seems working well, but www.nbc.com failed to load after multiple tries. If I disable proxy setting, it loads fine on firefox.
It seems several other websites has the same issue. This can be confirmed through curl. curl -x socks5h://127.0.0.1:9999 www.nbc.com
And following sites has the same fate. www.google.com www.microsoft.com www.aboluowang.com
The failure is from the tcp connection. Tcp socket could not be established to certain addresses.
I created pull request https://github.com/uProxy/uproxy-networking/pull/172 to handle TCP connection error. That way at least browser won't wait for response forever.
We need further investigation into freedom/chrome code and see why tcp connection can not be established to certain address.
Did you check that this pull request actually produces the expected log message in these cases?
On Tue, Dec 30, 2014 at 4:03 PM, sword [email protected] wrote:
The failure is from the tcp connection. Tcp socket could not be established to certain addresses.
I created pull request uProxy/uproxy-networking#172 https://github.com/uProxy/uproxy-networking/pull/172 to handle TCP connection error. That way at least browser won't wait for response forever.
We need further investigation into freedom/chrome code and see why tcp connection can not be established to certain address.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/750#issuecomment-68398186.
I added a method in uprobe code to do simple tcp connection. I see the same behavior. Tcp connection to www.epochtimes.com works as expected, but www.google.com failed to work.
Will, is there unit test on freedom side that can help quickly verify this behavior? I guess the problem is most likely to be on Chrome side.
To ben's question, yes, here is the log.
tcp E [0/2 10:57:39.741] Failed to connect to {"address":"www.nbc.com","port":80}, err={"errcode":"CONNECTION_FAILED","message":"Chrome Connection Failed: undefined"}
Is this chrome specific?
We have functional tests: https://github.com/freedomjs/freedom/blob/master/spec/providers/coreIntegration/tcpsocket.integration.src.js which validate that sockets to google.com can be opened, and that an HTTP response is received.
The error message is coming from here: https://github.com/freedomjs/freedom-for-chrome/blob/master/providers/core.tcpsocket.js#L67
Probably worth printing out the raw error from chrome, so we can understand why it's complaining. You're running into a response which isn't one of the ones chrome had defined as of when we wrote the class (https://github.com/freedomjs/freedom-for-chrome/blob/master/providers/core.tcpsocket.js#L225)
@mollyling As king of sockets, can you investigate what dark magic is happening here?
Is anyone else having a problem outside of @quantsword ?
@quantsword are you sure that you:
- Have uProxy running
- Are using uProxy
- Aren't getting those sites blocked by repressive national firewall?
So, I'm able to access those websites via Simple SOCKS running on Chrome 41.
I think your fix probably is right but just to second @mollyling's questions.
Dropping priority for now since I seem to be able to access these sites fine.
I think we can close this until one of us can reproduce.
Assign this one to myself. I could not reproduce this in corp environment, and it happens consistently at home. Accessing those sites directly has not issues. I will check into this when I get back home, probably capture the net traffic and see exactly what's failing.
I did some investigation today. I could reproduce the error in connection with chrome.sockets.tcp directly. So it does not seems to be an issue with freedom library or uproxy networking. The error code is -118 (connect time out). Two examples I used "www.epochtimes.com" and "www.nbc.com", one is always successful, the other (nbc) always fails.
I finally got a chance to trace the packets and here is what happened. The DNS query to www.nbc.com end up with 2 answers in separate packets, one is the ipv4 address, the other is ipv6. Chrome seems ignore the ipv4 answer and send SYN using ipv6 address. But somehow that SYN was never ACKed. After a while, TCP connection got timeout.
Typing www.nbc.com in url, communication happened using ipv4 address.
So it seems my environment has some issue in supporting ipv6. But it is weird why ipv4 was never tried. This issue is in chrome.socket only.
Do you have any issues with other proxies?
Sounds like a chrome bug should be filed? Thanks for investigating!
On Thu, Feb 5, 2015 at 11:49 PM, sword [email protected] wrote:
I finally got a chance to trace the packets and here is what happened. The DNS query to www.nbc.com end up with 2 answers in separate packets, one is the ipv4 address, the other is ipv6. Chrome seems ignore the ipv4 answer and send SYN using ipv6 address. But somehow that SYN was never ACKed. After a while, TCP connection got timeout.
Typing www.nbc.com in url, communication happened using ipv4 address.
So it seems my environment has some issue in supporting ipv6. But it is weird why ipv4 was never tried. This issue is in chrome.socket only.
— Reply to this email directly or view it on GitHub https://github.com/uProxy/uproxy/issues/750#issuecomment-73182563.
Lucas Dixon | Google Ideas