diff --git a/.vscode/settings.json b/.vscode/settings.json index 1f75857..457f44d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,3 @@ { - "python.linting.pycodestyleEnabled": true, - "python.linting.enabled": true, "python.analysis.typeCheckingMode": "basic" } \ No newline at end of file diff --git a/cogs/other.py b/cogs/other.py index 2cb234d..38b8b6d 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -854,13 +854,13 @@ class OtherCog(commands.Cog): @staticmethod async def check_proxy(url: str = "socks5://localhost:1090"): - client = httpx.AsyncClient(http2=True) + client = httpx.AsyncClient(http2=True, timeout=3) my_ip4 = (await client.get("https://api.ipify.org")).text real_ips = [my_ip4] await client.aclose() # Check the proxy - client = httpx.AsyncClient(http2=True, proxies=url) + client = httpx.AsyncClient(http2=True, proxies=url, timeout=3) try: response = await client.get( "https://1.1.1.1/cdn-cgi/trace",