Added auth and webmessages

This commit is contained in:
BarsTiger
2023-07-16 23:52:18 +03:00
commit 90c8cbb4a1
9 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import sqlitedict
class AuthFile(sqlitedict.SqliteDict):
"""
Valid AuthFile has fields:
host - .onion url of service
auth - v3 onion auth string in format, that can be written to .auth_private file
"""
def __init__(self, service):
super().__init__(
filename=f'{service}.auth',
tablename='auth',
autocommit=True
)