Implement client management functionality for Xray

This commit is contained in:
aiamnezia 2024-10-26 05:48:42 +04:00
parent 3d7a46d058
commit 76a439d16d
5 changed files with 205 additions and 45 deletions

View file

@ -1,5 +1,4 @@
cd /opt/amnezia/xray
XRAY_CLIENT_ID=$(xray uuid) && echo $XRAY_CLIENT_ID > /opt/amnezia/xray/xray_uuid.key
XRAY_SHORT_ID=$(openssl rand -hex 8) && echo $XRAY_SHORT_ID > /opt/amnezia/xray/xray_short_id.key
KEYPAIR=$(xray x25519)
@ -33,10 +32,6 @@ cat > /opt/amnezia/xray/server.json <<EOF
"protocol": "vless",
"settings": {
"clients": [
{
"id": "$XRAY_CLIENT_ID",
"flow": "xtls-rprx-vision"
}
],
"decryption": "none"
},