Skip to content

Commit 6955b4e

Browse files
Update Source.sh
1 parent 24f9d5a commit 6955b4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sing-Box_Config_Installer/Source.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -797,8 +797,8 @@ regenerate_keys() {
797797

798798
# Generate keys using sing-box command
799799
output=$(RS generate reality-keypair)
800-
new_private_key=$(echo "$output" | grep -o 'PrivateKey: [^\n]*' | cut -d' ' -f2)
801-
new_public_key=$(echo "$output" | grep -o 'PublicKey: [^\n]*' | cut -d' ' -f2)
800+
new_private_key=$(echo "$output" | grep -oP 'PrivateKey: \K\S+')
801+
new_public_key=$(echo "$output" | grep -oP 'PublicKey: \K\S+')
802802
new_short_id=$(RS generate rand 8 --hex)
803803

804804
# Path to the files

0 commit comments

Comments
 (0)