akashcli 4.5.1__tar.gz → 4.5.2__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.
Files changed (31) hide show
  1. {akashcli-4.5.1 → akashcli-4.5.2}/PKG-INFO +1 -1
  2. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/relay.py +20 -6
  3. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/PKG-INFO +1 -1
  4. {akashcli-4.5.1 → akashcli-4.5.2}/pyproject.toml +1 -1
  5. {akashcli-4.5.1 → akashcli-4.5.2}/README.md +0 -0
  6. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/__init__.py +0 -0
  7. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/auth.py +0 -0
  8. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/cli.py +0 -0
  9. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/client.py +0 -0
  10. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/config.py +0 -0
  11. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/crypto.py +0 -0
  12. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/env_manager.py +0 -0
  13. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/exceptions.py +0 -0
  14. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/exec.py +0 -0
  15. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/integrity.py +0 -0
  16. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/logger.py +0 -0
  17. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/models.py +0 -0
  18. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/p2p.py +0 -0
  19. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/packages.py +0 -0
  20. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/restore.py +0 -0
  21. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/snapshot_crypto.py +0 -0
  22. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/storage.py +0 -0
  23. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/terminal.py +0 -0
  24. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/uploader.py +0 -0
  25. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli/utils.py +0 -0
  26. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/SOURCES.txt +0 -0
  27. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/dependency_links.txt +0 -0
  28. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/entry_points.txt +0 -0
  29. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/requires.txt +0 -0
  30. {akashcli-4.5.1 → akashcli-4.5.2}/akashcli.egg-info/top_level.txt +0 -0
  31. {akashcli-4.5.1 → akashcli-4.5.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.5.1
3
+ Version: 4.5.2
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -558,17 +558,31 @@ def guest_serve(base_url: str) -> None:
558
558
  Security: every incoming connection shows the guest IP + fingerprint
559
559
  and asks the host to approve before the shell is bridged.
560
560
  """
561
- import httpx
562
561
  import websockets.sync.client as _ws
563
562
 
564
- # 1. Get a pairing code
563
+ # 1. Get a pairing code — try httpx first, fall back to urllib (system certs)
564
+ def _post_code(url: str) -> dict:
565
+ try:
566
+ import httpx as _hx
567
+ r = _hx.post(url, timeout=10)
568
+ r.raise_for_status()
569
+ return r.json()
570
+ except Exception:
571
+ pass
572
+ # urllib fallback — uses system CA bundle, works on Android/Termux
573
+ import urllib.request as _ur, urllib.error as _ue
574
+ req = _ur.Request(url, data=b"", method="POST")
575
+ with _ur.urlopen(req, timeout=10) as resp:
576
+ import json as _j
577
+ return _j.loads(resp.read())
578
+
565
579
  try:
566
- r = httpx.post(_guest_code_url(base_url), timeout=10)
567
- r.raise_for_status()
568
- code = r.json()["code"]
569
- ttl = r.json().get("expires_in", 600)
580
+ data = _post_code(_guest_code_url(base_url))
581
+ code = data["code"]
582
+ ttl = data.get("expires_in", 600)
570
583
  except Exception as e:
571
584
  print(f" {_R}✗{_RS} could not get pairing code: {e}", file=sys.stderr)
585
+ print(f" {_DM}Make sure you can reach {base_url}{_RS}", file=sys.stderr)
572
586
  return
573
587
 
574
588
  print()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.5.1
3
+ Version: 4.5.2
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "akashcli"
3
- version = "4.5.1"
3
+ version = "4.5.2"
4
4
  description = "Akash CLI — secure remote shell relay, file vault, and device management"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes