mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-10 18:32:06 -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
|
server: str
|
||||||
username: str
|
username: Optional[str] = None
|
||||||
password: str
|
password: Optional[str] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_server(server: str) -> Tuple[str, str, Optional[str]]:
|
def parse_server(server: str) -> Tuple[str, str, Optional[str]]:
|
||||||
|
|
@ -44,8 +44,9 @@ class Proxy:
|
||||||
result += f"{self.username}"
|
result += f"{self.username}"
|
||||||
if self.password:
|
if self.password:
|
||||||
result += f":{self.password}"
|
result += f":{self.password}"
|
||||||
|
result += "@"
|
||||||
|
|
||||||
result += f"@{url}"
|
result += url
|
||||||
if port:
|
if port:
|
||||||
result += f":{port}"
|
result += f":{port}"
|
||||||
return result
|
return result
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue