mirror of
https://github.com/Ysurac/openmptcprouter-vps-admin.git
synced 2025-03-09 15:40:05 +00:00
Add OpenVPN bonding support
This commit is contained in:
parent
3d0f65ea3b
commit
595b55f730
1 changed files with 5 additions and 1 deletions
|
@ -166,7 +166,7 @@ def check_username_serial(username, serial):
|
||||||
if data['users'][0][username]['serial'] == serial:
|
if data['users'][0][username]['serial'] == serial:
|
||||||
return True
|
return True
|
||||||
if 'serial_error' not in data['users'][0][username]:
|
if 'serial_error' not in data['users'][0][username]:
|
||||||
data['users'][0][username]['serial_error'] = 0
|
data['users'][0][username]['serial_error'] = 1
|
||||||
else:
|
else:
|
||||||
data['users'][0][username]['serial_error'] = int(data['users'][0][username]['serial_error']) + 1
|
data['users'][0][username]['serial_error'] = int(data['users'][0][username]['serial_error']) + 1
|
||||||
with open('/etc/openmptcprouter-vps-admin/omr-admin-config.json', 'w') as outfile:
|
with open('/etc/openmptcprouter-vps-admin/omr-admin-config.json', 'w') as outfile:
|
||||||
|
@ -1254,6 +1254,9 @@ async def config(userid: Optional[int] = Query(None), serial: Optional[str] = Qu
|
||||||
#openvpn_client_ip = '10.255.252.2'
|
#openvpn_client_ip = '10.255.252.2'
|
||||||
openvpn_client_ip = 'dhcp'
|
openvpn_client_ip = 'dhcp'
|
||||||
|
|
||||||
|
if os.path.isfile('/etc/openvpn/bonding1.conf'):
|
||||||
|
available_vpn.append("openvpn_bonding")
|
||||||
|
|
||||||
LOG.debug('Get config... mlvpn')
|
LOG.debug('Get config... mlvpn')
|
||||||
if os.path.isfile('/etc/mlvpn/mlvpn0.conf'):
|
if os.path.isfile('/etc/mlvpn/mlvpn0.conf'):
|
||||||
mlvpn_config = configparser.ConfigParser()
|
mlvpn_config = configparser.ConfigParser()
|
||||||
|
@ -1865,6 +1868,7 @@ def mptcp(*, params: MPTCPparams, current_user: User = Depends(get_current_user)
|
||||||
|
|
||||||
class VPN(str, Enum):
|
class VPN(str, Enum):
|
||||||
openvpn = "openvpn"
|
openvpn = "openvpn"
|
||||||
|
openvpnbonding = "openvpn_bonding"
|
||||||
glorytuntcp = "glorytun_tcp"
|
glorytuntcp = "glorytun_tcp"
|
||||||
glorytunudp = "glorytun_udp"
|
glorytunudp = "glorytun_udp"
|
||||||
dsvpn = "dsvpn"
|
dsvpn = "dsvpn"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue