Skip to content

Commit

Permalink
integrate gocrypt into Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Germar authored and daviewales committed Oct 8, 2024
1 parent 1548ca0 commit 8854b12
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import logger
import sshtools
import encfstools
import gocryptfstools
import password
import pluginmanager
import schedule
Expand Down Expand Up @@ -275,7 +276,7 @@ def __init__(self, config_path=None, data_path=None):
sshtools.SSH, _('SSH'), _('SSH private key'), False),
'local_encfs': (
encfstools.EncFS_mount,
_('Local encrypted'),
_('Local encrypted') + ' (EncFS)',
_('Encryption'),
False
),
Expand All @@ -284,7 +285,13 @@ def __init__(self, config_path=None, data_path=None):
_('SSH encrypted'),
_('SSH private key'),
_('Encryption')
)
),
'local_gocryptfs':(
gocryptfstools.GoCryptFS_mount,
_('Local encrypted') + ' (gocryptfs)',
_('Encryption'),
False
),
}

self.SSH_CIPHERS = {
Expand Down Expand Up @@ -712,6 +719,14 @@ def localEncfsPath(self, profile_id = None):
def setLocalEncfsPath(self, value, profile_id = None):
self.setProfileStrValue('snapshots.local_encfs.path', value, profile_id)

# gocryptfs
def localGocryptfsPath(self, profile_id = None):
#?Where to save snapshots in mode 'local_gocryptfs'.;absolute path
return self.profileStrValue('snapshots.local_gocryptfs.path', '', profile_id)

def setLocalGocryptfsPath(self, value, profile_id = None):
self.setProfileStrValue('snapshots.local_gocryptfs.path', value, profile_id)

def passwordSave(self, profile_id = None, mode = None):
if mode is None:
mode = self.snapshotsMode(profile_id)
Expand Down

0 comments on commit 8854b12

Please sign in to comment.