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