mirror of
https://github.com/EvgenyNerush/easy-xray.git
synced 2025-12-13 21:35:03 +03:00
fix new xray x25519 format
This commit is contained in:
10
ex.sh
10
ex.sh
@@ -167,8 +167,14 @@ or leave blank for simple default configuration:"
|
||||
if [ -v $private_key ] || [ -v $public_key ]
|
||||
then
|
||||
keys=$(xray x25519) # string "Private key: Abc... Public key: Xyz..."
|
||||
private_key=$(echo $keys | cut -d " " -f 3) # get 3rd field of fields delimited by spaces
|
||||
public_key=$(echo $keys | cut -d " " -f 6) # get 6th field
|
||||
keysF=$(echo $keys | cut -d " " -f 1) # which keys format xray uses?
|
||||
if [ $keysF = "Private" ]; then
|
||||
private_key=$(echo $keys | cut -d " " -f 3) # get 3rd field of fields delimited by spaces
|
||||
public_key=$(echo $keys | cut -d " " -f 6) # get 6th field
|
||||
else
|
||||
private_key=$(echo $keys | cut -d " " -f 2)
|
||||
public_key=$(echo $keys | cut -d " " -f 4)
|
||||
fi
|
||||
fi
|
||||
short_id=$(openssl rand -hex 8) # random short_id for REALITY
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user