mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 09:42:05 -08:00
pythonlib: Proxy credentials are now optional
This commit is contained in:
parent
d1bc5f7644
commit
74e0d08afc
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue