'RemoteDisconnected('Remote end closed connection without response')

I'm using residential proxies from https://www.dreamproxies.io/ The proxies seem to be all live, checked it on multiple proxy checkers but i keep getting Proxy error HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))

Here's my code:

import requests
try:
    proxies = {
        "http": 'http://<username>:<password>@<ip>:<port>',
        "https": 'http://<username>:<password>@<ip>:<port>'
    }
    r = requests.get('https://www.google.com/', proxies=proxies)
    print(r.status_code, "Proxy works")
except Exception as e:
    print(e)

I can provide more proxies if anyone's willing to test it.

Output for: python -m requests.help

{
  "chardet": {
    "version": null
  },
  "charset_normalizer": {
    "version": "2.0.10"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "3.3"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.10.2"
  },
  "platform": {
    "release": "10",
    "system": "Windows"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.27.1"
  },
  "system_ssl": {
    "version": "101010df"
  },
  "urllib3": {
    "version": "1.26.8"
  },
  "using_charset_normalizer": true,
  "using_pyopenssl": false
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source