unitlab 2.3.36__tar.gz → 2.3.38__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unitlab-2.3.36/src/unitlab.egg-info → unitlab-2.3.38}/PKG-INFO +1 -1
- {unitlab-2.3.36 → unitlab-2.3.38}/setup.py +1 -1
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/main.py +1 -1
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/persistent_tunnel.py +19 -4
- {unitlab-2.3.36 → unitlab-2.3.38/src/unitlab.egg-info}/PKG-INFO +1 -1
- {unitlab-2.3.36 → unitlab-2.3.38}/LICENSE.md +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/README.md +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/setup.cfg +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/__init__.py +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/__main__.py +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/client.py +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/exceptions.py +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab/utils.py +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab.egg-info/SOURCES.txt +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab.egg-info/dependency_links.txt +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab.egg-info/entry_points.txt +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab.egg-info/requires.txt +0 -0
- {unitlab-2.3.36 → unitlab-2.3.38}/src/unitlab.egg-info/top_level.txt +0 -0
@@ -32,8 +32,7 @@ class PersistentTunnel:
|
|
32
32
|
# Cloudflare credentials (hardcoded for simplicity)
|
33
33
|
|
34
34
|
self.cf_api_key = "RoIAn1t9rMqcGK7_Xja216pxbRTyFafC1jeRKIO3"
|
35
|
-
|
36
|
-
# Account and Zone IDs
|
35
|
+
|
37
36
|
self.cf_account_id = "29df28cf48a30be3b1aa344b840400e6" # Your account ID
|
38
37
|
self.cf_zone_id = "eae80a730730b3b218a80dace996535a" # Zone ID for unitlab-ai.com
|
39
38
|
|
@@ -201,9 +200,25 @@ class PersistentTunnel:
|
|
201
200
|
if ssh_response.status_code in [200, 201]:
|
202
201
|
print("✅ SSH DNS record created: {}.{}".format(self.ssh_subdomain, self.domain))
|
203
202
|
elif "already exists" in ssh_response.text:
|
204
|
-
print("⚠️ SSH DNS record already exists
|
203
|
+
print("⚠️ SSH DNS record already exists, deleting and recreating...")
|
204
|
+
# Delete the old record and create new one
|
205
|
+
list_url = "{}?name={}.{}".format(url, self.ssh_subdomain, self.domain)
|
206
|
+
list_response = requests.get(list_url, headers=headers)
|
207
|
+
if list_response.status_code == 200:
|
208
|
+
records = list_response.json().get("result", [])
|
209
|
+
if records:
|
210
|
+
record_id = records[0]["id"]
|
211
|
+
delete_url = "{}/{}".format(url, record_id)
|
212
|
+
requests.delete(delete_url, headers=headers)
|
213
|
+
print("Deleted old SSH DNS record")
|
214
|
+
# Try again
|
215
|
+
ssh_response = requests.post(url, headers=headers, json=ssh_data)
|
216
|
+
if ssh_response.status_code in [200, 201]:
|
217
|
+
print("✅ SSH DNS record recreated: {}.{}".format(self.ssh_subdomain, self.domain))
|
218
|
+
else:
|
219
|
+
print("❌ Failed to recreate SSH DNS: {}".format(ssh_response.text[:200]))
|
205
220
|
else:
|
206
|
-
print("
|
221
|
+
print("❌ Could not create SSH DNS: {}".format(ssh_response.text[:200]))
|
207
222
|
# SSH is optional, so we continue even if SSH DNS fails
|
208
223
|
|
209
224
|
return True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|