@@ -56,8 +56,8 @@ def generate_keys(ssh):
5656 stdin , stdout , stderr = ssh .exec_command ("xray x25519" )
5757 keys = stdout .read ().decode ().strip ()
5858
59- pattern_private_key = r"Private key :\s*([A-Za-z0-9_-]+)"
60- pattern_public_key = r"Public key :\s*([A-Za-z0-9_-]+)"
59+ pattern_private_key = r"PrivateKey :\s*([A-Za-z0-9_-]+)"
60+ pattern_public_key = r"Password :\s*([A-Za-z0-9_-]+)"
6161
6262 match_private_key = re .search (pattern_private_key , keys )
6363 private_key = match_private_key .group (1 )
@@ -110,7 +110,7 @@ def find_users(ssh):
110110
111111@staticmethod
112112def check_private_key (ssh ):
113- stdin , stdout , stderr = ssh .exec_command ("cat /usr/local/etc/xray. config.json" )
113+ stdin , stdout , stderr = ssh .exec_command ("cat /usr/local/etc/xray/ config.json" )
114114 config = stdout .read ().decode ('utf-8' )
115115 pattern = r'"privateKey"\s*:\s*"([^"]+)"'
116116 matches = re .findall (pattern , config )
@@ -141,7 +141,7 @@ def add_user(ssh, server_ip):
141141 stdin , stdout , stderr = ssh .exec_command ("cat /usr/local/etc/xray/public_key.json" )
142142 public_key = stdout .read ().decode ('utf-8' )
143143
144- print ("Необходимо вставить конфиг в VLESS клиент:" )
144+ print ("Необходимо вставить ссылку в VLESS клиент:" )
145145 print (Fore .GREEN + f"vless://{ uuid } @{ server_ip } :443?security=reality&sni=google.com&alpn=h2&fp=chrome&pbk={ public_key } &pbk=su1LPoVoA44umUYDWskmuEwAvGvx9bg8nVfiSgK3Fiw&sid=aabbccdd&type=tcp&flow=xtls-rprx-vision&encryption=none#manul" + Fore .RESET )
146146
147147 stdin , stdout , stderr = ssh .exec_command ("systemctl restart xray" )
0 commit comments