You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When HttpRequestException is thrown with ProxyTunnelError HttpRequestError, the StatusCode is not included. This behavior may not be ideal for scenarios involving web scraping where backconnecting proxy is utilized extensively.
In web scraping, we mostly do not connect to the proxy directly. Instead, a backconnecting proxy service is employed which dynamically assigns different proxies which is convenient to provide rotating proxies. The CONNECT request is critical as it is the point where the backconnecting proxy might reject a request. Typically, proxies communicate the nature of such rejections via HTTP status codes (e.g., 429 when request rate is too high, 502 when no available proxy). Some will use HTTP headers detailing the reason too.
Currently, we have to parse the Message to find the actual status code