This script automates the installation, configuration, and management of Xray on a Linux system. It helps in setting up Xray as a proxy server, with options for WebSocket, TLS encryption, and UUID generation. It also provides options for managing the Xray service, modifying the configuration, and viewing runtime logs.
- Install Xray: Automatically installs Xray-core on your Linux server.
- WebSocket Support: Optionally enable WebSocket for Xray.
- TLS Encryption: Optionally enable TLS encryption with custom certificates.
- UUID Generation: Generates a new UUID for client authentication.
- Port Modification: Change the port Xray listens on.
- Service Management: Start, stop, restart, and enable/disable Xray service using systemd.
- Client Information: View real-time logs, connected clients, and their geographic location based on IP.
- Configuration Management: View and modify the Xray configuration.
- A Linux server with
aptpackage manager (e.g., Ubuntu/Debian). - Root privileges to install software and manage services.
- Internet connection to download Xray and required components.
-
Install Xray:
Run the script and select1to install Xray../xray-install.sh -
Uninstall Xray:
To remove Xray, select2from the main menu. -
Modify Configuration:
You can modify the port or UUID by selecting options3and4. -
View Connected Clients:
Select7to view the connected clients and their geographical information. -
Start, Stop, or Restart Xray:
You can manage the Xray service with the options9,10, or11.
- Port: The script prompts you to enter the port Xray will listen on (default: 1080).
- WebSocket: Optionally enable WebSocket support by answering "y" when prompted.
- TLS Encryption: Enable TLS encryption by providing a domain name and paths to your TLS certificate and private key.
This project is open source and available under the MIT License.