Files
Xray_bash_onekey/languages/en
yunshu aa857d380e i18n
2025-01-15 23:14:24 +08:00
..
2025-01-15 23:14:24 +08:00

One-click Installation Script for Xray with Reality / VLESS WebSocket/gRPC+TLS Protocol + Nginx

简体中文 | English

GitHub stars GitHub forks GitHub issues

Thanks for non-commercial open source development authorization by JetBrains

Instructions

Telegram Group

Preparation

  • Prepare a server running outside mainland China with a public IP.
  • For Reality protocol installation, find a domain name that meets Xray requirements.
  • For TLS version installation, prepare a domain name and add the A record.
  • Read Xray official documentation to understand Reality TLS WebSocket gRPC and Xray related information, understand Reality target domain requirements.
  • Install curl, Centos users run: yum install -y curl; Debian/Ubuntu users run: apt install -y curl.

Installation Method

Copy and run:

bash <(curl -Ss https://www.idleleo.com/install.sh)

Notes

  • If you don't understand the specific meaning of each setting in the script, except for required items, please use the default values provided by the script (press Enter all the way).
  • Cloudflare users please enable CDN function after installation is complete.
  • Using this script requires Linux basics and experience, understanding of computer network knowledge, and basic computer operations.
  • Currently supports Debian 9+ / Ubuntu 18.04+ / Centos7+. Some Centos templates may have difficult compilation issues, it is recommended to switch to other system templates when encountering compilation problems.
  • The author provides limited support, as they are too inexperienced.
  • The sharing link is an experimental version, future changes are possible, please confirm client support yourself.
  • Custom string mapping to UUIDv5 requires client support.

Acknowledgments

Certificate

If you already have the certificate files for your domain name, you can name the crt and key files as xray.crt and xray.key and place them in the /etc/idleleo/cert directory (create the directory if it doesn't exist), please note the certificate file permissions and validity period, custom certificates need to be renewed manually after expiration.

The script supports automatic generation of Let's Encrypted certificates, valid for 3 months, theoretically supporting automatic renewal.

View Client Configuration

cat /etc/idleleo/xray_info.txt

Xray Introduction

  • Xray is an excellent open-source network proxy tool that can help you enjoy the internet smoothly, currently supporting Windows, Mac, Android, IOS, Linux and other operating systems.
  • This script is a one-click complete configuration script. After all processes run normally, you can directly set up the client according to the output results.
  • Please note: We still strongly recommend that you fully understand the entire program's workflow and principles.

Recommend Setting Up Single Proxy on Single Server

  • This script installs the latest version of Xray core by default.
  • It is recommended to use the default port 443 as the connection port.
  • The disguise content can be replaced as needed.

Other Notes

  • Recommended to use this script in a clean environment. If you are a beginner, please do not use Centos system.
  • Please do not apply this program to production environment before confirming this script is actually usable.
  • This program depends on Nginx to implement related functions. Users who have installed Nginx using LNMP or other similar Nginx scripts should pay special attention, using this script may cause unpredictable errors.
  • Centos system users please allow program-related ports (default: 80, 443) in the firewall in advance.

Start Method

Start Xray: systemctl start xray

Stop Xray: systemctl stop xray

Start Nginx: systemctl start nginx

Stop Nginx: systemctl stop nginx

Xray server configuration: /etc/idleleo/conf/xray/config.json

Nginx directory: /usr/local/nginx

Certificate files: /etc/idleleo/cert/xray.key and /etc/idleleo/cert/xray.crt please note certificate permission settings

Configuration information files etc: /etc/idleleo