refactor: новый класс XrayStorage без методов требующих классов User и Outbound
This commit is contained in:
@@ -157,3 +157,19 @@ class XrayConfig:
|
|||||||
self._save_json(self.inbounds_data[filename], path)
|
self._save_json(self.inbounds_data[filename], path)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
class XrayStorage:
|
||||||
|
def __init__(self, config_path: Path):
|
||||||
|
self.path = config_path
|
||||||
|
|
||||||
|
self.inbounds_files: list
|
||||||
|
self.outbound_files: list
|
||||||
|
self.routings_files: list
|
||||||
|
|
||||||
|
self.inbounds: list[dict]
|
||||||
|
self.outbouns: list[dict]
|
||||||
|
self.routings: list[dict]
|
||||||
|
|
||||||
|
def load_inbounds(self) -> list[dict]:
|
||||||
|
return self.inbounds
|
||||||
|
|||||||
Reference in New Issue
Block a user