changed v2ray client config generation

This commit is contained in:
vladimir.kuznetsov 2023-02-13 10:05:15 +03:00
parent 6a903792ab
commit 68830021d6
9 changed files with 49 additions and 64 deletions

View file

@ -26,23 +26,23 @@ $OPENVPN_TLS_AUTH
$OPENVPN_ADDITIONAL_SERVER_CONFIG
EOF
# V2RAY_SERVER_PORT port for v2ray listening, for example 10086.
# V2RAY_VMESS_PORT port for v2ray listening, for example 10086.
# V2RAY_VMESS_CLIENT_UUID client's id and secret as UUID.
# UUID is 32 hexadecimal digits /([0-9a-f]-?){32}/ (128 bit value).
mkdir -p /opt/amnezia/v2ray
cd /opt/amnezia/v2ray
V2RAY_VMESS_CLIENT_UUID="b831381d-6324-4d53-ad4f-8cda48b30811" # $(openssl rand -base64 32 | tr "=" "A" | tr "+" "A" | tr "/" "A")
V2RAY_VMESS_CLIENT_UUID=$(cat /proc/sys/kernel/random/uuid)
echo $V2RAY_VMESS_CLIENT_UUID > /opt/amnezia/v2ray/v2ray.key
cat < /opt/amnezia/v2ray/v2ray-server.json <<EOF
cat > /opt/amnezia/v2ray/v2ray-server.json <<EOF
{
"log": {
"loglevel": "None"
},
"inbounds": [
{
"port": $V2RAY_SERVER_PORT,
"port": $V2RAY_VMESS_PORT,
"protocol": "vmess",
"settings": {
"clients": [
@ -67,4 +67,4 @@ cat < /opt/amnezia/v2ray/v2ray-server.json <<EOF
}
}
}
EOF
EOF