mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Fix
This commit is contained in:
parent
477c310333
commit
3dfdf430dc
1 changed files with 13 additions and 5 deletions
18
omr-admin.py
18
omr-admin.py
|
@ -104,11 +104,19 @@ def config():
|
||||||
else:
|
else:
|
||||||
shadowsocks_obfs = False
|
shadowsocks_obfs = False
|
||||||
glorytun_key = open('/etc/glorytun-tcp/tun0.key').readline().rstrip()
|
glorytun_key = open('/etc/glorytun-tcp/tun0.key').readline().rstrip()
|
||||||
with open('/etc/openvpn/server/static.key',"rb") as ovpnkey_file:
|
|
||||||
openvpn_key = base64.b64encode(ovpnkey_file.read())
|
if os.path.isfile('/etc/openvpn/server/static.key'):
|
||||||
mlvpn_config = configparser.ConfigParser()
|
with open('/etc/openvpn/server/static.key',"rb") as ovpnkey_file:
|
||||||
mlvpn_config.readfp(open(r'/etc/mlvpn/mlvpn0.conf'))
|
openvpn_key = base64.b64encode(ovpnkey_file.read())
|
||||||
mlvpn_key = mlvpn_config.get('general','password').strip('"')
|
else:
|
||||||
|
openvpn_key = ''
|
||||||
|
|
||||||
|
if os.path.isfile('/etc/mlvpn/mlvpn0.conf'):
|
||||||
|
mlvpn_config = configparser.ConfigParser()
|
||||||
|
mlvpn_config.readfp(open(r'/etc/mlvpn/mlvpn0.conf'))
|
||||||
|
mlvpn_key = mlvpn_config.get('general','password').strip('"')
|
||||||
|
else:
|
||||||
|
mlvpn_key = ''
|
||||||
|
|
||||||
mptcp_enabled = os.popen('sysctl -n net.mptcp.mptcp_enabled').read().rstrip()
|
mptcp_enabled = os.popen('sysctl -n net.mptcp.mptcp_enabled').read().rstrip()
|
||||||
mptcp_checksum = os.popen('sysctl -n net.mptcp.mptcp_checksum').read().rstrip()
|
mptcp_checksum = os.popen('sysctl -n net.mptcp.mptcp_checksum').read().rstrip()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue