Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrectly report 'Transparent' #7

Open
gobbedy opened this issue Feb 24, 2021 · 1 comment
Open

incorrectly report 'Transparent' #7

gobbedy opened this issue Feb 24, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@gobbedy
Copy link

gobbedy commented Feb 24, 2021

Great tool, thank you!

Recently, I've often been getting a timeout from https://api.ipify.org/ -- the proxy-checker incorrectly reports the anonymity as Transparent when that is the case. From the send_query code:

        try:
            c.perform()
        except Exception as e:
            # print(e)
            return False

        # Return False if the status is not 200
        if c.getinfo(c.HTTP_CODE) != 200:
            return False

Thus when https://api.ipify.org returns an error code, the returned value from send_query is False

        r = self.send_query(url='https://api.ipify.org/')

        if not r:
            return ""

This results in self.ip being set to an empty string, and later:

        if self.ip in r:
            return 'Transparent'

When an empty string is inevitably found in the response from the proxy judge, the anonymity is incorrectly set to transparent

@ricerati
Copy link
Owner

Thanks for the report! I'll add more IP APIs in case something happens to Ipify and resend requests to make sure the IP is always obtained.

@ricerati ricerati added the bug Something isn't working label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants