What's new
Status
Not open for further replies.
Certainly, I can provide you with a script for a VPS that has Xray Vless installed. Below is the script:

Code:
#!/bin/bash
# Update and upgrade the system
sudo apt update && sudo apt upgrade -y

# Install necessary dependencies
sudo apt-get install -y curl wget zip unzip tar git

# Download and install Xray
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip Xray-linux-64.zip
sudo mv xray /usr/local/bin/
sudo chmod +x /usr/local/bin/xray

# Create a configuration file for Xray
sudo mkdir /usr/local/etc/xray
sudo nano /usr/local/etc/xray/config.json

# Paste the following configuration into the file and save:
{
  "inbounds": [
    {
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "level": 0,
            "email": "your-email@example.com"
          }
        ],
        "decryption": "none",
        "fallbacks": [
          {
            "dest": 80
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "alpn": [
            "http/1.1"
          ],
          "certificates": [
            {
              "certificateFile": "/path/to/certificate.crt",
              "keyFile": "/path/to/private.key"
            }
          ]
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}

# Replace the "id" field with a unique UUIDv4 string
# Replace the "email" field with your email address
# Replace the "certificateFile" and "keyFile" fields with the path to your SSL certificate and private key files

# Start Xray
sudo systemctl start xray

# Enable Xray to start on boot
sudo systemctl enable xray

# Check the status of Xray
sudo systemctl status xray

Make sure to replace the "id", "email", "certificateFile", and "keyFile" fields in the configuration file with appropriate values. This script assumes that you have an SSL certificate and private key already installed on your server. If you don't have one, you'll need to obtain one and modify the configuration file accordingly.
 
Certainly, I can provide you with a script for a VPS that has Xray Vless installed. Below is the script:

Code:
#!/bin/bash
# Update and upgrade the system
sudo apt update && sudo apt upgrade -y

# Install necessary dependencies
sudo apt-get install -y curl wget zip unzip tar git

# Download and install Xray
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip Xray-linux-64.zip
sudo mv xray /usr/local/bin/
sudo chmod +x /usr/local/bin/xray

# Create a configuration file for Xray
sudo mkdir /usr/local/etc/xray
sudo nano /usr/local/etc/xray/config.json

# Paste the following configuration into the file and save:
{
  "inbounds": [
    {
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "level": 0,
            "email": "your-email@example.com"
          }
        ],
        "decryption": "none",
        "fallbacks": [
          {
            "dest": 80
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "alpn": [
            "http/1.1"
          ],
          "certificates": [
            {
              "certificateFile": "/path/to/certificate.crt",
              "keyFile": "/path/to/private.key"
            }
          ]
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {}
    }
  ]
}

# Replace the "id" field with a unique UUIDv4 string
# Replace the "email" field with your email address
# Replace the "certificateFile" and "keyFile" fields with the path to your SSL certificate and private key files

# Start Xray
sudo systemctl start xray

# Enable Xray to start on boot
sudo systemctl enable xray

# Check the status of Xray
sudo systemctl status xray

Make sure to replace the "id", "email", "certificateFile", and "keyFile" fields in the configuration file with appropriate values. This script assumes that you have an SSL certificate and private key already installed on your server. If you don't have one, you'll need to obtain one and modify the configuration file accordingly.
What common OS in VPS will I use to install this script?
 
Status
Not open for further replies.

Similar threads

Back
Top