question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with displaying website through the proxy

See original GitHub issue

I created a simple passthrough proxy and try to use it with FF.

The problem is, that for some reason the https://twitter.com website doesn’t load at all or loads partially when the proxy is used. I cannot identify the reason, this is what I see in the logs:

Proxying HTTP/1 CONNECT to twitter.com:443
Generating certificate for twitter.com
Handling request for https://twitter.com/
Request matched rule: Match requests for anything, and then pass the request through to the target host.

and then after a long delay:

Failed to handle request: Error: connect ETIMEDOUT 104.244.42.65:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '104.244.42.65',
  port: 443,
  statusCode: 502,
  statusMessage: 'Error communicating with upstream server'
}
Failed to handle request: Error: connect ETIMEDOUT 104.244.42.65:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '104.244.42.65',
  port: 443,
  statusCode: 502,
  statusMessage: 'Error communicating with upstream server'
}
Failed to handle request: Error: connect ETIMEDOUT 104.244.42.65:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '104.244.42.65',
  port: 443,
  statusCode: 502,
  statusMessage: 'Error communicating with upstream server'
}
Failed to handle request: Error: connect ETIMEDOUT 104.244.42.65:443
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
  errno: -110,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '104.244.42.65',
  port: 443,
  statusCode: 502,
  statusMessage: 'Error communicating with upstream server'
}

FF outout:

Now, if I enable the system level VPN, it does start working! So basically twitter.com without proxy works, and also it works with proxy with VPN

It seems like FF can do something that http://twitter.com requires, but what my proxy (or the underlying mockttp) can’t do. What it could be? Does anyone have any idea?

This is my source code: https://github.com/OnkelTem/passthrough-web-proxy

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pimterrycommented, May 20, 2022

Huh, interesting! Interfering government proxies sound very annoying, sorry about that, but yes it looks like HTTP Toolkit is doing the right thing in that case. Connecting upstream directly genuinely times out, and it correctly shows that as the error. I’ll close this.

Very interesting that it’s intermittent though, I’d be curious to know how they’re implementing the block internally to cause that. Maybe it’s by IP, and round-robin DNS is sending you to different Twitter IPs each time, and not all of them are blocked?

Anyway, if using a VPN works, that’s probably the best option. Alternatively you might find that the proxyConfig option gives you a more direct workaround without needing to remember to use the VPN, if you can find an accessible proxy hosted outside Russia to route around the issue.

0reactions
OnkelTemcommented, May 19, 2022

So this one can be closed I suppose, as it doesn’t seem to be relevant. I apologize for spending your time. Thank you for the quick response and helpful ideas!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix “There Is Something Wrong With the Proxy Server ...
Go to the Control Panel. · Click on Internet Options. · Click on LAN (Local Area Network) Settings. · Uncheck the box that...
Read more >
Browser Won't Open Websites: Proxy Server Connection Error
If your browser still won't open any websites, there may be a problem with the DNS server. To check this server, here's what...
Read more >
How to fix "There is something wrong with the proxy server ...
How to Fix Can't Connect to Proxy Server Issue on Windows 10 · Method 1: Checking if your Connection is Stable · Method...
Read more >
Internet Browsers Won't Open Webpages: How to Fix Proxy ...
I made one of my previous videos to show how to get rid of ... If your browser still won't open websites, there...
Read more >
Page Cannot be Displayed error due to bad proxy server timeout
The user receives a Page Cannot Be Displayed error message in Internet Explorer if the list is exhausted and no connection was established....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found