try again
This commit is contained in:
		@@ -101,10 +101,10 @@ class UpstreamHandler():
 | 
			
		||||
        self.proxy = ProxyElem(None)
 | 
			
		||||
        self.upstream = None
 | 
			
		||||
    async def test_socks(self, proxy):
 | 
			
		||||
        if not isinstance(proxy, str):
 | 
			
		||||
        if not hasattr(proxy, "proxy") or not isinstance(proxy.proxy, str):
 | 
			
		||||
            return (True, ProxyElem(None))
 | 
			
		||||
        try:
 | 
			
		||||
            splitted = proxy.rsplit(":", 1)
 | 
			
		||||
            splitted = proxy.proxy.rsplit(":", 1)
 | 
			
		||||
            host = proxy
 | 
			
		||||
            port = 1080
 | 
			
		||||
            if len(splitted) == 2:
 | 
			
		||||
@@ -130,7 +130,7 @@ class UpstreamHandler():
 | 
			
		||||
            if isinstance(proxy_list, list):
 | 
			
		||||
                futures = []
 | 
			
		||||
                for current in proxy_list:
 | 
			
		||||
                    future = asyncio.create_task(self.test_socks(current.proxy))
 | 
			
		||||
                    future = asyncio.create_task(self.test_socks(current))
 | 
			
		||||
                    futures.append(future)
 | 
			
		||||
                for future in asyncio.as_completed(futures):
 | 
			
		||||
                    success, current = await future
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user