MCPcopy Create free account
hub / github.com/Vinyzu/Botright / split_proxy

Method split_proxy

botright/modules/proxy_manager.py:90–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

88 raise SplitError(f"Proxy Format ({self.proxy}) isnt supported")
89
90 def split_proxy(self) -> None:
91 split_proxy = self.proxy.split(":")
92 if len(split_proxy) == 2:
93 self.ip, self.port = split_proxy
94 elif len(split_proxy) == 3:
95 if "@" in self.proxy:
96 helper = [_.split(":") for _ in self.proxy.split("@")]
97 split_proxy = [x for y in helper for x in y]
98 self.split_helper(split_proxy)
99 else:
100 raise SplitError(f"Proxy Format ({self.proxy}) isnt supported")
101 elif len(split_proxy) == 4:
102 self.split_helper(split_proxy)
103 else:
104 raise SplitError(f"Proxy Format ({self.proxy}) isnt supported")
105
106 async def check_proxy(self, httpx_client: httpx.AsyncClient) -> None:
107 """

Callers 1

__ainit__Method · 0.95

Calls 2

split_helperMethod · 0.95
SplitErrorClass · 0.85

Tested by

no test coverage detected