1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps-admin.git synced 2025-03-09 15:40:05 +00:00

Fix client2client disable

This commit is contained in:
Ycarus 2020-03-05 15:09:49 +01:00
parent 51d12602df
commit ef1d63ba4d

View file

@ -1519,7 +1519,8 @@ def client2client(*, params: ClienttoClient, current_user: User = Depends(get_cu
for line in f:
if not 'client-to-client' in line:
n.write(line)
n.write('client-to-client' + "\n")
if params.enable == True:
n.write('client-to-client' + "\n")
os.close(fd)
move(tmpfile, '/etc/openvpn/tun0.conf')
final_md5 = hashlib.md5(file_as_bytes(open('/etc/openvpn/tun0.conf', 'rb'))).hexdigest()