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

Fix Shadowsocks Go user creation

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-05-16 16:44:11 +02:00
parent d2058f05b8
commit b0d2f8126c
2 changed files with 8 additions and 2 deletions

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
omr-vps-admin (0.9+20240516) unstable; urgency=medium
* Fix Shadowsocks-Go user creation
-- OpenMPTCProuter <contact@openmptcprouter.com> Thu, 16 May 2024 16:43:12 +0200
omr-vps-admin (0.9+20240426) unstable; urgency=medium
* Fix V2Ray/XRay json data retrieve

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Copyright (C) 2018-2023 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
# Copyright (C) 2018-2024 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
#
# This is free software, licensed under the GNU General Public License v3.0.
# See /LICENSE for more information.
@ -3122,7 +3122,7 @@ def add_user(*, params: NewUser, current_user: User = Depends(get_current_user))
# shadowsocks_port = '651{:02d}'.format(userid)
shadowsocks_port = params.shadowsocks_port
shadowsocks_key = base64.urlsafe_b64encode(secrets.token_hex(16).encode())
shadowsocks2022_key = base64.urlsafe_b64encode(secrets.token_hex(32).encode())
shadowsocks2022_key = base64.urlsafe_b64encode(secrets.token_hex(16).encode())
if not publicips:
if os.path.isfile('/etc/shadowsocks-libev/manager.json'):
shadowsocks_port = add_ss_user(str(shadowsocks_port), shadowsocks_key.decode('utf-8'), userid)