Skip to content

HTTPS proxy validity #4

@Ch41r05

Description

@Ch41r05

Hi Vakhov,

Thanks for your efforts to make a comprehensive working proxies repo!
I'm trying to check working https proxies like this:

import requests

url = "https://raw.githubusercontent.com/vakhov/fresh-proxy-list/refs/heads/master/https.txt"
proxies = requests.get(url).text.splitlines()

for proxy in proxies:
  try:
    response = requests.get(r"https://httpbin.org/ip", proxies={"https": proxy})
    print(response.text)
  except Exception as e:
    print(e)

Sadly it seems that most of the http proxies have ConnectionTimoutError or OSError (Tunnel conection failed: 403 Forbidden) when checked against that site.
How do you test these proxies to check that their valid and working?
I'm curious since I'm working on a project to learn ho proxies work for connections and I'm a bit confused on how a proxy can be valid but not working against a site that seems quite soft on proxy limitation.

Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions