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:
parent
28379ce68c
commit
28854ce35d
1 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue