From 515ee62836cf4eb31fb644e9387d1af28b874c90 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 4 Jun 2021 10:45:30 +0200 Subject: [PATCH] fix logic for direct connection --- backend/stream.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/stream.py b/backend/stream.py index 803e514..d79dde6 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -98,9 +98,11 @@ class UpstreamHandler(): def __init__(self): self.provider = None self.valid = False - self.proxy = None + self.proxy = ProxyElem(None) self.upstream = None async def test_socks(self, proxy): + if not isinstance(proxy, str): + return True try: splitted = proxy.rsplit(":", 1) host = proxy