Replace WireGuard prototype with native host service and scoped access
This commit is contained in:
1 parent
37b5394df1
commit
11f16ef4a3
16 files changed
+667
-136
No files matched your search
+2
-2
@@ -5,10 +5,10 @@ import sys
|
||||
|
||||
SOCKET = '/run/deck/control.sock'
|
||||
|
||||
def request(data):
|
||||
def request(data, path=SOCKET):
|
||||
with socket.socket(socket.AF_UNIX) as sock:
|
||||
sock.settimeout(25)
|
||||
sock.connect(SOCKET)
|
||||
sock.connect(path)
|
||||
sock.sendall(json.dumps(data).encode()+b'\n')
|
||||
with sock.makefile('rb') as stream:
|
||||
raw = stream.readline(65537)
|
||||
|
||||
Reference in new issue
Block a user