mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 06:36:14 -04:00
Proof handling
This commit is contained in:
parent
dedea6ba11
commit
19d9b1a4a5
9 changed files with 283 additions and 58 deletions
|
@ -29,6 +29,7 @@ class Reticulum:
|
|||
Reticulum.cachepath = Reticulum.configdir+"/storage/cache"
|
||||
|
||||
Reticulum.__allow_unencrypted = False
|
||||
Reticulum.__use_implicit_proof = False
|
||||
|
||||
if not os.path.isdir(Reticulum.storagepath):
|
||||
os.makedirs(Reticulum.storagepath)
|
||||
|
@ -50,6 +51,8 @@ class Reticulum:
|
|||
RNS.Identity.loadKnownDestinations()
|
||||
Reticulum.router = self
|
||||
|
||||
RNS.Transport.scheduleJobs()
|
||||
|
||||
atexit.register(RNS.Identity.exitHandler)
|
||||
|
||||
def applyConfig(self):
|
||||
|
@ -66,6 +69,11 @@ class Reticulum:
|
|||
if "reticulum" in self.config:
|
||||
for option in self.config["reticulum"]:
|
||||
value = self.config["reticulum"][option]
|
||||
if option == "use_implicit_proof":
|
||||
if value == "true":
|
||||
Reticulum.__use_implicit_proof = True
|
||||
if value == "false":
|
||||
Reticulum.__use_implicit_proof = False
|
||||
if option == "allow_unencrypted":
|
||||
if value == "true":
|
||||
RNS.log("", RNS.LOG_CRITICAL)
|
||||
|
@ -259,4 +267,8 @@ class Reticulum:
|
|||
|
||||
@staticmethod
|
||||
def should_allow_unencrypted():
|
||||
return Reticulum.__allow_unencrypted
|
||||
return Reticulum.__allow_unencrypted
|
||||
|
||||
@staticmethod
|
||||
def should_use_implicit_proof():
|
||||
return Reticulum.__use_implicit_proof
|
Loading…
Add table
Add a link
Reference in a new issue