> For the complete documentation index, see [llms.txt](https://kxsw.gitbook.io/dj/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kxsw.gitbook.io/dj/yi-jian-da-jian-jiao-cheng-zhi-chi-v2rayxray-jie-dian-deng-cao-zuo-jian-dan.md).

# 一键搭建教程，支持V2ray、Xray节点等，操作简单

V2ray节点搭建教程：▶ <https://youtu.be/UWWlrj26G50>

### 一、VPS购买：<https://www.vultr.com/?ref=8753714>

### 二、搭建工具下载

下载地址：[https://kjfx.lanzoui.com/iqm6Uosbzha ](<https://kjfx.lanzoui.com/iqm6Uosbzha >)

备用下载地址（含MAC版）：[点击下载>>](http://www.hostbuf.com/t/988.html)

### 三、搭建代码：（两个任意选择一个使用）

```
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/956bf85bbac978d56c0e319c5fac2d6db7df9564/install.sh) 0.3.4.4
```

```
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh) 0.3.4.4
```

### 四、搭建完后，放行端口

```
iptables -I INPUT -p tcp --dport 54321 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
```

### 五、安装证书

```
curl https://get.acme.sh | sh; apt install socat -y || yum install socat -y; ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
```

#### 申请证书方式1

```
~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure
```

#### 申请证书方式2

```
~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server buypass --force --insecure && ~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server buypass
```

#### 申请证书方式3：

```
~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server zerossl --force --insecure && ~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server zerossl
```

#### 安装证书：

```
~/.acme.sh/acme.sh --install-cert -d 你的域名 --ecc --key-file /etc/x-ui/server.key --fullchain-file /etc/x-ui/server.crt
```

### 翻墙软件下载

Windows（v2rayN）：[点击下载>>](https://github.com/2dust/v2rayN/releases/download/6.23/zz_v2rayN-With-Core-SelfContained.7z)\
Android（v2rayNG）：[点击下载>>](https://github.com/2dust/v2rayNG/releases/download/1.8.5/v2rayNG_1.8.5.apk)\
IOS（shadowrocket）：<https://github.com/kjfx/AppleID>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kxsw.gitbook.io/dj/yi-jian-da-jian-jiao-cheng-zhi-chi-v2rayxray-jie-dian-deng-cao-zuo-jian-dan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
