Vinyzu / DiscordGenerator

Dislock, the most advanced Discord Browser Generator. Powered by hCaptcha Solving AI.
GNU General Public License v3.0
214 stars 55 forks source link

proxy issue #49

Closed fdsggfd closed 1 year ago

fdsggfd commented 1 year ago

"Could not get GeoInformation from proxy (Proxy is Invalid/Failed Check" Everytime despite using good proxy

Vinyzu commented 1 year ago

What proxy type and format are you using?

fdsggfd commented 1 year ago

What proxy type and format are you using?

hi. Im using https. http and ive tried socks5 too with ip:port format. Ive noticed it doesnt show the error if i used other proxies that have username and password in the format

fdsggfd commented 1 year ago

im not a programmer i dont know coding but i was thinking its probably the way the proxy format is split and then loaded onto http://ip-api.com/json/ - this api doesnt accept :port but you know that already although im probably wrong.

Vinyzu commented 1 year ago

It should actually. Did u remove the http:// / https:// in front of the proxy?

fdsggfd commented 1 year ago

yes i did remove it. format is just ip:port but have a look at this: (random ip address) http://ip-api.com/json/37.99.224.225:7497 http://ip-api.com/json/37.99.224.225

the request with :port is invalid for some reason the documentation for this API says The API base path is http://ip-api.com/json/{query}

{query} can be a single IPv4/IPv6 address or a domain name. If you don't supply a query the current IP address will be used. So maybe the fix could be removing {ip} from the query so that it displays the proxy in use ( although i think that would make a few lines of code above that retrieve IP redundant)

Vinyzu commented 1 year ago

Oh ok ill have a look

FuckingToasters commented 1 year ago

I hope that helps, this is the proxysupport code i made a while ago for my discord phone verifier.

import pystyle
class loadproxyclass:
    def loadproxy(self, proxytype):
        with open("files/proxies.txt", "r") as proxy_file:
            proxies = proxy_file.read().splitlines()
            proxy_split = "None"
            for proxy in proxies: proxy_split = proxy.split(":")
            try:
                host_name, port, username, password = proxy_split[0], proxy_split[1], proxy_split[2], proxy_split[3]
                proxy_formatted = f"{proxytype}://{username}:{password}@{host_name}:{port}"
                if proxytype != "": proxyauth = {"all://": proxy_formatted}
                else: proxyauth = {"all://": None}

            except IndexError:
                try:
                    host_name, port = proxy_split[0], proxy_split[1]
                    proxy_formatted = f"{proxytype}://{host_name}:{port}"
                    if proxytype != "": proxyauth = {"all://": proxy_formatted}
                    else: proxyauth = {"all://": None}

                except IndexError:
                    pystyle.Write.Print("\t[*] Proxies inside files/proxies.txt are not formatted correctly (IP:PORT or IP:PORT:USER:PASS)!\n", pystyle.Colors.yellow, interval=0)
                    proxyauth = {"all://": None}

            return proxyauth

Code is located here for refrence: https://github.com/FuckingToasters/discord-phone-verifier/blob/main/new%20version/plugins/filesupport/proxy.py

Vinyzu commented 1 year ago

Should be fixxed in newest version v2.0: https://github.com/Vinyzu/DiscordGenerator/commit/756939fa6a02453a54691ec398971f1f8f67eacf

If not, create an issue at the Botright project.