mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-03-21 13:56:39 +08:00
Update start.sh
This commit is contained in:
4
start.sh
4
start.sh
@ -142,10 +142,10 @@ fi
|
||||
# 兜底生成随机 secret
|
||||
if [ -z "$Secret" ]; then
|
||||
if command -v openssl >/dev/null 2>&1; then
|
||||
Secret="$(openssl rand -hex 32)"
|
||||
Secret="$(openssl rand -hex 16)"
|
||||
else
|
||||
# 32 bytes -> 64 hex chars
|
||||
Secret="$(head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n')"
|
||||
Secret="$(head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \n')"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user