Added auth and webmessages
This commit is contained in:
6
dragonion_core/proto/file/__init__.py
Normal file
6
dragonion_core/proto/file/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from .auth import AuthFile
|
||||
|
||||
|
||||
__all__ = [
|
||||
'AuthFile'
|
||||
]
|
||||
15
dragonion_core/proto/file/auth.py
Normal file
15
dragonion_core/proto/file/auth.py
Normal 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
|
||||
)
|
||||
Reference in New Issue
Block a user