Skip to content

Commit

Permalink
remove host info
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrtye committed Dec 17, 2023
1 parent d7921af commit 6fc8b08
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions submanager/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
USERNAME = os.environ.get("USERNAME")
PASSWORD = os.environ.get("PASSWORD")

HOST_URL = os.environ.get("HOST_URL")

LOGIN_URL = os.environ.get("LOGIN_URL")
INBOUND_URL = os.environ.get("INBOUND_URL")

if USERNAME is None or PASSWORD is None or LOGIN_URL is None or INBOUND_URL is None:
if USERNAME is None or PASSWORD is None or LOGIN_URL is None or INBOUND_URL is None or HOST_URL is None:
print("Environment variables not fulfilled")


Expand All @@ -40,11 +42,11 @@ def get_credentials():

results = []
for inbound in response.json()["obj"]:
uuid = json.loads(inbound["settings"])["clients"][0]["id"]
client = {
"name": inbound["remark"],
"uuid": json.loads(inbound["settings"])["clients"][0]["id"],
"host": json.loads(inbound["settings"])["clients"][0]["id"][0:5]
+ ".sgrtye.tk",
"uuid": uuid,
"host": uuid[0:5] + HOST_URL,
"port": str(inbound["port"]),
"path": json.loads(inbound["streamSettings"])["wsSettings"]["path"][1:],
}
Expand Down

0 comments on commit 6fc8b08

Please sign in to comment.