1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps-admin.git synced 2025-02-12 10:31:52 +00:00

Fix OpenVPN config status

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-02-08 10:29:32 +01:00
parent 28379ce68c
commit 28854ce35d

View file

@ -1603,9 +1603,9 @@ async def config(userid: Optional[int] = Query(None), serial: Optional[str] = Qu
else:
openvpn_client_ca = ''
openvpn_port = '65301'
openvpn_cipher = 'AES-256-CBC'
if os.path.isfile('/etc/openvpn/openvpn-tun0.conf'):
with open('/etc/openvpn/openvpn-tun0.conf', "r") as openvpn_file:
openvpn_cipher = 'AES-256-GCM'
if os.path.isfile('/etc/openvpn/tun0.conf'):
with open('/etc/openvpn/tun0.conf', "r") as openvpn_file:
for line in openvpn_file:
if 'port ' in line:
openvpn_port = line.replace(line[:5], '').rstrip()