mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 16:42:04 -08:00
fix: Merge pull request #84 from Nongzhsh/patch-1
Proxy credentials should be optional.
This commit is contained in:
commit
79d4ba7b9f
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