From 74e0d08afcbe1126b0a9302b24537d25a9d6d106 Mon Sep 17 00:00:00 2001 From: Nongzhsh Date: Mon, 18 Nov 2024 10:57:22 +0800 Subject: [PATCH] pythonlib: Proxy credentials are now optional --- pythonlib/camoufox/ip.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pythonlib/camoufox/ip.py b/pythonlib/camoufox/ip.py index 0a09ae5..b1dc976 100644 --- a/pythonlib/camoufox/ip.py +++ b/pythonlib/camoufox/ip.py @@ -22,8 +22,8 @@ class Proxy: """ server: str - username: str - password: str + username: Optional[str] = None + password: Optional[str] = None @staticmethod def parse_server(server: str) -> Tuple[str, str, Optional[str]]: @@ -44,8 +44,9 @@ class Proxy: result += f"{self.username}" if self.password: result += f":{self.password}" + result += "@" - result += f"@{url}" + result += url if port: result += f":{port}" return result