unitlab 2.3.23__py3-none-any.whl → 2.3.26__py3-none-any.whl

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/client.py CHANGED
@@ -287,7 +287,7 @@ class UnitlabClient:
287
287
  # This provides better SSH/Jupyter separation with j/s prefixes
288
288
  try:
289
289
  logger.info("Using API-based Cloudflare tunnel management")
290
- self.tunnel_manager = CloudflareAPITunnel(base_domain, device_id)
290
+ self.tunnel_manager = CloudflareAPITunnel(device_id, base_domain)
291
291
  self.jupyter_url = self.tunnel_manager.jupyter_url
292
292
  self.ssh_url = self.tunnel_manager.ssh_url
293
293
  except Exception as e:
@@ -45,7 +45,7 @@ class CloudflareAPITunnel:
45
45
 
46
46
  # Hardcoded Cloudflare credentials
47
47
  self.account_id = "c91192ae20a5d43f65e087550d8dc89b"
48
- self.api_token = "xkfCGvxHeiU7xvz0OhfYUICZvJ7rM4NmgdMSB5jy"
48
+ self.api_token = "LJLe6QMOtpN0MeuLQ05_zUKKxVm4vEibkC8lxSJd"
49
49
  self.zone_id = "f17ca0e9cf056e87afb019c88f936ac9"
50
50
 
51
51
  # API configuration
@@ -128,6 +128,18 @@ class CloudflareAPITunnel:
128
128
  unique_id = str(uuid.uuid4())[:8]
129
129
  tunnel_name = f"device-{self.clean_device_id}-{unique_id}"
130
130
 
131
+ # Update clean_device_id to include UUID for DNS records
132
+ self.clean_device_id_with_uuid = f"{self.clean_device_id}{unique_id}"
133
+
134
+ # Update subdomains with UUID
135
+ self.jupyter_subdomain = f"j{self.clean_device_id_with_uuid}"
136
+ self.ssh_subdomain = f"s{self.clean_device_id_with_uuid}"
137
+
138
+ # Update URLs with new subdomains
139
+ self.jupyter_url = f"https://{self.jupyter_subdomain}.{self.base_domain}"
140
+ self.ssh_hostname = f"{self.ssh_subdomain}.{self.base_domain}"
141
+ self.ssh_url = self.ssh_hostname # Backward compatibility
142
+
131
143
  print(f"📦 Creating new tunnel: {tunnel_name}")
132
144
 
133
145
  create_url = f"{self.api_base}/accounts/{self.account_id}/tunnels"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unitlab
3
- Version: 2.3.23
3
+ Version: 2.3.26
4
4
  Home-page: https://github.com/teamunitlab/unitlab-sdk
5
5
  Author: Unitlab Inc.
6
6
  Author-email: team@unitlab.ai
@@ -1,17 +1,17 @@
1
1
  unitlab/__init__.py,sha256=Wtk5kQ_MTlxtd3mxJIn2qHVK5URrVcasMMPjD3BtrVM,214
2
2
  unitlab/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
3
  unitlab/binary_manager.py,sha256=Q1v2Odm0hk_3g7jfDUJQfkjEbUbSjtuyo2JDUyWjDrk,5468
4
- unitlab/client.py,sha256=V5fTgbprmMsnMwD_FPn7oZh0KK6hdnqB4BYuY4D-JRw,24558
5
- unitlab/cloudflare_api_tunnel.py,sha256=M9dvp75ljTJ_RHt4SUb4fj87hITgcDW-awaiSjEawvE,13455
4
+ unitlab/client.py,sha256=HUQnBSMSk3RhR_Qwb_hVteuXGAZ43shF2-5k4vGELoE,24558
5
+ unitlab/cloudflare_api_tunnel.py,sha256=XgDOQ-ISNDAJOlbKp96inGix3An_eBnAQ2pORcGBM40,14061
6
6
  unitlab/cloudflare_api_tunnel_backup.py,sha256=dG5Vax0JqrF2i-zxAFB-kNGyVSFR01-ovalwuJELqpo,28489
7
7
  unitlab/exceptions.py,sha256=68Tr6LreEzjQ3Vns8HAaWdtewtkNUJOvPazbf6NSnXU,950
8
8
  unitlab/main.py,sha256=7gPZ_2n90sxDnq9oGZVKOkuifr-k7w2Tq3ZIldAUE8I,5877
9
9
  unitlab/tunnel_config.py,sha256=7CiAqasfg26YQfJYXapCBQPSoqw4jIx6yR64saybLLo,8312
10
10
  unitlab/tunnel_service_token.py,sha256=ji96a4s4W2cFJrHZle0zBD85Ac_T862-gCKzBUomrxM,3125
11
11
  unitlab/utils.py,sha256=83ekAxxfXecFTg76Z62BGDybC_skKJHYoLyawCD9wGM,1920
12
- unitlab-2.3.23.dist-info/LICENSE.md,sha256=Gn7RRvByorAcAaM-WbyUpsgi5ED1-bKFFshbWfYYz2Y,1069
13
- unitlab-2.3.23.dist-info/METADATA,sha256=c77jLwAUW6zVuKoB9l9xSq6kvz_4AIb7mdzJNeox62s,844
14
- unitlab-2.3.23.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
15
- unitlab-2.3.23.dist-info/entry_points.txt,sha256=ig-PjKEqSCj3UTdyANgEi4tsAU84DyXdaOJ02NHX4bY,45
16
- unitlab-2.3.23.dist-info/top_level.txt,sha256=Al4ZlTYE3fTJK2o6YLCDMH5_DjuQkffRBMxgmWbKaqQ,8
17
- unitlab-2.3.23.dist-info/RECORD,,
12
+ unitlab-2.3.26.dist-info/LICENSE.md,sha256=Gn7RRvByorAcAaM-WbyUpsgi5ED1-bKFFshbWfYYz2Y,1069
13
+ unitlab-2.3.26.dist-info/METADATA,sha256=TF74xe3wSNg3DliLbBbuGvOREfyqa94he4iCmWelTgA,844
14
+ unitlab-2.3.26.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
15
+ unitlab-2.3.26.dist-info/entry_points.txt,sha256=ig-PjKEqSCj3UTdyANgEi4tsAU84DyXdaOJ02NHX4bY,45
16
+ unitlab-2.3.26.dist-info/top_level.txt,sha256=Al4ZlTYE3fTJK2o6YLCDMH5_DjuQkffRBMxgmWbKaqQ,8
17
+ unitlab-2.3.26.dist-info/RECORD,,