Notes about using proxy with curl and with Chrome browser

Last updated on 9 Jun. 2024
With Jio APN protocol and APN roaming protocol set to IPv4 from IPv4/IPv6, I am not facing the blocking of sites like wordpress.com and github.com on Jio mobile Internet. Prior to getting that solution, on 4/5 June (2024) late night I was trying out proxy solutions. I learned some stuff about using command line curl which sometimes was able to access https sites through Windows manual proxy settings but which  sites under same Windows manual proxy settings were not accessible through Chrome or Edge browsers in not only Jio mobile Internet but also Airtel mobile Internet.

To capture some of the knowledge picked up from these tests, I decided to do some of them again and capture it in this post. A pleasant surprise is that now https sites are working in Chrome (did not test Edge but I think it will work there too) when going through manual proxy set in Windows Settings.

The following tests were done on 5th June 2024. The http proxy was picked up from https://free-proxy-list.net/.

With Airtel mobile Internet

Not using proxy in Windows (Direct)

  1. Works: curl --proxy http://159.65.245.255:80 http://www.example.com
  2. Fails with connect error : curl --proxy http://159.65.245.255:80 https://www.example.com [Later I saw that this proxy server is listed as not supporting https.]
  3. Works: curl https://www.example.com
  4. Works: curl --proxy http://172.96.117.205:38001 https://www.example.com [This proxy server is listed as supporting https.]

Using 172.96.117.205:38001 as manual proxy settings in Windows

  1. Works: curl http://www.example.com
  2. Works: curl https://www.example.com
  3. Works: In Chrome browser, http://www.example.com
  4. Works: In Chrome browser, https://www.example.com [This was a pleasant surprise as late night yesterday/today, Chrome and Edge would trip up on SSL sites being accessed through proxy.]
  5. Worked after retry and was slow: In Chrome browser, https://wordpress.com/home/ravisiyer.wordpress.com
  6. Worked but was slow: In Chrome browser, https://news.google.com/home?hl=en-IN&gl=IN&ceid=IN:en

With Jio mobile Internet

Note that the tests below are with Jio APN protocol and APN roaming protocol set to IPv4 from IPv4/IPv6. Also, I don't know if caching from earlier Airtel tests is coming into play for these tests.

Using 172.96.117.205:38001 as manual proxy settings in Windows

  1. Works: curl http://www.example.com
  2. Works: curl https://www.example.com
  3. Works: In Chrome browser, http://www.example.com
  4. Works: In Chrome browser, https://www.example.com 
  5. Worked after retry and was slow: In Chrome browser, https://wordpress.com/home/ravisiyer.wordpress.com [Slow speed and first time failure indicates caching from earlier Airtel tests is not coming into play]
  6. Worked after retry but was slow: In Chrome browser, https://news.google.com/home?hl=en-US&gl=US&ceid=US:en [The query string argument(s) of US instead of IN are diff. from Airtel test and so caching would not be in play here.]
  7. Worked but was very slow: In Chrome browser, www.ibm.com got automatically changed to https://www.ibm.com/us-en

curl socks4 testing (I think it was with no proxy setting in Windows; I did not note whether Jio or Airtel ISP was being used)

Note that I used https://www.socks-proxy.net/ to get free socks4 proxies info.
  1. Worked: curl -x socks4a://199.102.105.242:4145 http://www.example.com/
  2. Worked: curl -x socks4://199.102.105.242:4145 http://www.example.com/
  3. Failed (error given below): curl -x socks4a://199.102.105.242:4145 https://www.example.com/ [Proxy is listed as supporting https]
    Error Message: curl: (60) schannel: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.
    More details here: https://curl.se/docs/sslcerts.html

    curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.
    ---end of Error Message ---
    Note that 'curl https://www.example.com/' command issued immediately after above command, worked!
  4. Failed with same error as above: curl -x socks4://199.102.105.242:4145 https://www.example.com/

Comments