Skip to content

Commit

Permalink
Fix Shadowsocks Go user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed May 16, 2024
1 parent d2058f0 commit b0d2f81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
omr-vps-admin (0.9+20240516) unstable; urgency=medium

* Fix Shadowsocks-Go user creation

-- OpenMPTCProuter <[email protected]> Thu, 16 May 2024 16:43:12 +0200

omr-vps-admin (0.9+20240426) unstable; urgency=medium

* Fix V2Ray/XRay json data retrieve
Expand Down
4 changes: 2 additions & 2 deletions omr-admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
# Copyright (C) 2018-2023 Ycarus (Yannick Chabanois) <[email protected]> for OpenMPTCProuter
# Copyright (C) 2018-2024 Ycarus (Yannick Chabanois) <[email protected]> for OpenMPTCProuter
#
# This is free software, licensed under the GNU General Public License v3.0.
# See /LICENSE for more information.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b0d2f81

Please sign in to comment.