rns 1.2.8__tar.gz → 1.2.9__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 (111) hide show
  1. {rns-1.2.8 → rns-1.2.9}/PKG-INFO +1 -1
  2. {rns-1.2.8 → rns-1.2.9}/RNS/Identity.py +11 -2
  3. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/pages.py +11 -4
  4. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/server.py +193 -75
  5. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnid.py +14 -0
  6. rns-1.2.9/RNS/_version.py +1 -0
  7. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/PKG-INFO +1 -1
  8. {rns-1.2.8 → rns-1.2.9}/setup.py +4 -0
  9. rns-1.2.8/RNS/_version.py +0 -1
  10. {rns-1.2.8 → rns-1.2.9}/CRNS/__init__.py +0 -0
  11. {rns-1.2.8 → rns-1.2.9}/README.md +0 -0
  12. {rns-1.2.8 → rns-1.2.9}/RNS/Buffer.py +0 -0
  13. {rns-1.2.8 → rns-1.2.9}/RNS/Channel.py +0 -0
  14. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/AES.py +0 -0
  15. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/Ed25519.py +0 -0
  16. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/HKDF.py +0 -0
  17. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/HMAC.py +0 -0
  18. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/Hashes.py +0 -0
  19. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/PKCS7.py +0 -0
  20. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/Provider.py +0 -0
  21. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/Proxies.py +0 -0
  22. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/SHA256.py +0 -0
  23. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/SHA512.py +0 -0
  24. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/Token.py +0 -0
  25. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/X25519.py +0 -0
  26. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/__init__.py +0 -0
  27. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/aes/__init__.py +0 -0
  28. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/aes/aes128.py +0 -0
  29. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/aes/aes256.py +0 -0
  30. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/pure25519/__init__.py +0 -0
  31. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/pure25519/_ed25519.py +0 -0
  32. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/pure25519/basic.py +0 -0
  33. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/pure25519/ed25519_oop.py +0 -0
  34. {rns-1.2.8 → rns-1.2.9}/RNS/Cryptography/pure25519/eddsa.py +0 -0
  35. {rns-1.2.8 → rns-1.2.9}/RNS/Destination.py +0 -0
  36. {rns-1.2.8 → rns-1.2.9}/RNS/Discovery.py +0 -0
  37. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/AX25KISSInterface.py +0 -0
  38. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/Android/KISSInterface.py +0 -0
  39. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/Android/RNodeInterface.py +0 -0
  40. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/Android/SerialInterface.py +0 -0
  41. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/Android/__init__.py +0 -0
  42. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/AutoInterface.py +0 -0
  43. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/BackboneInterface.py +0 -0
  44. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/I2PInterface.py +0 -0
  45. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/Interface.py +0 -0
  46. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/KISSInterface.py +0 -0
  47. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/LocalInterface.py +0 -0
  48. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/PipeInterface.py +0 -0
  49. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/RNodeInterface.py +0 -0
  50. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/RNodeMultiInterface.py +0 -0
  51. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/SerialInterface.py +0 -0
  52. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/TCPInterface.py +0 -0
  53. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/UDPInterface.py +0 -0
  54. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/WeaveInterface.py +0 -0
  55. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/__init__.py +0 -0
  56. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/util/__init__.py +0 -0
  57. {rns-1.2.8 → rns-1.2.9}/RNS/Interfaces/util/netinfo.py +0 -0
  58. {rns-1.2.8 → rns-1.2.9}/RNS/Link.py +0 -0
  59. {rns-1.2.8 → rns-1.2.9}/RNS/Packet.py +0 -0
  60. {rns-1.2.8 → rns-1.2.9}/RNS/Resolver.py +0 -0
  61. {rns-1.2.8 → rns-1.2.9}/RNS/Resource.py +0 -0
  62. {rns-1.2.8 → rns-1.2.9}/RNS/Reticulum.py +0 -0
  63. {rns-1.2.8 → rns-1.2.9}/RNS/Transport.py +0 -0
  64. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/__init__.py +0 -0
  65. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rncp.py +0 -0
  66. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/__init__.py +0 -0
  67. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/client.py +0 -0
  68. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/highlight.py +0 -0
  69. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/main.py +0 -0
  70. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rngit/util.py +0 -0
  71. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnir.py +0 -0
  72. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnodeconf.py +0 -0
  73. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnpath.py +0 -0
  74. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnpkg.py +0 -0
  75. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnprobe.py +0 -0
  76. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsd.py +0 -0
  77. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/__init__.py +0 -0
  78. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/_version.py +0 -0
  79. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/args.py +0 -0
  80. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/exception.py +0 -0
  81. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/helpers.py +0 -0
  82. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/initiator.py +0 -0
  83. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/listener.py +0 -0
  84. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/loop.py +0 -0
  85. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/process.py +0 -0
  86. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/protocol.py +0 -0
  87. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/retry.py +0 -0
  88. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/rnsh.py +0 -0
  89. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnsh/session.py +0 -0
  90. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnstatus.py +0 -0
  91. {rns-1.2.8 → rns-1.2.9}/RNS/Utilities/rnx.py +0 -0
  92. {rns-1.2.8 → rns-1.2.9}/RNS/__init__.py +0 -0
  93. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/__init__.py +0 -0
  94. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/configobj.py +0 -0
  95. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/__init__.py +0 -0
  96. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/__version__.py +0 -0
  97. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/aiosam.py +0 -0
  98. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/exceptions.py +0 -0
  99. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/log.py +0 -0
  100. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/sam.py +0 -0
  101. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/tunnel.py +0 -0
  102. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/i2plib/utils.py +0 -0
  103. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/platformutils.py +0 -0
  104. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/umsgpack.py +0 -0
  105. {rns-1.2.8 → rns-1.2.9}/RNS/vendor/validate.py +0 -0
  106. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/SOURCES.txt +0 -0
  107. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/dependency_links.txt +0 -0
  108. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/entry_points.txt +0 -0
  109. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/requires.txt +0 -0
  110. {rns-1.2.8 → rns-1.2.9}/rns.egg-info/top_level.txt +0 -0
  111. {rns-1.2.8 → rns-1.2.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rns
3
- Version: 1.2.8
3
+ Version: 1.2.9
4
4
  Summary: Self-configuring, encrypted and resilient mesh networking stack for LoRa, packet radio, WiFi and everything in between
5
5
  Home-page: https://reticulum.network/
6
6
  Author: Mark Qvist
@@ -212,8 +212,17 @@ class Identity:
212
212
  RNS.log("Skipped recombining known destinations from disk, since an error occurred: "+str(e), RNS.LOG_WARNING)
213
213
 
214
214
  RNS.log("Saving "+str(len(Identity.known_destinations))+" known destinations to storage...", RNS.LOG_VERBOSE)
215
- with open(RNS.Reticulum.storagepath+"/known_destinations","wb") as file:
216
- umsgpack.dump(Identity.known_destinations.copy(), file)
215
+ temp_file = RNS.Reticulum.storagepath+f"/known_destinations.tmp.{time.time()}"
216
+
217
+ try:
218
+ with open(temp_file,"wb") as file: umsgpack.dump(Identity.known_destinations.copy(), file)
219
+ os.rename(temp_file, RNS.Reticulum.storagepath+f"/known_destinations")
220
+
221
+ except Exception as e:
222
+ RNS.log(f"Error while serializing and writing known destinations: {e}", RNS.LOG_ERROR)
223
+ try: os.unlink(temp_file)
224
+ except Exception as e: RNS.log(f"Could not clean up temporary file {temp_file}: {e}", RNS.LOG_WARNING)
225
+ raise e
217
226
 
218
227
  save_time = time.time() - save_start
219
228
  if save_time < 1: time_str = str(round(save_time*1000,2))+"ms"
@@ -864,7 +864,7 @@ class NomadNetworkNode():
864
864
  author = commit["author"]
865
865
  date = self.format_absolute_time(commit["timestamp"])+" - "+self.format_relative_time(commit["timestamp"])
866
866
 
867
- hash_link = self.m_link(short_hash, self.PATH_COMMIT, g=group_name, r=repo_name, h=commit["hash"])
867
+ hash_link = self.m_link(short_hash, self.PATH_COMMIT, g=group_name, r=repo_name, ref=ref, h=commit["hash"])
868
868
 
869
869
  content_parts.append(f"`F66d{hash_link}`f {self.m_escape(author)} {self.CLR_DIM}{date}`f\n")
870
870
  content_parts.append(f"{self.m_escape(subject)}\n\n")
@@ -891,6 +891,7 @@ class NomadNetworkNode():
891
891
  if not data or not type(data) == dict: data = {}
892
892
  group_name = data.get("var_g", "") if data else ""
893
893
  repo_name = data.get("var_r", "") if data else ""
894
+ ref = data.get("var_ref", "HEAD") if data else "HEAD"
894
895
  commit_hash = data.get("var_h", "") if data else ""
895
896
 
896
897
  if not group_name or not repo_name:
@@ -904,6 +905,12 @@ class NomadNetworkNode():
904
905
 
905
906
  repo_path = repo["path"]
906
907
 
908
+ # Validate ref exists
909
+ resolved_ref = self.resolve_ref(repo_path, ref)
910
+ if not resolved_ref:
911
+ content = self.m_heading("Ref Not Found", 1) + f"\n\nThe ref '{ref}' does not exist in this repository.\n"
912
+ return self.render_template(content, st=st)
913
+
907
914
  # Validate commit hash
908
915
  if not commit_hash or len(commit_hash) < 7:
909
916
  content = self.m_heading("Error", 2) + "\nNo valid commit hash specified.\n"
@@ -917,7 +924,7 @@ class NomadNetworkNode():
917
924
 
918
925
  # Breadcrumb navigation
919
926
  nav_parts = []
920
- breadcrumb = f"{self.m_link('Node', self.PATH_INDEX)} / {self.m_link(group_name, self.PATH_GROUP, g=group_name)} / {self.m_link(repo_name, self.PATH_REPO, g=group_name, r=repo_name)} / {resolved_hash[:7]}"
927
+ breadcrumb = f"{self.m_link('Node', self.PATH_INDEX)} / {self.m_link(group_name, self.PATH_GROUP, g=group_name)} / {self.m_link(repo_name, self.PATH_REPO, g=group_name, r=repo_name)} / {self.m_link('commits', self.PATH_COMMITS, g=group_name, r=repo_name, ref=ref)} / {resolved_hash[:7]}"
921
928
  nav_parts.append(">>\n" + breadcrumb + "\n")
922
929
  nav_content = "".join(nav_parts)
923
930
 
@@ -955,7 +962,7 @@ class NomadNetworkNode():
955
962
  if commit_info.get("parents"):
956
963
  parent_links = []
957
964
  for parent_hash in commit_info["parents"]:
958
- parent_link = self.m_link(parent_hash[:7], self.PATH_COMMIT, g=group_name, r=repo_name, h=parent_hash)
965
+ parent_link = self.m_link(parent_hash[:7], self.PATH_COMMIT, g=group_name, r=repo_name, ref=ref, h=parent_hash)
959
966
  parent_links.append(parent_link)
960
967
 
961
968
  content_parts.append(f"Parents: {' '.join(parent_links)}\n")
@@ -2465,7 +2472,7 @@ class NomadNetworkNode():
2465
2472
  line = "│"
2466
2473
  for val in data:
2467
2474
  upper_filled = val >= row_top
2468
- lower_filled = val >= row_mid
2475
+ lower_filled = val >= row_mid or row == 1 and val > 0
2469
2476
 
2470
2477
  if not upper_filled and not lower_filled: line += " "
2471
2478
  elif upper_filled: line += f"`FT{gradient_color(grad_top)}`BT{gradient_color(grad_mid)}▀`f`b"