In the telegram bot, you can click /help button to get help information, as shown in the figure:
For example, close the proxy whose corresponding port is 59212:
The current version supports proxy search and one-click reset traffic functions.
Since the development progress of the original author has slowed down, I am also learning the go language myself, so I forked the original author's warehouse and updated the functions. The current expanded functions include
At the same time, the issue area has also been opened. I hope you can use it and give me feedback. I will make PR to the original warehouse from time to time to improve X-UI together.,project rgithub address pleaseclick here
To use the proxy service for scientific Internet access, the important thing is the construction of the proxy server. In our construction process, we often need to choose the construction method that suits us according to our own situation. For example, the official recommended script is used for installation, but the officially recommended scripts are generally not friendly to novices, and they often need to be expanded by themselves before the installation can be successful. There are also all-in-one one-click installation scripts implemented by various gods. These scripts reduce the difficulty of building a server for novices to a certain extent. In addition, there is a kind of construction method, that is, build proxies by web Pannel
The advantages of using panels to build are:Due to the UI interface, the information display is quite intuitive, which is more convenient for us newbies to operate (no command line required). So today we will introduce the use of X-UI to build our proxy service.
Using X-UI to build a proxy service has the following advantages:
It should be noted here that the registered domain name must first add an A record in Cloudfare, so that we can apply for an SSL certificate.
If you don't know how to add an A record, please Google it by yourself.
Copy the officially recommended script:
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
After execution, we should see the following output:
After installation, we can get the configuration content of the panel in /usr/local/x-ui.
Please note, do not open the proxy after adding, only DNS resolution. How to judge whether to enable CDN proxy? Very simple, there is a cloud under the proxy status, the orange cloud means CDN is enabled, and the gray cloud means DNS resolution only.
After the addition is complete, we open a new web page and enter yourdomain:54321(the initial port of the panel), press Enter to enter our login interface.
The login interface looks like this:
We use the default user name and password to log in to enter the X-UI settings interface:
It is strongly recommended to reset the panel port and user name, login password in the panel settings immediately after logging in, and then restart the panel. Otherwise, someone will try to log in with the default account password.
Click“入站列表”to add new proxy
If you do not have a CDN or other requirements, you can leave other settings and click "添加" to finish adding the node.
After adding the node, we click查看, click Copy Connection at the bottom right to get the connection. It can be added in the V2rayN App
To get the QR code, click the QR code icon,and now you can use V2rayNG or Shadowrocket etc to scan
At this point, the process of using X-UI to build proxy is complete.
It should be noted that CDN application is not supported after the above steps are completed.如果想支持CDN套用，则继续参考以下步骤
If you need to support CDN application, you also need to apply for a set of SSL certificates. This set of certificates is actually used for the authentication of your subdomain, please do not confuse it with the certificate of the main domain!
Here we use ACME to apply for the certificate. The application mode used in this tutorial is the DNS API mode. In short, it uses the API provided by the nameserver provider of your domain name to complete the certificate issuance. Using this mode does not depend on port opening, etc., and the success rate is currently the highest.
In order to help you simplify the entire operation process, I wrote a script to facilitate you to quickly apply for a certificate. If you don't want to read so much, just use the entire script directly. The specific usage is as follows:
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/BashScripts/main/SSLAutoInstall/SSLAutoInstall.sh)
If you want to know more details, please follow the steps below to take a closer look~
curl https://get.acme.sh | sh
After installation, a folder such as .acme.sh will be generated in the root directory, which can be viewed using the ls -la command.
Log in to Cloudflare's official website, and in the API area in the lower left corner, click“获取您的API令牌”
Click to enter the secondary page, click API Token, find the Global API Key under the API key, and view it
Please copy this API Key to your local. Enter the following command to import environment variables (When copying and pasting, please remove // and the following content by yourself. This tutorial is only for comments, and // and the following content are not needed in actual use.）：
export CF_Key=”***********************” //Global API key
export CF_Email=***************.com //Cloudfare register Email
Since the default certificate CA of the Acme script is ZeroSSL, it is not very convenient to use. Therefore, it is recommended that you change the CA to Let's Encrypt. The switching command is as follows:
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
Use the following command for certificate signing:
~/.acme.sh/acme.sh --issue --dns dns_cf -d YourDomain -d *.YourDomain
chmod -R 755 /root/cert
~/.acme.sh/acme.sh --installcert -d YourDomain -d *.YourDomain --ca-file /root/cert/ca.cer --cert-file /root/cert/YourDomain.cer --key-file /root/cert/YourDomain.key --fullchain-file /root/cert/fullchain.cer
~/.acme.sh/acme.sh --upgrade --auto-upgrade
The installation is successful as shown below:
After installing the certificate, we can set up TLS and apply CDN.
1.YourDomain represents your own domain name, please replace it with your own domain name when using the command
2.The domain name applied for in this tutorial is a generic domain name certificate, which can be used for an unlimited number of second-level domain names
3.When using the certificate public key, use fullchain.cer first, which will avoid many strange problems
Enter the panel interface, add an inbound node, and set as follows:
Points to note during setup:
1. The port needs to be a port supported by Cloudflare for distribution, such as 443, etc.
2. The application of CDN needs to be matched with WebSocket, please select ws in the transmission setting item
3The Websocket path can be arbitrary, but it is best not to be the root path
4.Please fill in the public key file path and key file path according to the actual location of your certificate installation
5.When using certificates and keys, in addition to setting the path, you can also fill in the content of the certificate file content to achieve the purpose of use
After adding the node, we go back to Cloudflare and make the gray cloud orange. Then we go back to the VPS side and use ping + domain name to check whether the IP has changed. If it is no longer the IP of our VPS, it means that the CDN has been successfully applied.
In addition to the nodes we build can apply CDN, our X-UI panel also supports applying CDN. If the X-UI panel needs to also apply CDN, we need to modify the port that the panel listens on in the panel to the port supported by Cloudflare, and set the SSL certificate key path at the same time.Pay attention here意，面板的监听端口一定不要与你的节点共用同一端口。
After setting, remember to restart the panel, re-enter: https://domain name+port, and enter the panel interface normally. At the same time, we will find that our web page is already encrypted.
At this point, the panel also supports applying CDN.
The above is the entire tutorial for using X-UI. You can test and use it according to the tutorial. If you have any questions, you can communicate with me in the comment area. If you still have questions, I also uploaded a video tutorial for your reference:
I used it for a day after the completion of the construction, and it is very convenient and quick to use in general, which is very suitable for novice use. I would also like to thank the developers of X-UI. Their selfless efforts brought us such a useful tool, Respect!