mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-01-19 01:01:41 +03:00
Fix documents
- upgrade vuepress: close #27 #28 #29 #30 #31 - tweak homepage - tweak dark theme
This commit is contained in:
parent
2117297f7c
commit
f68422788d
@ -47,6 +47,9 @@ export default defineUserConfig<DefaultThemeOptions>({
|
||||
ToggleText: "切换主题",
|
||||
repoLabel: "查看源码",
|
||||
editLinkText: "帮助我们改善此页面!",
|
||||
tip: "提示",
|
||||
warning: "注意",
|
||||
danger: "警告",
|
||||
sidebar: {
|
||||
"/config/": sidebar.getConfigSidebar(
|
||||
"特性详解",
|
||||
|
@ -36,7 +36,7 @@ $backgroundDarkColor: #25272a;
|
||||
$kbdBackgroundDarkColor: #3c3c3c;
|
||||
$kbdBorderDarkColor: #666b6f;
|
||||
$tableBorderDarkColor: #666b6f;
|
||||
$tableBackgroundDarkColor: #5b5b5b;
|
||||
$tableBackgroundDarkColor: #313438;
|
||||
$metaItemDarkColor: #626262;
|
||||
$dangerBgDarkColor: rgba(72, 56, 57, 0.3);
|
||||
$warningBgDarkColor: rgba(185, 174, 119, 0.3);
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
&.secondary {
|
||||
color: var(--accentColor);
|
||||
background-color: #fff;
|
||||
background-color: var(--kbdBackgroundDarkColor);
|
||||
border-color: var(--accentColor);
|
||||
&:hover {
|
||||
color: #fff;
|
||||
|
@ -7,7 +7,9 @@ actions:
|
||||
- text: 由此开始 →
|
||||
link: /document/
|
||||
type: primary
|
||||
|
||||
- text: 配置指南 →
|
||||
link: /config/
|
||||
type: secondary
|
||||
features:
|
||||
- title: 极速协议
|
||||
details: 原创 VLESS 与 XTLS 协议,摆脱冗余加密,释放CPU算力
|
||||
|
@ -32,11 +32,11 @@
|
||||
|
||||
随着 GFW 技术这十几年来不断的迭代升级,若要完成【自己动手科学上网】这个目标,需要做的事情已经包括但不限于:
|
||||
|
||||
1. 了解Linux系统基本命令
|
||||
2. 了解网络传输协议
|
||||
3. 有技术和经济能力完成VPS购买及管理
|
||||
4. 有技术和经济能力完成域名购买及管理
|
||||
5. 有技术能力完成TLS证书申请 等等。
|
||||
- 了解 Linux 系统基本命令
|
||||
- 了解网络传输协议
|
||||
- 有技术和经济能力完成 VPS 购买及管理
|
||||
- 有技术和经济能力完成域名购买及管理
|
||||
- 有技术能力完成 TLS 证书申请 等等。
|
||||
|
||||
这就让【自建 VPS 科学上网】这个曾经简单的行为逐渐变成了令新人望而生畏的挑战。
|
||||
|
||||
|
@ -9,15 +9,15 @@
|
||||
1. 在 VPS 的后台安装 Debian 10 64bit 系统
|
||||
2. 小本本记下 VPS 的 IP 地址(本文会用 `"100.200.300.400"` 来表示)
|
||||
::: tip
|
||||
**注意:** 这是一个故意写错的非法 IP,请替换成你的真实 IP)
|
||||
这是一个故意写错的非法 IP,请替换成你的真实 IP)
|
||||
:::
|
||||
3. 小本本记下 VPS 的 SSH 远程登陆端口(Port)
|
||||
4. 小本本记下 SSH 远程登录的用户名和密码
|
||||
|
||||
购买 VPS 是一个比较复杂的事情,建议先去学习一下相关知识,选择适合自己的经济能力和线路需求的即可。另外可以选择薅一些国际大厂的羊毛(比如甲骨文和谷歌提供的永久免费或限时免费的套餐)。总之,务必量力而行。
|
||||
|
||||
::: tip
|
||||
**说明:** 关于选择 Debian 10 作为操作系统,这里稍微多说一句:不管你在网上听说了什么,不管哪个大神告诉你 XXX 版的 Linux 更好、XXX 版的 Linux 更牛,这些 Linux 的派系之争**跟现在的你半毛钱关系也没有**!使用 Debian 10 足以让你的 VPS 服务器在安全、稳健运行的同时得到足够的优化(如 cloud 专用内核、及时的 bbr 支持等)。等你对 Linux 熟悉之后,再回头去尝试其他的 Linux 发行版也不迟
|
||||
::: tip 说明
|
||||
关于选择 Debian 10 作为操作系统,这里稍微多说一句:不管你在网上听说了什么,不管哪个大神告诉你 XXX 版的 Linux 更好、XXX 版的 Linux 更牛,这些 Linux 的派系之争**跟现在的你半毛钱关系也没有**!使用 Debian 10 足以让你的 VPS 服务器在安全、稳健运行的同时得到足够的优化(如 cloud 专用内核、及时的 bbr 支持等)。等你对 Linux 熟悉之后,再回头去尝试其他的 Linux 发行版也不迟。
|
||||
:::
|
||||
|
||||
## 2.2 获取一个心仪的域名
|
||||
@ -30,7 +30,7 @@
|
||||
![添加A记录](./ch02-img01-a-name.png)
|
||||
|
||||
::: tip
|
||||
**注意:** 这**不是**一个真实可用的网址,请替换成你的真实网址
|
||||
这**不是**一个真实可用的网址,请替换成你的真实网址
|
||||
:::
|
||||
|
||||
## 2.3 你本地电脑上需要安装的软件
|
||||
|
@ -64,14 +64,14 @@
|
||||
|
||||
4. 现在请输入第一条命令,获取更新信息
|
||||
|
||||
```
|
||||
# apt update
|
||||
```shell
|
||||
apt update
|
||||
```
|
||||
|
||||
5. 然后请输入第二条命令,并在询问是否继续安装 `(Y/n)` 时输入 `y` 并回车确认,开始安装
|
||||
|
||||
```
|
||||
# apt upgrade
|
||||
```shell
|
||||
apt upgrade
|
||||
```
|
||||
|
||||
6. 完整流程演示如下:
|
||||
|
@ -63,8 +63,8 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
3. 我们要做的第一件事,当然就是【用`nano`这个文本编辑器打开`SSH远程登录程序设置`】,在 Windows 下,你会【找到文件并双击】,在 Linux 下该怎么办呢?仔细看看上面的命令说明,是不是就很简单了?没错,就是:
|
||||
|
||||
```
|
||||
# nano /etc/ssh/sshd_config
|
||||
```shell
|
||||
nano /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
4. 文件打开后,你就进入了`nano`的界面,稍微观察一下,你会发现,它把重要的快捷键都显示在屏幕下方了(下图红框内),直接开卷考试、不用死记硬背,是不是很贴心呢?
|
||||
@ -78,7 +78,7 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
- 说明:如果这一行开头有个`#`,证明这一行【不生效】(被注释掉了),你可像我一样在文件最后写一个不带`#`的,或者把`#`删掉就好。
|
||||
|
||||
::: warning
|
||||
注意 本文以`9753`为例,就意味着随着本文的发布,这个端口会变成一个不大不小的特征,也许会被攻击者优先尝试、也许被 GFW 干扰、阻断。所以我强烈建议你用一个自己想到的其他端口,毕竟,你有 6 万多个端口可以自由选择。
|
||||
本文以`9753`为例,就意味着随着本文的发布,这个端口会变成一个不大不小的特征,也许会被攻击者优先尝试、也许被 GFW 干扰、阻断。所以我强烈建议你用一个自己想到的其他端口,毕竟,你有 6 万多个端口可以自由选择。
|
||||
:::
|
||||
|
||||
6. 我们要做的第三件事,是【保存文件并退出】
|
||||
@ -88,8 +88,8 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
7. 我们最后要做的事,是【重启 ssh 服务,使变更生效】
|
||||
|
||||
```
|
||||
# systemctl restart ssh
|
||||
```shell
|
||||
systemctl restart ssh
|
||||
```
|
||||
|
||||
8. 完整流程演示如下:
|
||||
@ -116,47 +116,47 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
2. 我们要做的第一件事,是【新增一个用户并设定登录密码】,名字你可以随便起,我这里以`vpsadmin`为例:
|
||||
|
||||
```
|
||||
# adduser vpsadmin
|
||||
```shell
|
||||
adduser vpsadmin
|
||||
```
|
||||
|
||||
执行命令后,根据提示操作即可。请务必设置一个用户密码(别忘记设置密码时你时看不到 `******` 的)。之后系统会询问你一些用户的附加信息,这些就可以无视,一路回车即可。
|
||||
|
||||
![建立新用户](./ch04-img03-adduser.png)
|
||||
|
||||
::: warning 注意
|
||||
本文以`vpsadmin`为例,就意味着随着本文的发布,这个用户名也会变成一个不大不小的特征,也许会被攻击者优先尝试。所以和端口一样,我强烈建议你用一个自己想到的其他用户名。
|
||||
:::
|
||||
::: warning
|
||||
本文以`vpsadmin`为例,就意味着随着本文的发布,这个用户名也会变成一个不大不小的特征,也许会被攻击者优先尝试。所以和端口一样,我强烈建议你用一个自己想到的其他用户名。
|
||||
:::
|
||||
|
||||
4. 完整流程演示如下:
|
||||
3. 完整流程演示如下:
|
||||
|
||||
![建立新用户](./ch04-img04-adduser-full.gif)
|
||||
|
||||
5. 我们要做的第二件事,是【安装`sudo`功能】(`sudo` 就是在关键时刻,让普通账户临时获得 `root` 的神力,战力全开拯救世界)
|
||||
4. 我们要做的第二件事,是【安装`sudo`功能】(`sudo` 就是在关键时刻,让普通账户临时获得 `root` 的神力,战力全开拯救世界)
|
||||
|
||||
```
|
||||
# apt update && apt install sudo
|
||||
```shell
|
||||
apt update && apt install sudo
|
||||
```
|
||||
|
||||
聪明的你大概已经发现,这一行命令其实是两个命令。前一半 `apt update` 你之前已经见过并且用过了,是去服务器刷新软件版本信息。后面的 `apt install`
|
||||
就是这一次要用到的【安装命令】。两条连接在一起,就是让系统去【刷新可用的最新软件,然后安装最新版的`sudo`程序】。 `&&` 则是把两个命令连起来执行的意思。
|
||||
|
||||
6. 我们要做的第三件事,是【把`vpsadmin`用户加入`sudo`名单里,让他有资格借用`root`的神力】
|
||||
5. 我们要做的第三件事,是【把`vpsadmin`用户加入`sudo`名单里,让他有资格借用`root`的神力】
|
||||
|
||||
```
|
||||
# visudo
|
||||
```shell
|
||||
visudo
|
||||
```
|
||||
|
||||
在 `User Privilege Specification` 下加入一行 `vpsadmin ALL=(ALL) NOPASSWD: ALL` 即可。
|
||||
|
||||
::: warning 注意 我要特别说明的是`NOPASSWD`这个设置,它的意思是`vpsadmin`用户临时使用`root`权限时,不用额外输入密码。**这与一般的安全建议相反**
|
||||
。我之所以如此推荐,是因为很多新人不顾危险坚持使用`root`账号就是因为用`root`时不用重复输入密码、觉得轻松。“两害相权取其轻”,我认为【直接用`root`用户的风险】大于【使用`sudo`
|
||||
::: warning
|
||||
我要特别说明的是`NOPASSWD`这个设置,它的意思是`vpsadmin`用户临时使用`root`权限时,不用额外输入密码。**这与一般的安全建议相反**。我之所以如此推荐,是因为很多新人不顾危险坚持使用`root`账号就是因为用`root`时不用重复输入密码、觉得轻松。“两害相权取其轻”,我认为【直接用`root`用户的风险】大于【使用`sudo`
|
||||
时不用输密码的风险】,所以做了以上的建议。
|
||||
|
||||
如果你希望遵守传统习惯、每次使用`sudo`时需要输入密码,那么这一行改成 `vpsadmin ALL=(ALL:ALL) ALL` 即可。
|
||||
:::
|
||||
|
||||
7. 完整流程演示如下:
|
||||
6. 完整流程演示如下:
|
||||
|
||||
![建立新用户](./ch04-img05-sudo-full.gif)
|
||||
|
||||
@ -164,8 +164,8 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
1. 现在你已经逐渐熟悉 Linux 了,所以这次换你思考,我们要做的第一件事是什么呢?没错,还是【用`nano`编辑器打开`SSH远程登录程序设置`】,什么,你想不起来怎么操作了?那去复习一下上面的内容再回来吧!............ 正确答案:
|
||||
|
||||
```
|
||||
# nano /etc/ssh/sshd_config
|
||||
```shell
|
||||
nano /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
2. 找到`PermitRootLogin Yes`这一项,然后把它后面的设定值改为`no`即可。还记得怎么操作吗?............ 正确答案:
|
||||
@ -180,8 +180,8 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
4. 重启 ssh 服务,让变更生效。还记得............ 算了直接公布正确答案:
|
||||
|
||||
```
|
||||
# systemctl restart ssh
|
||||
```shell
|
||||
systemctl restart ssh
|
||||
```
|
||||
|
||||
5. 完整流程演示如下:
|
||||
@ -202,7 +202,7 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
所谓的【密钥验证】,就是生成【一对】相关联的密钥文件(公钥和私钥),然后把【公钥】上传到 VPS 备用。每次登录时,SSH 会将【公钥】和【私钥】进行匹配,若验证是正确的【密钥对】,则验证通过。(换言之,你无需记忆和输入复杂的密码,只要保护好【私钥】这个文件不外泄即可)
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
本文以 `RSA` 密钥举例,是因为 `RSA` 密钥在各种设备、各种 `SSH` 客户端中有广泛悠久的支持历史,且目前依然能提供够用的安全性。但它绝非唯一选择。
|
||||
|
||||
其他的常见密钥还有:
|
||||
@ -222,7 +222,7 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
![生成密钥](./ch04-img08-puttygen-save.png)
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
本图中是以 `2048` 位的 `RSA` 密钥为例的。但实际上,如果要获得与 `EDCSA/Ed25519` 的 `256` 位密钥相同的安全性,你需要使用 `3072` 位的 `RSA` 密钥。(即右下角的数字改成 `3072`)
|
||||
:::
|
||||
|
||||
@ -278,14 +278,14 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
3. 修改 `authorized_keys` 文件权限为 `600` (仅所有者可读可写)
|
||||
|
||||
```
|
||||
$ chmod 600 ~/.ssh/authorized_keys
|
||||
```shell
|
||||
chmod 600 ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
4. 修改 SSH 配置。这个我们已经用了很多次,但现在我们已经从无所不能的`root`变成了普通用户`vpsadmin`,此时的我们是没有权限直接编辑 SSH 配置的。这时候就需要使用`sudo`命令了:
|
||||
|
||||
```
|
||||
$ sudo nano /etc/ssh/sshd_config
|
||||
```shell
|
||||
sudo nano /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
5. 找到(`ctrl+w`) `PasswordAuthentication` 改成 `no`
|
||||
@ -294,8 +294,8 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
7. 重启 SSH 服务。(啰嗦君:别忘了现在需要使用`sudo`来获得权限)
|
||||
|
||||
```
|
||||
$ sudo systemctl restart ssh
|
||||
```shell
|
||||
sudo systemctl restart ssh
|
||||
```
|
||||
|
||||
8. 完整流程如下:
|
||||
@ -316,7 +316,7 @@ Linux 服务器的安全防护是一个纷繁复杂的巨大课题。无数的
|
||||
|
||||
![WinSCP指定私钥位置](./ch04-img20-winscp-privatekey-location.png)
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
任何需要借助 SSH 进行登录的软件都需要密钥验证了,软件过多,无法逐一展示,请根据你的需要自行设置好哦
|
||||
:::
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
1. 这里用到的,都是之前已经详解过的命令,所以就不重复讲解了。看不懂的同学可以看看前面的章节哦。
|
||||
|
||||
```
|
||||
$ sudo apt update && sudo apt install nginx
|
||||
```shell
|
||||
sudo apt update && sudo apt install nginx
|
||||
```
|
||||
|
||||
2. 完成后,Nginx 已经自动运行。此时打开 Windows 上的浏览器并输入 `http://100.200.300.400:80`,若看到下图的界面就说明 Nginx 已经正常在运行了。
|
||||
@ -42,11 +42,11 @@
|
||||
| `conf-02` | `/etc/nginx/nginx.conf` | Nginx 程序设置 |
|
||||
|
||||
3. 创建一个网站专用的文件夹`/home/vpsadmin/www/webpage/`并建立网页文件`index.html`
|
||||
```
|
||||
$ mkdir -p ~/www/webpage/ && nano ~/www/webpage/index.html
|
||||
```shell
|
||||
mkdir -p ~/www/webpage/ && nano ~/www/webpage/index.html
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
如果你用的不是 `vpsadmin` 这个用户名,请务必理解这条命令中 `“~”` 符号的意义(这关系到【第 5 步】你要写的内容):
|
||||
|
||||
- 如果是 【非 `root` 用户】,`“~”` 就等价于 `/home/用户名`
|
||||
@ -55,35 +55,42 @@
|
||||
|
||||
4. 把下面的内容完整的复制进去,然后保存(`ctrl+o`)退出(`ctrl+x`)
|
||||
|
||||
```
|
||||
<html>
|
||||
<!-- Text between angle brackets is an HTML tag and is not displayed.
|
||||
```html
|
||||
<html lang="">
|
||||
<!-- Text between angle brackets is an HTML tag and is not displayed.
|
||||
Most tags, such as the HTML and /HTML tags that surround the contents of
|
||||
a page, come in pairs; some tags, like HR, for a horizontal rule, stand
|
||||
alone. Comments, such as the text you're reading, are not displayed when
|
||||
the Web page is shown. The information between the HEAD and /HEAD tags is
|
||||
not displayed. The information between the BODY and /BODY tags is displayed.-->
|
||||
<head>
|
||||
<title>Enter a title, displayed at the top of the window.</title>
|
||||
</head>
|
||||
<!-- The information between the BODY and /BODY tags is displayed.-->
|
||||
<body>
|
||||
<h1>Enter the main heading, usually the same as the title.</h1>
|
||||
<p>Be <b>bold</b> in stating your key points. Put them in a list: </p>
|
||||
<ul>
|
||||
<li>The first item in your list</li>
|
||||
<li>The second item; <i>italicize</i> key words</li>
|
||||
</ul>
|
||||
<p>Improve your image by including an image. </p>
|
||||
<p><img src="https://i.imgur.com/SEBww.jpg" alt="A Great HTML Resource"></p>
|
||||
<p>Add a link to your favorite <a href="https://www.dummies.com/">Web site</a>.
|
||||
Break up your page with a horizontal rule or two.
|
||||
</p>
|
||||
<hr>
|
||||
<p>Finally, link to <a href="page2.html">another page</a> in your own Web site.</p>
|
||||
<!-- And add a copyright notice.-->
|
||||
<p>© Wiley Publishing, 2011</p>
|
||||
</body>
|
||||
<head>
|
||||
<title>Enter a title, displayed at the top of the window.</title>
|
||||
</head>
|
||||
<!-- The information between the BODY and /BODY tags is displayed.-->
|
||||
<body>
|
||||
<h1>Enter the main heading, usually the same as the title.</h1>
|
||||
<p>Be <b>bold</b> in stating your key points. Put them in a list:</p>
|
||||
<ul>
|
||||
<li>The first item in your list</li>
|
||||
<li>The second item; <i>italicize</i> key words</li>
|
||||
</ul>
|
||||
<p>Improve your image by including an image.</p>
|
||||
<p>
|
||||
<img src="https://i.imgur.com/SEBww.jpg" alt="A Great HTML Resource" />
|
||||
</p>
|
||||
<p>
|
||||
Add a link to your favorite
|
||||
<a href="https://www.dummies.com/">Web site</a>. Break up your page
|
||||
with a horizontal rule or two.
|
||||
</p>
|
||||
<hr />
|
||||
<p>
|
||||
Finally, link to <a href="page2.html">another page</a> in your own Web
|
||||
site.
|
||||
</p>
|
||||
<!-- And add a copyright notice.-->
|
||||
<p>© Wiley Publishing, 2011</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
@ -91,8 +98,8 @@
|
||||
|
||||
1. 修改 `nginx.conf` 。
|
||||
|
||||
```
|
||||
$ sudo nano /etc/nginx/nginx.conf
|
||||
```shell
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
|
||||
2. 将下面一段,添加在 `http{}` 内,然后保存(`ctrl+o`)退出(`ctrl+x`)。(记得将域名替换为之前准备好的、包含二级域名的真实域名)
|
||||
@ -112,8 +119,8 @@
|
||||
|
||||
3. 让 `nginx` 重新载入配置使其生效
|
||||
|
||||
```
|
||||
$ sudo systemctl reload nginx
|
||||
```shell
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
4. 完整的设置流程如下:
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
接下来我们要做的,是为我们的域名申请一个真实的 TLS 证书,使网站具备标准 TLS 加密的能力及 HTTPS 访问的能力。这就是 Xray 等现阶段安全代理工具确保流量充分加密最重要的工具。
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
请不要轻易使用自签证书。它并没有让操作简单太多,但增加了无谓的风险(如中间人攻击)。
|
||||
:::
|
||||
|
||||
@ -22,20 +22,20 @@
|
||||
|
||||
2. 运行安装脚本
|
||||
|
||||
```
|
||||
$ wget -O - https://get.acme.sh | sh
|
||||
```shell
|
||||
wget -O - https://get.acme.sh | sh
|
||||
```
|
||||
|
||||
3. 让 `acme.sh` 命令生效
|
||||
|
||||
```
|
||||
$ . .bashrc
|
||||
```shell
|
||||
. .bashrc
|
||||
```
|
||||
|
||||
4. 开启 `acme.sh` 的自动升级
|
||||
|
||||
```
|
||||
$ acme.sh --upgrade --auto-upgrade
|
||||
```shell
|
||||
acme.sh --upgrade --auto-upgrade
|
||||
```
|
||||
|
||||
5. 到这一步的完整流程如下图:
|
||||
@ -48,8 +48,8 @@
|
||||
|
||||
1. 测试证书申请的命令如下(本文均以 `ECC` 证书为例,因为时至今日,实在没什么理由不用它):
|
||||
|
||||
```
|
||||
$ acme.sh --issue --test -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256
|
||||
```shell
|
||||
acme.sh --issue --test -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256
|
||||
```
|
||||
|
||||
::: warning 说明
|
||||
@ -117,8 +117,8 @@
|
||||
|
||||
4. 如果这一步出错的话,你可以运行下面的命令,来查看详细的申请过程和具体的错误。(看不懂就隐藏掉敏感信息后,去 Xray 群里问吧)
|
||||
|
||||
```
|
||||
$ acme.sh --issue --test -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256 --debug
|
||||
```shell
|
||||
acme.sh --issue --test -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256 --debug
|
||||
```
|
||||
|
||||
嗯没错,就是在命令的最后加了一个 `--debug` 参数
|
||||
@ -129,8 +129,8 @@
|
||||
|
||||
1. 申请正式证书的命令如下(即删掉 `--test` 参数,并在最后加入 `--force`参数):
|
||||
|
||||
```
|
||||
$ acme.sh --issue -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256 --force
|
||||
```shell
|
||||
acme.sh --issue -d 二级域名.你的域名.com -w /home/vpsadmin/www/webpage --keylength ec-256 --force
|
||||
```
|
||||
|
||||
::: warning 说明
|
||||
|
@ -7,7 +7,6 @@
|
||||
其实这样的结构是我多番思考之后的决定,毕竟只有打好基础,才能在后面事半功倍快速反超。我在群里看到许多新人连`nano`都无法正确使用,也不会用`WinSCP`,远程手写编辑出来的`config.json`自然错误百出,连查错也变得举步维艰。
|
||||
|
||||
::: warning
|
||||
|
||||
经过了前 6 章的准备,各位已经跟我一起翻越了 Linux 基本操作、VPS 远程管理、网页搭建、域名管理、证书申请等等几座大山。是不是回头看看,觉得其实非常简单呢?现在我们有了如此扎实的准备,接下来安装和配置 Xray
|
||||
时会有一种【水到渠成】的轻快感觉。
|
||||
:::
|
||||
@ -33,26 +32,24 @@
|
||||
|
||||
2. 将安装脚本下载至本地:
|
||||
|
||||
```
|
||||
$ wget https://github.com/XTLS/Xray-install/raw/main/install-release.sh
|
||||
```shell
|
||||
wget https://github.com/XTLS/Xray-install/raw/main/install-release.sh
|
||||
```
|
||||
|
||||
3. 执行安装命令
|
||||
|
||||
```
|
||||
$ sudo bash install-release.sh
|
||||
```shell
|
||||
sudo bash install-release.sh
|
||||
```
|
||||
|
||||
4. 使用完成之后可以删除该脚本
|
||||
|
||||
```
|
||||
$ rm ~/install-release.sh
|
||||
```shell
|
||||
rm ~/install-release.sh
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
|
||||
使用 `rm` 命令删除文件的时候,默认其实就是删除现在所在的文件夹下的文件。但是,**我依然写了完整的路径**: `~/install-release.sh`,这是我使用 `rm`
|
||||
时的一个安全习惯、也是我把安装分成几步之后想强调一下的内容。如果你听过一些“程序员从删库到跑路”之类的段子,大概就知道为什么了。
|
||||
::: warning
|
||||
使用 `rm` 命令删除文件的时候,默认其实就是删除现在所在的文件夹下的文件。但是,**我依然写了完整的路径**: `~/install-release.sh`,这是我使用 `rm` 时的一个安全习惯、也是我把安装分成几步之后想强调一下的内容。如果你听过一些“程序员从删库到跑路”之类的段子,大概就知道为什么了。
|
||||
:::
|
||||
|
||||
5. 完整流程演示如下:
|
||||
@ -67,22 +64,22 @@
|
||||
|
||||
1. 为了规避非 root 账户的各种潜在的权限困扰,我们在 vpsadmin 账户下建立一个证书文件夹
|
||||
|
||||
```
|
||||
$ mkdir ~/xray_cert
|
||||
```shell
|
||||
mkdir ~/xray_cert
|
||||
```
|
||||
|
||||
2. 使用`acme.sh`的`--install-cert`正确安装(拷贝)证书文件
|
||||
|
||||
```
|
||||
$ acme.sh --install-cert -d 二级域名.你的域名.com --ecc \
|
||||
```shell
|
||||
acme.sh --install-cert -d 二级域名.你的域名.com --ecc \
|
||||
--fullchain-file ~/xray_cert/xray.crt \
|
||||
--key-file ~/xray_cert/xray.key
|
||||
```
|
||||
|
||||
3. `xray.key`文件默认对其他用户不可读,所以需要赋予其可读性权限
|
||||
|
||||
```
|
||||
$ chmod +r ~/xray_cert/xray.key
|
||||
```shell
|
||||
chmod +r ~/xray_cert/xray.key
|
||||
```
|
||||
|
||||
4. 过程比较简单就不放动图了:
|
||||
@ -95,13 +92,13 @@
|
||||
|
||||
2. 建立一个脚本文件(`xray-cert-renew.sh`)
|
||||
|
||||
```
|
||||
$ nano ~/xray_cert/xray-cert-renew.sh
|
||||
```shell
|
||||
nano ~/xray_cert/xray-cert-renew.sh
|
||||
```
|
||||
|
||||
3. 把下面的内容复制进去,记得替换你的真实域名,然后保存退出
|
||||
|
||||
```
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
/home/vpsadmin/.acme.sh/acme.sh --install-cert -d a-name.yourdomain.com --ecc --fullchain-file /home/vpsadmin/xray_cert/xray.crt --key-file /home/vpsadmin/xray_cert/xray.key
|
||||
@ -114,8 +111,7 @@
|
||||
echo "Xray Restarted"
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
|
||||
::: warning
|
||||
经大家提醒,`acme.sh` 有一个 `reloadcmd` 命令,可以在证书更新时自动执行特定命令,那么就可以指定自动给 `Xray` 安装证书,但因为 `crontab` 是 Linux
|
||||
系统中一个非常有用、非常常用的功能,所以本文保留 `crontab` 的方式来更新 `Xray` 证书。(对 `reloadcmd` 感兴趣的同学可以查看 `acme.sh`
|
||||
的[官方文档](https://github.com/acmesh-official/acme.sh))
|
||||
@ -127,14 +123,14 @@
|
||||
4. 给这个文件增加【可执行】权限
|
||||
|
||||
```
|
||||
$ chmod +x ~/xray_cert/xray-cert-renew.sh
|
||||
chmod +x ~/xray_cert/xray-cert-renew.sh
|
||||
```
|
||||
|
||||
5. 运行 `crontab -e`,添加一个自动任务【每月自动运行一次`xray-cert-renew.sh`】 (注意不要加`sudo`,因为我们增加的是`vpsadmin`
|
||||
账户的自动任务。初次运行时会让你选择编辑器,当然是选择熟悉的`nano`啦!)
|
||||
|
||||
```
|
||||
$ crontab -e
|
||||
```shell
|
||||
crontab -e
|
||||
```
|
||||
|
||||
6. 把下面的内容增加在文件最后,保存退出即可。
|
||||
@ -155,8 +151,8 @@
|
||||
|
||||
1. 生成一个合法的 `UUID` 并保存备用(`UUID`可以简单粗暴的理解为像指纹一样几乎不会重复的 ID)
|
||||
|
||||
```
|
||||
$ xray uuid
|
||||
```shell
|
||||
xray uuid
|
||||
```
|
||||
|
||||
2. 建立日志文件及文件夹备用
|
||||
@ -165,36 +161,36 @@
|
||||
|
||||
2. 在`vpsadmin`的文件夹内建立一个【日志专用文件夹】
|
||||
|
||||
```
|
||||
$ mkdir ~/xray_log
|
||||
```shell
|
||||
mkdir ~/xray_log
|
||||
```
|
||||
|
||||
3. 生成所需的两个日志文件(访问日志、错误日志)
|
||||
|
||||
```
|
||||
$ touch ~/xray_log/access.log && touch ~/xray_log/error.log
|
||||
```shell
|
||||
touch ~/xray_log/access.log && touch ~/xray_log/error.log
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
这个位置不是`Xray`标准的日志文件位置,放在这里是避免权限问题对新人的操作带来困扰。当你熟悉之后,建议回归默认位置: `/var/log/xray/access.log`
|
||||
和 `/var/log/xray/error.log` 。
|
||||
:::
|
||||
|
||||
4. 因为 Xray 默认是 nobody 用户使用,所以我们需要让其他用户也有“写”的权限(`*.log` 就是所有文件后缀是`log`的文件,此时`CLI`界面的效率优势就逐渐出现了)
|
||||
```
|
||||
$ chmod a+w ~/xray_log/*.log
|
||||
```shell
|
||||
chmod a+w ~/xray_log/*.log
|
||||
```
|
||||
|
||||
3. 使用`nano`创建`Xray`的配置文件
|
||||
|
||||
```
|
||||
$ sudo nano /usr/local/etc/xray/config.json
|
||||
```shell
|
||||
sudo nano /usr/local/etc/xray/config.json
|
||||
```
|
||||
|
||||
4. 将下面的文件全部复制进去,并将之前生成的`UUID`填入第 61 行 `"id": "",` 之中。(填好之后的样子是 `"id": "uuiduuid-uuid-uuid-uuid-uuiduuiduuid"`
|
||||
),本文的这个配置文件中增加了我的各种啰嗦注解,以方便你理解每一个配置模块的功能是什么。
|
||||
|
||||
```json
|
||||
```json5
|
||||
// REFERENCE:
|
||||
// https://github.com/XTLS/Xray-examples
|
||||
// https://xtls.github.io/config/
|
||||
@ -206,92 +202,92 @@
|
||||
// └─ 5_outbounds 出站设置 - 流出 Xray 的流量往哪里去
|
||||
{
|
||||
// 1\_日志设置
|
||||
"log": {
|
||||
"loglevel": "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
|
||||
"access": "/home/vpsadmin/xray_log/access.log", // 访问记录
|
||||
"error": "/home/vpsadmin/xray_log/error.log" // 错误记录
|
||||
log: {
|
||||
loglevel: "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
|
||||
access: "/home/vpsadmin/xray_log/access.log", // 访问记录
|
||||
error: "/home/vpsadmin/xray_log/error.log", // 错误记录
|
||||
},
|
||||
// 2_DNS 设置
|
||||
"dns": {
|
||||
"servers": [
|
||||
dns: {
|
||||
servers: [
|
||||
"https+local://1.1.1.1/dns-query", // 首选 1.1.1.1 的 DoH 查询,牺牲速度但可防止 ISP 偷窥
|
||||
"localhost"
|
||||
]
|
||||
"localhost",
|
||||
],
|
||||
},
|
||||
// 3*分流设置
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
routing: {
|
||||
domainStrategy: "AsIs",
|
||||
rules: [
|
||||
// 3.1 防止服务器本地流转问题:如内网被攻击或滥用、错误的本地回环等
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:private" // 分流条件:geoip 文件内,名为"private"的规则(本地)
|
||||
type: "field",
|
||||
ip: [
|
||||
"geoip:private", // 分流条件:geoip 文件内,名为"private"的规则(本地)
|
||||
],
|
||||
"outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
|
||||
outboundTag: "block", // 分流策略:交给出站"block"处理(黑洞屏蔽)
|
||||
},
|
||||
// 3.2 屏蔽广告
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:category-ads-all" // 分流条件:geosite 文件内,名为"category-ads-all"的规则(各种广告域名)
|
||||
type: "field",
|
||||
domain: [
|
||||
"geosite:category-ads-all", // 分流条件:geosite 文件内,名为"category-ads-all"的规则(各种广告域名)
|
||||
],
|
||||
"outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
|
||||
}
|
||||
]
|
||||
outboundTag: "block", // 分流策略:交给出站"block"处理(黑洞屏蔽)
|
||||
},
|
||||
],
|
||||
},
|
||||
// 4*入站设置
|
||||
// 4.1 这里只写了一个最简单的 vless+xtls 的入站,因为这是 Xray 最强大的模式。如有其他需要,请根据模版自行添加。
|
||||
"inbounds": [
|
||||
inbounds: [
|
||||
{
|
||||
"port": 443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
port: 443,
|
||||
protocol: "vless",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
"id": "", // 填写你的 UUID
|
||||
"flow": "xtls-rprx-direct",
|
||||
"level": 0,
|
||||
"email": "vpsadmin@yourdomain.com"
|
||||
}
|
||||
id: "", // 填写你的 UUID
|
||||
flow: "xtls-rprx-direct",
|
||||
level: 0,
|
||||
email: "vpsadmin@yourdomain.com",
|
||||
},
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
decryption: "none",
|
||||
fallbacks: [
|
||||
{
|
||||
"dest": 80 // 默认回落到防探测的代理
|
||||
}
|
||||
]
|
||||
dest: 80, // 默认回落到防探测的代理
|
||||
},
|
||||
],
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"allowInsecure": false, // 正常使用应确保关闭
|
||||
"minVersion": "1.2", // TLS 最低版本设置
|
||||
"alpn": ["http/1.1"],
|
||||
"certificates": [
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "xtls",
|
||||
xtlsSettings: {
|
||||
allowInsecure: false, // 正常使用应确保关闭
|
||||
minVersion: "1.2", // TLS 最低版本设置
|
||||
alpn: ["http/1.1"],
|
||||
certificates: [
|
||||
{
|
||||
"certificateFile": "/home/vpsadmin/xray_cert/xray.crt",
|
||||
"keyFile": "/home/vpsadmin/xray_cert/xray.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
certificateFile: "/home/vpsadmin/xray_cert/xray.crt",
|
||||
keyFile: "/home/vpsadmin/xray_cert/xray.key",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
// 5*出站设置
|
||||
"outbounds": [
|
||||
outbounds: [
|
||||
// 5.1 第一个出站是默认规则,freedom 就是对外直连(vps 已经是外网,所以直连)
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom"
|
||||
tag: "direct",
|
||||
protocol: "freedom",
|
||||
},
|
||||
// 5.2 屏蔽规则,blackhole 协议就是把流量导入到黑洞里(屏蔽)
|
||||
{
|
||||
"tag": "block",
|
||||
"protocol": "blackhole"
|
||||
}
|
||||
]
|
||||
tag: "block",
|
||||
protocol: "blackhole",
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
@ -304,17 +300,14 @@
|
||||
|
||||
1. 输入下面的命令,享受启动`Xray`的历史性时刻吧!!!
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl start xray
|
||||
|
||||
```shell
|
||||
sudo systemctl start xray
|
||||
```
|
||||
|
||||
2. 仅仅`start`我们并不能确定是否成功的开启了 Xray 的服务,要确定它的状态,就要用到下面的命令。
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl status xray
|
||||
```shell
|
||||
sudo systemctl status xray
|
||||
|
||||
```
|
||||
|
||||
@ -331,34 +324,26 @@
|
||||
|
||||
1. 若你需要暂时关闭 `Xray` 的服务,那就用`stop`命令
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl stop xray
|
||||
|
||||
```shell
|
||||
sudo systemctl stop xray
|
||||
```
|
||||
|
||||
2. 若你需要重启`Xray`的服务,那就用`restart`命令
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl restart xray
|
||||
|
||||
```shell
|
||||
sudo systemctl restart xray
|
||||
```
|
||||
|
||||
3. 若你需要禁用`Xray`的服务(电脑重启后禁止 Xray 自动运行),那就用`disable`命令
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl disable xray
|
||||
|
||||
```shell
|
||||
sudo systemctl disable xray
|
||||
```
|
||||
|
||||
4. 若你需要启用`Xray`的服务(电脑重启后确保 Xray 自动运行),那就用`enable`命令
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl enable xray
|
||||
|
||||
```shell
|
||||
sudo systemctl enable xray
|
||||
```
|
||||
|
||||
## 7.7 服务器优化之一:开启 BBR
|
||||
@ -388,7 +373,7 @@
|
||||
|
||||
内核的稳定是一台服务器稳定运行的基石。**【BBR 测试版带来的细微性能差异绝对不值得更换不稳定的内核。】** 请选择你所在的 Linux 发行版所支持的最新内核,这样可以最大限度的保持服务器的长期稳定和兼容。
|
||||
|
||||
::: warning 注意
|
||||
::: warning
|
||||
所谓魔改`bbr`的【领先】是有非常强的时效性的。比如很多 `bbrplus` 脚本,因为几年来都没有更新,到现在还会把你的内核换成 `4.19`,要知道现在稳定如 Debian 已经是 `5.9`
|
||||
的时代了,那么这个脚本放在 2018 年 1 月也许领先了一点,到 2018 年 10 月 4.19 正发布时就已经失去了意义,放在现在甚至可以说是完完全全的【降级】和【劣化】
|
||||
:::
|
||||
@ -414,10 +399,8 @@
|
||||
|
||||
1. 给 Debian 10 添加官方 `backports` 源,获取更新的软件库
|
||||
|
||||
```
|
||||
|
||||
\$ sudo nano /etc/apt/sources.list
|
||||
|
||||
```shell
|
||||
sudo nano /etc/apt/sources.list
|
||||
```
|
||||
|
||||
::: warning 说明
|
||||
@ -434,8 +417,8 @@ deb http://deb.debian.org/debian buster-backports main
|
||||
|
||||
3. 刷新软件库并查询 Debian 官方的最新版内核并安装。请务必安装你的 VPS 对应的版本(本文以比较常见的【amd64】为例)。
|
||||
|
||||
```
|
||||
$ sudo apt update && sudo apt -t buster-backports install linux-image-amd64
|
||||
```shell
|
||||
sudo apt update && sudo apt -t buster-backports install linux-image-amd64
|
||||
```
|
||||
|
||||
::: warning 注意
|
||||
@ -451,8 +434,8 @@ $ sudo apt update && sudo apt -t buster-backports install linux-image-amd64
|
||||
|
||||
4. 修改 `kernel` 参数配置文件 `sysctl.conf` 并指定开启 `BBR`
|
||||
|
||||
```
|
||||
$ sudo nano /etc/sysctl.conf
|
||||
```shell
|
||||
sudo nano /etc/sysctl.conf
|
||||
```
|
||||
|
||||
::: warning 说明
|
||||
@ -470,8 +453,8 @@ net.ipv4.tcp_congestion_control=bbr
|
||||
|
||||
6. 重启 VPS、使内核更新和`BBR`设置都生效
|
||||
|
||||
```
|
||||
$ sudo reboot
|
||||
```shell
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
7. 完整流程演示如下:
|
||||
@ -487,8 +470,8 @@ $ sudo reboot
|
||||
|
||||
如果你想确认 `BBR` 是否正确开启,可以使用下面的命令:
|
||||
|
||||
```
|
||||
$ lsmod | grep bbr
|
||||
```shell
|
||||
lsmod | grep bbr
|
||||
```
|
||||
|
||||
此时应该返回这样的结果:
|
||||
@ -499,8 +482,8 @@ tcp_bbr
|
||||
|
||||
如果你想确认 `fq` 算法是否正确开启,可以使用下面的命令:
|
||||
|
||||
```
|
||||
$ lsmod | grep fq
|
||||
```shell
|
||||
lsmod | grep fq
|
||||
```
|
||||
|
||||
此时应该返回这样的结果:
|
||||
@ -518,55 +501,43 @@ sch_fq
|
||||
|
||||
2. 编辑 Nginx 的配置文件
|
||||
|
||||
```
|
||||
|
||||
\$ sudo nano /etc/nginx/nginx.conf
|
||||
|
||||
```shell
|
||||
sudo nano /etc/nginx/nginx.conf
|
||||
```
|
||||
|
||||
3. 在我们设置过的 80 端口 Server 中加入下面的语句,并保存退出(可同时删除`root`和`index`两行)
|
||||
|
||||
```
|
||||
|
||||
return 301 https://$http_host$request_uri;
|
||||
|
||||
```
|
||||
|
||||
4. 在与 `80` 端口同级的位置增加一个本地端口监听来提供网页展示。本文以 `8080` 端口做演示。(可以是任意端口)
|
||||
|
||||
```
|
||||
|
||||
server {
|
||||
listen 127.0.0.1:8080;
|
||||
root /home/vpsadmin/www/webpage;
|
||||
index index.html;
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
listen 127.0.0.1:8080;
|
||||
root /home/vpsadmin/www/webpage;
|
||||
index index.html;
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
5. 重启 Nginx 服务
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl restart nginx
|
||||
|
||||
```shell
|
||||
sudo systemctl restart nginx
|
||||
```
|
||||
|
||||
6. 修改 Xray 的回落设置,将回落从 `80` 端口改为 `8080` 端口。(找到 `"dest": 80`, 并改成 `"dest": 8080`)
|
||||
|
||||
```
|
||||
|
||||
\$ sudo nano /usr/local/etc/xray/config.json
|
||||
|
||||
```shell
|
||||
sudo nano /usr/local/etc/xray/config.json
|
||||
```
|
||||
|
||||
7. 重启 `Xray` 服务,即完成了设置
|
||||
|
||||
```
|
||||
|
||||
\$ sudo systemctl restart xray
|
||||
|
||||
```shell
|
||||
sudo systemctl restart xray
|
||||
```
|
||||
|
||||
8. 完整流程演示如下:
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
:::warning 注意
|
||||
|
||||
**注意:** 请务必记得,`Xray` 的路由配置非常灵活,上面的说明只是无限可能性中的一种。
|
||||
请务必记得,`Xray` 的路由配置非常灵活,上面的说明只是无限可能性中的一种。
|
||||
|
||||
借助 `geosite.dat` 和 `geoip.dat` 这两个文件,可以很灵活的从【域名】和【IP】这两个角度、不留死角的控制流量流出的方向。这比曾经单一笼统的 `GFWList` 强大很多很多,可以做到非常细致的微调:比如可以指定 Apple 域名直连或转发、指定亚马逊域名代理或转发,百度的域名屏蔽等等。。。)
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
- 请将 `serverName` 替换成你的真实域名
|
||||
- 各个配置模块的说明我都已经(很啰嗦的)放在对应的配置点上了
|
||||
|
||||
```
|
||||
```json5
|
||||
// REFERENCE:
|
||||
// https://github.com/XTLS/Xray-examples
|
||||
// https://xtls.github.io/config/
|
||||
@ -111,156 +111,138 @@
|
||||
// ├─ 4_inbounds 入站设置 - 什么流量可以流入Xray
|
||||
// └─ 5_outbounds 出站设置 - 流出Xray的流量往哪里去
|
||||
|
||||
|
||||
{
|
||||
// 1_日志设置
|
||||
// 注意,本例中我默认注释掉了日志文件,因为windows, macOS, Linux 需要写不同的路径,请自行配置
|
||||
"log": {
|
||||
// "access": "/home/local/xray_log/access.log", // 访问记录
|
||||
// "error": "/home/local/xray_log/error.log", // 错误记录
|
||||
"loglevel": "warning" // 内容从少到多: "none", "error", "warning", "info", "debug"
|
||||
},
|
||||
// 1_日志设置
|
||||
// 注意,本例中我默认注释掉了日志文件,因为windows, macOS, Linux 需要写不同的路径,请自行配置
|
||||
log: {
|
||||
// "access": "/home/local/xray_log/access.log", // 访问记录
|
||||
// "error": "/home/local/xray_log/error.log", // 错误记录
|
||||
loglevel: "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
|
||||
},
|
||||
|
||||
// 2_DNS设置
|
||||
"dns": {
|
||||
"servers": [
|
||||
// 2.1 国外域名使用国外DNS查询
|
||||
{
|
||||
"address": "1.1.1.1",
|
||||
"domains": [
|
||||
"geosite:geolocation-!cn"
|
||||
]
|
||||
},
|
||||
// 2.2 国内域名使用国内DNS查询,并期待返回国内的IP,若不是国内IP则舍弃,用下一个查询
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
]
|
||||
},
|
||||
// 2.3 作为2.2的备份,对国内网站进行二次查询
|
||||
{
|
||||
"address": "114.114.114.114",
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
]
|
||||
},
|
||||
// 2.4 最后的备份,上面全部失败时,用本机DNS查询
|
||||
"localhost"
|
||||
]
|
||||
},
|
||||
|
||||
// 3_分流设置
|
||||
// 所谓分流,就是将符合否个条件的流量,用指定`tag`的出站协议去处理(对应配置的5.x内容)
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
// 3.1 广告域名屏蔽
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:category-ads-all"
|
||||
],
|
||||
"outboundTag": "block"
|
||||
},
|
||||
// 3.2 国内域名直连
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
// 3.3 国内IP直连
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:cn",
|
||||
"geoip:private"
|
||||
],
|
||||
"outboundTag": "direct"
|
||||
},
|
||||
// 3.4 国外域名代理
|
||||
{
|
||||
"type": "field",
|
||||
"domain": [
|
||||
"geosite:geolocation-!cn"
|
||||
],
|
||||
"outboundTag": "proxy"
|
||||
}
|
||||
// 3.5 默认规则
|
||||
// 在Xray中,任何不符合上述路由规则的流量,都会默认使用【第一个outbound(5.1)】的设置,所以一定要把转发VPS的outbound放第一个
|
||||
]
|
||||
},
|
||||
|
||||
// 4_入站设置
|
||||
"inbounds": [
|
||||
// 4.1 一般都默认使用socks5协议作本地转发
|
||||
{
|
||||
"tag": "socks-in",
|
||||
"protocol": "socks",
|
||||
"listen": "127.0.0.1", // 这个是通过socks5协议做本地转发的地址
|
||||
"port": 10800, // 这个是通过socks5协议做本地转发的端口
|
||||
"settings": {
|
||||
"udp": true
|
||||
}
|
||||
},
|
||||
// 4.2 有少数APP不兼容socks协议,需要用http协议做转发,则可以用下面的端口
|
||||
{
|
||||
"tag": "http-in",
|
||||
"protocol": "http",
|
||||
"listen": "127.0.0.1", // 这个是通过http协议做本地转发的地址
|
||||
"port": 10801 // 这个是通过http协议做本地转发的端口
|
||||
}
|
||||
// 2_DNS设置
|
||||
dns: {
|
||||
servers: [
|
||||
// 2.1 国外域名使用国外DNS查询
|
||||
{
|
||||
address: "1.1.1.1",
|
||||
domains: ["geosite:geolocation-!cn"],
|
||||
},
|
||||
// 2.2 国内域名使用国内DNS查询,并期待返回国内的IP,若不是国内IP则舍弃,用下一个查询
|
||||
{
|
||||
address: "223.5.5.5",
|
||||
domains: ["geosite:cn"],
|
||||
expectIPs: ["geoip:cn"],
|
||||
},
|
||||
// 2.3 作为2.2的备份,对国内网站进行二次查询
|
||||
{
|
||||
address: "114.114.114.114",
|
||||
domains: ["geosite:cn"],
|
||||
},
|
||||
// 2.4 最后的备份,上面全部失败时,用本机DNS查询
|
||||
"localhost",
|
||||
],
|
||||
},
|
||||
|
||||
// 5_出站设置
|
||||
"outbounds": [
|
||||
// 3_分流设置
|
||||
// 所谓分流,就是将符合否个条件的流量,用指定`tag`的出站协议去处理(对应配置的5.x内容)
|
||||
routing: {
|
||||
domainStrategy: "AsIs",
|
||||
rules: [
|
||||
// 3.1 广告域名屏蔽
|
||||
{
|
||||
type: "field",
|
||||
domain: ["geosite:category-ads-all"],
|
||||
outboundTag: "block",
|
||||
},
|
||||
// 3.2 国内域名直连
|
||||
{
|
||||
type: "field",
|
||||
domain: ["geosite:cn"],
|
||||
outboundTag: "direct",
|
||||
},
|
||||
// 3.3 国内IP直连
|
||||
{
|
||||
type: "field",
|
||||
ip: ["geoip:cn", "geoip:private"],
|
||||
outboundTag: "direct",
|
||||
},
|
||||
// 3.4 国外域名代理
|
||||
{
|
||||
type: "field",
|
||||
domain: ["geosite:geolocation-!cn"],
|
||||
outboundTag: "proxy",
|
||||
},
|
||||
// 3.5 默认规则
|
||||
// 在Xray中,任何不符合上述路由规则的流量,都会默认使用【第一个outbound(5.1)】的设置,所以一定要把转发VPS的outbound放第一个
|
||||
],
|
||||
},
|
||||
|
||||
// 4_入站设置
|
||||
inbounds: [
|
||||
// 4.1 一般都默认使用socks5协议作本地转发
|
||||
{
|
||||
tag: "socks-in",
|
||||
protocol: "socks",
|
||||
listen: "127.0.0.1", // 这个是通过socks5协议做本地转发的地址
|
||||
port: 10800, // 这个是通过socks5协议做本地转发的端口
|
||||
settings: {
|
||||
udp: true,
|
||||
},
|
||||
},
|
||||
// 4.2 有少数APP不兼容socks协议,需要用http协议做转发,则可以用下面的端口
|
||||
{
|
||||
tag: "http-in",
|
||||
protocol: "http",
|
||||
listen: "127.0.0.1", // 这个是通过http协议做本地转发的地址
|
||||
port: 10801, // 这个是通过http协议做本地转发的端口
|
||||
},
|
||||
],
|
||||
|
||||
// 5_出站设置
|
||||
outbounds: [
|
||||
// 5.1 默认转发VPS
|
||||
// 一定放在第一个,在routing 3.5 里面已经说明了,这等于是默认规则,所有不符合任何规则的流量都走这个
|
||||
{
|
||||
"tag": "proxy",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "a-name.yourdomain.com", // 替换成你的真实域名
|
||||
"port": 443,
|
||||
"users": [
|
||||
{
|
||||
"id": "uuiduuid-uuid-uuid-uuid-uuiduuiduuid", // 和服务器端的一致
|
||||
"flow": "xtls-rprx-direct", // Windows, macOS 同学保持这个不变
|
||||
// "flow": "xtls-rprx-splice", // Linux和安卓同学请改成Splice性能更强
|
||||
"encryption": "none",
|
||||
"level": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"serverName": "a-name.yourdomain.com", // 替换成你的真实域名
|
||||
"allowInsecure": false // 禁止不安全证书
|
||||
}
|
||||
}
|
||||
{
|
||||
tag: "proxy",
|
||||
protocol: "vless",
|
||||
settings: {
|
||||
vnext: [
|
||||
{
|
||||
address: "a-name.yourdomain.com", // 替换成你的真实域名
|
||||
port: 443,
|
||||
users: [
|
||||
{
|
||||
id: "uuiduuid-uuid-uuid-uuid-uuiduuiduuid", // 和服务器端的一致
|
||||
flow: "xtls-rprx-direct", // Windows, macOS 同学保持这个不变
|
||||
// "flow": "xtls-rprx-splice", // Linux和安卓同学请改成Splice性能更强
|
||||
encryption: "none",
|
||||
level: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "xtls",
|
||||
xtlsSettings: {
|
||||
serverName: "a-name.yourdomain.com", // 替换成你的真实域名
|
||||
allowInsecure: false, // 禁止不安全证书
|
||||
},
|
||||
// 5.2 用`freedom`协议直连出站,即当routing中指定'direct'流出时,调用这个协议做处理
|
||||
{
|
||||
"tag": "direct",
|
||||
"protocol": "freedom"
|
||||
},
|
||||
// 5.3 用`blackhole`协议屏蔽流量,即当routing中指定'block'时,调用这个协议做处理
|
||||
{
|
||||
"tag": "block",
|
||||
"protocol": "blackhole"
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
// 5.2 用`freedom`协议直连出站,即当routing中指定'direct'流出时,调用这个协议做处理
|
||||
{
|
||||
tag: "direct",
|
||||
protocol: "freedom",
|
||||
},
|
||||
// 5.3 用`blackhole`协议屏蔽流量,即当routing中指定'block'时,调用这个协议做处理
|
||||
{
|
||||
tag: "block",
|
||||
protocol: "blackhole",
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
@ -277,7 +259,7 @@
|
||||
|
||||
1. 在 Windows 下,假设你的 `Xray` 程序位置是 `C:\Xray-windows-64\xray.exe`,配置文件位置是`C:\Xray-windows-64\config.json`,那么正确的启动命令就是:
|
||||
|
||||
```
|
||||
```shell
|
||||
C:\Xray-windows-64\xray.exe -c C:\Xray-windows-64\config.json
|
||||
```
|
||||
|
||||
@ -287,8 +269,8 @@
|
||||
|
||||
2. 相似的,在 Linux 和 macOS 下,假设你的 `Xray` 程序位置是 `/usr/local/bin/xray`,配置文件位置是`/usr/local/etc/xray/config.json`,那么正确的启动命令就是
|
||||
|
||||
```
|
||||
$ /usr/local/bin/xray -c /usr/local/etc/xray/config.json
|
||||
```shell
|
||||
/usr/local/bin/xray -c /usr/local/etc/xray/config.json
|
||||
```
|
||||
|
||||
:::tip 说明
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
如果你用了《小小白白话文》中的[Xray 配置](../level-0/ch07-xray-server.md#_7-4-配置xray),并完成了[HTTP 自动跳转 HTTPS 优化](../level-0/ch07-xray-server.md#_7-8-服务器优化之二-开启http自动跳转https),那么你已经有了基于 `VLESS` 协议的简易回落:
|
||||
|
||||
```
|
||||
```json5
|
||||
"inbounds": [
|
||||
{
|
||||
"port": 443,
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
为什么又要再次认识回落呢? 因为,上面仅仅说清楚了基于“协议”的、抵抗【主动探测】的初版回落。
|
||||
|
||||
在 [rprx](https://github.com/rprx) 不断开发迭代 `VLESS` 协议及 `fallback` 功能的过程种,逐渐发现,回落完全可以更加灵活强大,只要在保证抵抗【主动探测】的前提下,充分利用数据首包中的信息,其实可以做到多元素、多层次的回落。(如 `path`, `alpn` 等)
|
||||
在 [RPRX](https://github.com/rprx) 不断开发迭代 `VLESS` 协议及 `fallback` 功能的过程种,逐渐发现,回落完全可以更加灵活强大,只要在保证抵抗【主动探测】的前提下,充分利用数据首包中的信息,其实可以做到多元素、多层次的回落。(如 `path`, `alpn` 等)
|
||||
|
||||
基于这个开发理念,【回落】功能才逐渐成长为现在的完全体,即完成了 `纯伪装 --> ws分流 --> 多协议多特征分流` 的进化。最终版甚至完全替代了以前要用 Web 服务器、其他工具才能完成的分流的功能。且由于上述的【回落/分流】处理都在首包判断阶段以毫秒级的速度完成、不涉及任何数据操作,所以几乎没有任何过程损耗。
|
||||
|
||||
@ -133,58 +133,56 @@
|
||||
|
||||
### 5.1 首先,我将服务器端配置的 443 监听段摘抄如下:
|
||||
|
||||
```
|
||||
```json5
|
||||
{
|
||||
"port": 443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // 填写你的 UUID
|
||||
"flow": "xtls-rprx-direct",
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 1310, // 默认回落到 Xray 的 Trojan 协议
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/websocket", // 必须换成自定义的 PATH
|
||||
"dest": 1234,
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/vmesstcp", // 必须换成自定义的 PATH
|
||||
"dest": 2345,
|
||||
"xver": 1
|
||||
},
|
||||
{
|
||||
"path": "/vmessws", // 必须换成自定义的 PATH
|
||||
"dest": 3456,
|
||||
"xver": 1
|
||||
}
|
||||
]
|
||||
port: 443,
|
||||
protocol: "vless",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
id: "", // 填写你的 UUID
|
||||
flow: "xtls-rprx-direct",
|
||||
level: 0,
|
||||
email: "love@example.com",
|
||||
},
|
||||
],
|
||||
decryption: "none",
|
||||
fallbacks: [
|
||||
{
|
||||
dest: 1310, // 默认回落到 Xray 的 Trojan 协议
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
path: "/websocket", // 必须换成自定义的 PATH
|
||||
dest: 1234,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
path: "/vmesstcp", // 必须换成自定义的 PATH
|
||||
dest: 2345,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
path: "/vmessws", // 必须换成自定义的 PATH
|
||||
dest: 3456,
|
||||
xver: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "xtls",
|
||||
xtlsSettings: {
|
||||
alpn: ["http/1.1"],
|
||||
certificates: [
|
||||
{
|
||||
certificateFile: "/path/to/fullchain.crt", // 换成你的证书,绝对路径
|
||||
keyFile: "/path/to/private.key", // 换成你的私钥,绝对路径
|
||||
},
|
||||
],
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"alpn": [
|
||||
"http/1.1"
|
||||
],
|
||||
"certificates": [
|
||||
{
|
||||
"certificateFile": "/path/to/fullchain.crt", // 换成你的证书,绝对路径
|
||||
"keyFile": "/path/to/private.key" // 换成你的私钥,绝对路径
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
这一段配置用人话要怎么解释呢?
|
||||
@ -230,33 +228,33 @@
|
||||
|
||||
1. 后续处理回落至 `1310` 端口的流量,按照下面的配置验证、处理:
|
||||
|
||||
```
|
||||
```json5
|
||||
{
|
||||
"port": 1310,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "trojan",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"password": "", // 填写你的密码
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"fallbacks": [
|
||||
{
|
||||
"dest": 80 // 或者回落到其它也防探测的代理
|
||||
}
|
||||
]
|
||||
port: 1310,
|
||||
listen: "127.0.0.1",
|
||||
protocol: "trojan",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
password: "", // 填写你的密码
|
||||
level: 0,
|
||||
email: "love@example.com",
|
||||
},
|
||||
],
|
||||
fallbacks: [
|
||||
{
|
||||
dest: 80, // 或者回落到其它也防探测的代理
|
||||
},
|
||||
],
|
||||
},
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "none",
|
||||
tcpSettings: {
|
||||
acceptProxyProtocol: true,
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "none",
|
||||
"tcpSettings": {
|
||||
"acceptProxyProtocol": true
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
看,神奇的事情发生了, `trojan` 协议这里又出现了一个新的 `fallbacks`。前面已经说过,`xray` 中的 `trojan` 协议也具有完整的回落能力,所以,此时 `trojan` 协议可以再次做判断和回落(这也就是传说中的套娃回落了):
|
||||
@ -266,94 +264,94 @@
|
||||
|
||||
2. 后续处理回落至 `1234` 端口的流量,仔细看!它其实是 `vless+ws`:
|
||||
|
||||
```
|
||||
```json5
|
||||
{
|
||||
"port": 1234,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // 填写你的 UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
port: 1234,
|
||||
listen: "127.0.0.1",
|
||||
protocol: "vless",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
id: "", // 填写你的 UUID
|
||||
level: 0,
|
||||
email: "love@example.com",
|
||||
},
|
||||
],
|
||||
decryption: "none",
|
||||
},
|
||||
streamSettings: {
|
||||
network: "ws",
|
||||
security: "none",
|
||||
wsSettings: {
|
||||
acceptProxyProtocol: true, // 提醒:若你用 Nginx/Caddy 等反代 WS,需要删掉这行
|
||||
path: "/websocket", // 必须换成自定义的 PATH,需要和分流的一致
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "none",
|
||||
"wsSettings": {
|
||||
"acceptProxyProtocol": true, // 提醒:若你用 Nginx/Caddy 等反代 WS,需要删掉这行
|
||||
"path": "/websocket" // 必须换成自定义的 PATH,需要和分流的一致
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
3. 后续处理回落至 `2345` 端口的流量,仔细看!它其实是 `vmess直连`:
|
||||
|
||||
```
|
||||
```json5
|
||||
{
|
||||
"port": 2345,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // 填写你的 UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
]
|
||||
port: 2345,
|
||||
listen: "127.0.0.1",
|
||||
protocol: "vmess",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
id: "", // 填写你的 UUID
|
||||
level: 0,
|
||||
email: "love@example.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "none",
|
||||
tcpSettings: {
|
||||
acceptProxyProtocol: true,
|
||||
header: {
|
||||
type: "http",
|
||||
request: {
|
||||
path: [
|
||||
"/vmesstcp", // 必须换成自定义的 PATH,需要和分流的一致
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "none",
|
||||
"tcpSettings": {
|
||||
"acceptProxyProtocol": true,
|
||||
"header": {
|
||||
"type": "http",
|
||||
"request": {
|
||||
"path": [
|
||||
"/vmesstcp" // 必须换成自定义的 PATH,需要和分流的一致
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
4. 后续处理回落至 `3456` 端口的流量,再仔细看!它其实是是 `vmess+ws(+cdn)`。
|
||||
|
||||
::: warning
|
||||
**说明:** 你没看错,这就是 v2fly 曾经的推荐组合之一,并可完整支持 `CDN`。现已加入完美回落套餐哦!
|
||||
::: warning 说明
|
||||
你没看错,这就是 v2fly 曾经的推荐组合之一,并可完整支持 `CDN`。现已加入完美回落套餐哦!
|
||||
:::
|
||||
|
||||
```
|
||||
```json5
|
||||
{
|
||||
"port": 3456,
|
||||
"listen": "127.0.0.1",
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "", // 填写你的 UUID
|
||||
"level": 0,
|
||||
"email": "love@example.com"
|
||||
}
|
||||
]
|
||||
port: 3456,
|
||||
listen: "127.0.0.1",
|
||||
protocol: "vmess",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
id: "", // 填写你的 UUID
|
||||
level: 0,
|
||||
email: "love@example.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
streamSettings: {
|
||||
network: "ws",
|
||||
security: "none",
|
||||
wsSettings: {
|
||||
acceptProxyProtocol: true, // 提醒:若你用 Nginx/Caddy 等反代 WS,需要删掉这行
|
||||
path: "/vmessws", // 必须换成自定义的 PATH,需要和分流的一致
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"security": "none",
|
||||
"wsSettings": {
|
||||
"acceptProxyProtocol": true, // 提醒:若你用 Nginx/Caddy 等反代 WS,需要删掉这行
|
||||
"path": "/vmessws" // 必须换成自定义的 PATH,需要和分流的一致
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: SNI 回落
|
||||
---
|
||||
|
||||
# 通过 SNI 回落功能实现伪装与按域名分流
|
||||
|
||||
VLESS 是一种很轻的协议,和 Trojan 一样,不对流量进行复杂的加密和混淆,而是大隐隐于市,通过 TLS 协议加密,混杂在其他 HTTPS 流量中,在墙内外穿进穿出。为了更好的伪装以应对主动探测,Fallbacks 回落功能随 VLESS 同时出现。这篇教程将演示如何使用 Xray 中 VLESS 入站协议的回落功能配合 Nginx 或 Caddy 在保证伪装完全的前提下实现按域名分流。
|
||||
@ -70,91 +74,91 @@ acme.sh --install-cert -d example.com --fullchain-file /etc/ssl/xray/cert.pem --
|
||||
|
||||
## Xray 配置
|
||||
|
||||
```json
|
||||
```json5
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
log: {
|
||||
loglevel: "warning",
|
||||
},
|
||||
"inbounds": [
|
||||
inbounds: [
|
||||
{
|
||||
"port": 443,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
port: 443,
|
||||
protocol: "vless",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
"id": "UUID",
|
||||
"flow": "xtls-rprx-direct"
|
||||
}
|
||||
id: "UUID",
|
||||
flow: "xtls-rprx-direct",
|
||||
},
|
||||
],
|
||||
"decryption": "none",
|
||||
"fallbacks": [
|
||||
decryption: "none",
|
||||
fallbacks: [
|
||||
{
|
||||
"name": "example.com",
|
||||
"path": "/vmessws",
|
||||
"dest": 5000,
|
||||
"xver": 1
|
||||
name: "example.com",
|
||||
path: "/vmessws",
|
||||
dest: 5000,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
"dest": 5001,
|
||||
"xver": 1
|
||||
dest: 5001,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
"alpn": "h2",
|
||||
"dest": 5002,
|
||||
"xver": 1
|
||||
alpn: "h2",
|
||||
dest: 5002,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
"name": "blog.example.com",
|
||||
"dest": 5003,
|
||||
"xver": 1
|
||||
name: "blog.example.com",
|
||||
dest: 5003,
|
||||
xver: 1,
|
||||
},
|
||||
{
|
||||
"name": "blog.example.com",
|
||||
"alpn": "h2",
|
||||
"dest": 5004,
|
||||
"xver": 1
|
||||
}
|
||||
]
|
||||
name: "blog.example.com",
|
||||
alpn: "h2",
|
||||
dest: 5004,
|
||||
xver: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "xtls",
|
||||
"xtlsSettings": {
|
||||
"alpn": ["h2", "http/1.1"],
|
||||
"certificates": [
|
||||
streamSettings: {
|
||||
network: "tcp",
|
||||
security: "xtls",
|
||||
xtlsSettings: {
|
||||
alpn: ["h2", "http/1.1"],
|
||||
certificates: [
|
||||
{
|
||||
"certificateFile": "/etc/ssl/xray/cert.pem",
|
||||
"keyFile": "/etc/ssl/xray/privkey.key"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
certificateFile: "/etc/ssl/xray/cert.pem",
|
||||
keyFile: "/etc/ssl/xray/privkey.key",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 5000,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
listen: "127.0.0.1",
|
||||
port: 5000,
|
||||
protocol: "vmess",
|
||||
settings: {
|
||||
clients: [
|
||||
{
|
||||
"id": "UUID"
|
||||
}
|
||||
]
|
||||
id: "UUID",
|
||||
},
|
||||
],
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "ws",
|
||||
"wsSettings": {
|
||||
"acceptProxyProtocol": true,
|
||||
"path": "/vmessws"
|
||||
}
|
||||
}
|
||||
}
|
||||
streamSettings: {
|
||||
network: "ws",
|
||||
wsSettings: {
|
||||
acceptProxyProtocol: true,
|
||||
path: "/vmessws",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"outbounds": [
|
||||
outbounds: [
|
||||
{
|
||||
"protocol": "freedom"
|
||||
}
|
||||
]
|
||||
protocol: "freedom",
|
||||
},
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
@ -188,7 +192,7 @@ acme.sh --install-cert -d example.com --fullchain-file /etc/ssl/xray/cert.pem --
|
||||
|
||||
如果使用 Caddy 就大可不必如此繁杂了,因为它**可以**在同一端口上同时监听 HTTP/1.1 和 h2c,配置改动如下:
|
||||
|
||||
```json
|
||||
```json5
|
||||
"fallbacks": [
|
||||
{
|
||||
"name": "example.com",
|
||||
|
@ -51,7 +51,7 @@
|
||||
|
||||
下面的入站配置示例,用大白话说就是:数据按照 `socks` 协议,通过 `10808` 端口,从本机 `127.0.0.1` 流入`Xray`。同时,`Xray` 将这个入站用 `[tag]` 命名为 `inbound-10808`。
|
||||
|
||||
```
|
||||
```json5
|
||||
"inbounds": [
|
||||
{
|
||||
"tag": "inbound-10808",
|
||||
@ -73,7 +73,7 @@
|
||||
|
||||
下面的出站配置示例,用大白话说就是:数据按照 `VLESS` 协议,以 `tcp + xtls (direct)` 的方式、及其他相关设置,把流量发送给对应的 VPS。同时,`Xray` 将这个出站用 `[tag]` 命名为 `proxy-out-vless`:
|
||||
|
||||
```
|
||||
```json5
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "proxy-out-vless",
|
||||
@ -113,7 +113,7 @@
|
||||
|
||||
下面的路由配置示例,用大白话说就是:把所有通过 `[tag]="inbound-10808"` 入站流入 `Xray` 的流量,`100%` 全部流转导入 `[tag]="proxy-out-vless"` 的出站,没有任何分流或其他操作。
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -201,7 +201,7 @@
|
||||
|
||||
在上例的基础上,我们已经有了 `[proxy]` 的出站 `"proxy-out-vless"`,所以它保持不变。显而易见,我们需要加入两个新的出站方式:`[block]` 和 `[direct]`,如下:
|
||||
|
||||
```
|
||||
```json5
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "proxy-out-vless",
|
||||
@ -228,7 +228,7 @@
|
||||
|
||||
接下来就是见证奇迹的时刻了,我们可以用【路由】的配置把这些连接起来!
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -360,9 +360,9 @@
|
||||
|
||||
上一步我们已经配置出了 **【默认科学上网、国内网站白名单直连】** 的规则。那么现在只要 **【把直连规则放在第一位】**,就立即变成了正好相反的 **【默认直连、国外网站白名单科学上网】** 规则。
|
||||
|
||||
是不是,非常的简单?
|
||||
是不是,非常地简单?
|
||||
|
||||
```
|
||||
```json5
|
||||
"outbounds": [
|
||||
{
|
||||
"tag": "direct-out",
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
上述配置如下:
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
上述配置如下:
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -125,7 +125,7 @@
|
||||
|
||||
上述配置如下:
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -157,7 +157,7 @@
|
||||
你需要打开入站代理中的 `sniffing` 才能使用此种方式分流。
|
||||
:::
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -205,7 +205,7 @@
|
||||
`[1-block] --> [2-direct] --> [3-proxy] --> [4-first-outbound]`
|
||||
:::
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -325,7 +325,7 @@
|
||||
|
||||
为了实现上面的目标,他写出了以下路由规则:
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
@ -357,7 +357,7 @@
|
||||
|
||||
正确示范,自然就是将不同的匹配依据独立出来:
|
||||
|
||||
```
|
||||
```json5
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
|
12
package.json
12
package.json
@ -8,15 +8,15 @@
|
||||
"devDependencies": {
|
||||
"@types/bootstrap": "^5.0.13",
|
||||
"@types/jquery": "^3.5.5",
|
||||
"@vuepress/plugin-back-to-top": "^2.0.0-beta.12",
|
||||
"@vuepress/plugin-search": "^2.0.0-beta.12",
|
||||
"@vuepress/plugin-back-to-top": "^2.0.0-beta.13",
|
||||
"@vuepress/plugin-search": "^2.0.0-beta.13",
|
||||
"postcss-loader": "^5.2.0",
|
||||
"prettier": "^2.2.1",
|
||||
"sass": "^1.32.12",
|
||||
"sass-loader": "^11.0.1",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vuepress": "^2.0.0-beta.12",
|
||||
"vuepress-vite": "^2.0.0-beta.12"
|
||||
"vuepress": "^2.0.0-beta.13",
|
||||
"vuepress-vite": "^2.0.0-beta.13"
|
||||
},
|
||||
"scripts": {
|
||||
"docs:dev": "vuepress dev docs",
|
||||
@ -25,8 +25,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.9.1",
|
||||
"@vuepress/plugin-debug": "^2.0.0-beta.12",
|
||||
"bootstrap": "^5.0.0-beta3",
|
||||
"@vuepress/plugin-debug": "^2.0.0-beta.13",
|
||||
"bootstrap": "^5.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"markdown-it-footnote": "^3.0.2",
|
||||
"vuepress-plugin-mermaidjs": "^1.8.1"
|
||||
|
228
yarn.lock
228
yarn.lock
@ -340,16 +340,16 @@
|
||||
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.11.tgz#20d22dd0da7d358bb21c17f9bde8628152642c77"
|
||||
integrity sha512-b+zB8A2so8eCE0JsxjL24J7vdGl8rzPQ09hZNhystm+KqSbKcAej1A+Hbva1rCMmTTqA+hFnUSDc5kouEo0JzA==
|
||||
|
||||
"@vuepress/bundler-vite@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/bundler-vite/-/bundler-vite-2.0.0-beta.12.tgz#723afc6318a63355a5f95c99a14bbde948c3f541"
|
||||
integrity sha512-oxto3yC958KuKf2PEraBmIbzylUpaGke4oJA/RRDOQsixwMJafPYTi8FDpTUqST7A36p7wM/5v+lmF3IT9TwBw==
|
||||
"@vuepress/bundler-vite@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/bundler-vite/-/bundler-vite-2.0.0-beta.13.tgz#51886f68bf17b0bf12d5f0f73d3e0f5138deb96b"
|
||||
integrity sha512-hkvtEaXbMhNaEetpbKTfrCEcPnHcywu2/S2AtGO4nvu11JryXnGG4JdoPzA9O3qo/ZV5xq4eLTHyapu6kse/xA==
|
||||
dependencies:
|
||||
"@vitejs/plugin-vue" "^1.2.2"
|
||||
"@vue/compiler-sfc" "^3.0.11"
|
||||
"@vue/server-renderer" "^3.0.11"
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
rollup "^2.45.2"
|
||||
@ -357,17 +357,17 @@
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/bundler-webpack@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/bundler-webpack/-/bundler-webpack-2.0.0-beta.12.tgz#26e9ac1db976094aded352dd93ed243be4cf2f7d"
|
||||
integrity sha512-hbNsGMuHQebMTRjwVW5T9nKS0OkY3SEN/yOLwCqtNpq5X0hsQRdbpMOYLZl/OncaVqRs6EjCEu0CEPwbSQWnuw==
|
||||
"@vuepress/bundler-webpack@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/bundler-webpack/-/bundler-webpack-2.0.0-beta.13.tgz#302a0251903c69a53b47632acd5beb11d2905b24"
|
||||
integrity sha512-2M0cM+AXNUgclLjYTH8IJPZxzlvIsyw5e+N76M5JpTPnDvttfSdylKYVY6Y06SIYJzgQ7L9CMS9ib9C4KkDI5Q==
|
||||
dependencies:
|
||||
"@types/express" "^4.17.11"
|
||||
"@types/webpack-env" "^1.16.0"
|
||||
"@vue/compiler-sfc" "^3.0.11"
|
||||
"@vue/server-renderer" "^3.0.11"
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
autoprefixer "^10.2.5"
|
||||
@ -392,12 +392,12 @@
|
||||
webpack-dev-server "4.0.0-beta.2"
|
||||
webpack-merge "^5.7.3"
|
||||
|
||||
"@vuepress/cli@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/cli/-/cli-2.0.0-beta.12.tgz#a00905892037560012dc37b3895031a75296d21c"
|
||||
integrity sha512-bQWxURVqW2q/4MabUwhY5VMmkjWy0m6U0agr1Ae2lD/LEWQhrkMRuSK7+V7HxSD7YCu7Rrp+dDXzf/te5CWvpw==
|
||||
"@vuepress/cli@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/cli/-/cli-2.0.0-beta.13.tgz#95a272f8df6c5ded71c47c4005bce10a113a5e96"
|
||||
integrity sha512-xbjBLn+g5Uo0I55j7TM6O6GmkIHzXFVWjcqL72JFFUNK/fbbGHln3Gzwsu7jXHUdGLiNx86nkeKFl9b0IzPzag==
|
||||
dependencies:
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
cac "^6.7.3"
|
||||
chokidar "^3.5.1"
|
||||
@ -413,22 +413,22 @@
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/core@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-2.0.0-beta.12.tgz#234098cf91160abcb639f67496df465e7c0e4df1"
|
||||
integrity sha512-OEo98+A/pfnOT5H4r5zUL/qQHMZB4oml19/2JYwI8SmDdp3XhiyyEVUrlgQou8+S/8cxH95YdIJ/NCvFkWYR9A==
|
||||
"@vuepress/core@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-2.0.0-beta.13.tgz#df2292a61f94de633195c915709b898e9d0c2306"
|
||||
integrity sha512-jFaMVmXRSMszZtx4y6GVg/YDWWSmV59NABpdUgyY5rt2JeBoIyWo+QePPPwiwId1zNCSov7FA2iR/WEsU35Y1g==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/markdown" "2.0.0-beta.12"
|
||||
"@vuepress/markdown" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
gray-matter "^4.0.3"
|
||||
toml "^3.0.0"
|
||||
|
||||
"@vuepress/markdown@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-2.0.0-beta.12.tgz#af60a29648a967fcdf1f15e8a4662c172c1b571d"
|
||||
integrity sha512-RhvcT+imWvCNc6us0BY8KGeXuNcxTn9NlcGNxyUuvxaKJah/kYniQ2shhMob0UBwc2I6gbTQTbACgS4IEJN0Rw==
|
||||
"@vuepress/markdown@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-2.0.0-beta.13.tgz#322c275fd9e3401e9e0666cd46ccf8d6f1dfe603"
|
||||
integrity sha512-sm1A5fcCsVfOns1KZOfLdoMzZT33bh691UzUk47VxYvY1CqkF7PAmWh+dfn9/KzDw6hhJYUbzfBjwToQKUzs7g==
|
||||
dependencies:
|
||||
"@types/markdown-it" "^12.0.1"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
@ -437,120 +437,120 @@
|
||||
markdown-it-anchor "^7.1.0"
|
||||
markdown-it-emoji "^2.0.0"
|
||||
|
||||
"@vuepress/plugin-active-header-links@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-2.0.0-beta.12.tgz#ae08d5eb801a720e9781f3f5e10bf197095a308b"
|
||||
integrity sha512-De/9AfpFC53YKAccbHoNxxZzKZS5IWsFqNjDSaEr0BDj08H43Q9vsqTcNT+PIqXuZT4y11P1iIMCEG6OyW5Lwg==
|
||||
"@vuepress/plugin-active-header-links@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-2.0.0-beta.13.tgz#e85c84475e4be3a318897c9d0599767bcba4199c"
|
||||
integrity sha512-/D0EvQxkE7blzimAvejOv0rYXanms3B0BLvMRH/ROhjz1sITZ1PtsZwha237qpb/+Y9HVC2OERdT8GYYfToVhA==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
ts-debounce "^3.0.0"
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/plugin-back-to-top@2.0.0-beta.12", "@vuepress/plugin-back-to-top@^2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-2.0.0-beta.12.tgz#bdb776ed2db8eae37efd4eb9143deeb9e1b257e2"
|
||||
integrity sha512-MMl1KtSp+d9FezFho058S9pAj569HElBTNdmoEyDimmyEPTu7N5SoGd2RonRpCW28/WBUkuZPA4GUfg8mnnvOQ==
|
||||
"@vuepress/plugin-back-to-top@2.0.0-beta.13", "@vuepress/plugin-back-to-top@^2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-2.0.0-beta.13.tgz#de982688e740bcc7e9fb4eec8d780192c665986c"
|
||||
integrity sha512-eT+R0PqxGwyc1FA/m1m37jOfYPbjit3YYjRwisW1fYDpges9K6suhlOMsOnROCsiJohyXhK2FuiB/uFHpZYAAw==
|
||||
dependencies:
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
ts-debounce "^3.0.0"
|
||||
vue "^3.0.11"
|
||||
|
||||
"@vuepress/plugin-container@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-container/-/plugin-container-2.0.0-beta.12.tgz#902a4c8549dca06d5e3fcd27e9e6df34d8e70325"
|
||||
integrity sha512-004eP4KMGLKfjieJkpE+h9Is5hZra5zCKZZHr00aYAEXeQlw/EP9AKSnL/Ht/UaUNPH3qDzoij+QjkTSRsObSA==
|
||||
"@vuepress/plugin-container@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-container/-/plugin-container-2.0.0-beta.13.tgz#ed74aa7a1ea3e198428194e350d622c51b150d30"
|
||||
integrity sha512-eNCJFX0jrl0N2pfiMakHGc5UC/onZSMzqRFifll+I3GnpgXFZ/wZBStcxJ7NuT93zjXYLQNt29WiP3V3S1eIvg==
|
||||
dependencies:
|
||||
"@types/markdown-it" "^12.0.1"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/markdown" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/markdown" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
markdown-it "^12.0.4"
|
||||
markdown-it-container "^3.0.0"
|
||||
|
||||
"@vuepress/plugin-debug@^2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-debug/-/plugin-debug-2.0.0-beta.12.tgz#faeb11ed539902396ad5868f3efec8f5b9783530"
|
||||
integrity sha512-SaMcVBRrSlM6T/X+XLMTxbKMD+BfGLDIrxHUHw5i8qlnaIei2UcvB66Wc2pfO/pRwlTCQ+9+CbFPOADck+ITqA==
|
||||
"@vuepress/plugin-debug@^2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-debug/-/plugin-debug-2.0.0-beta.13.tgz#6ce609131b6d2b0413b8ff5c2bcabc9c0d7dc606"
|
||||
integrity sha512-dXutfiBN1gWP8yK4pecp+5PWlzZiOtV5X0ZKtHrV/zsK7p5/9cucRtEp0TtNNwG1V5EHxMNtv22R93e16FBppg==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/plugin-git@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-git/-/plugin-git-2.0.0-beta.12.tgz#4597f87599f1480804150fe3bd750d0040447775"
|
||||
integrity sha512-7ntlAJ6pn9bhpAxw7oQpEo5ACsARAfbhNq4O+UVk81JILtfl9kOZp1YBypxNrRL3Ww1ZkXb6mbwsJMNUJFrTtg==
|
||||
"@vuepress/plugin-git@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-git/-/plugin-git-2.0.0-beta.13.tgz#4a974a84e826278959089858fe1573fcae3aa742"
|
||||
integrity sha512-d416V+xM/5g+tUPmHHHV+FfpC5iJhf3dykZDErvcWeEc37Vzpwn5vOSHLyFWtvnBdCnphOV0/t8XWmeBFLQfNA==
|
||||
dependencies:
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
execa "^5.0.0"
|
||||
|
||||
"@vuepress/plugin-medium-zoom@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-2.0.0-beta.12.tgz#50b4e2cc41891ccbe07283bbe60c9fcf2594a779"
|
||||
integrity sha512-PpMZL866mpreoJlxiafJt0gH3e3NhQJlnUdw+uSeF9THRwgUJtKdcQYgbnUi4Mq2reWUtjtiHogyIPrFOj9LTw==
|
||||
"@vuepress/plugin-medium-zoom@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-2.0.0-beta.13.tgz#73fb5d1753c350dba8700e04c5db05f02dd61d1d"
|
||||
integrity sha512-Qsm1/bJvm6tZRt2YnuuxBOI0cUeAdcG/63I5T2QmObNSokcYRHrT+yHPoMo5eIyhGFKexgycPtiEPrpJJStwQA==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
medium-zoom "^1.0.6"
|
||||
vue "^3.0.11"
|
||||
|
||||
"@vuepress/plugin-nprogress@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-2.0.0-beta.12.tgz#3dcac1e487b0f103ff1e8bbef8409fbb6c618186"
|
||||
integrity sha512-UONQ/Kg7ZDlOXwDUvwQeYjGhqPHPVDUEg41UVxqzzgXa1VDeILa6buq4kosYxiAFLgtc37RynIYzQIH+4/Y0ZA==
|
||||
"@vuepress/plugin-nprogress@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-2.0.0-beta.13.tgz#fcb2350076bd96917186e5a8b3ed12c2c68e5b8e"
|
||||
integrity sha512-PblCu4LzihK2Aw1c9nJO0cMe7jwnNVV4hnTe+kO7ftKa3c935nwFiRG2GVmVdaE/zGw8NgjXdMx+7FVNYGPwgA==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
nprogress "^0.2.0"
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/plugin-palette@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-palette/-/plugin-palette-2.0.0-beta.12.tgz#cc9ce3cde8eab3b6442773d409d73a4e09abd15a"
|
||||
integrity sha512-h5hAfqW3aorKo/Q0VmxgAwfM9fIts8IbFogT/gH/t8jeYRB4RlAa5J3Q1npcK3zMlJy6h56lHdeFio4+xfanqw==
|
||||
"@vuepress/plugin-palette@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-palette/-/plugin-palette-2.0.0-beta.13.tgz#25666629eaec86c96b92ebefebf48587208ba27b"
|
||||
integrity sha512-y+aZS0ucip/7qi69ShbL3UA1v3MIx0QVAZ6FtNBTzU0BqbJE12XUa8mw4XCkIRdO6Bo3sjyPIPK/rK9490aWag==
|
||||
dependencies:
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
chokidar "^3.5.1"
|
||||
|
||||
"@vuepress/plugin-prismjs@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-prismjs/-/plugin-prismjs-2.0.0-beta.12.tgz#d4b2a8e8c7a136d4a9fe1cf2788263a7f8cdb405"
|
||||
integrity sha512-1wd6LRCfOGXMYfVXfnBZvHEQosIQ3A8ZyF2Gaqf89UI0V6qoYdaMP7CeAafBFDgjvBCLZm4R1yrBrofB/DG8DQ==
|
||||
"@vuepress/plugin-prismjs@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-prismjs/-/plugin-prismjs-2.0.0-beta.13.tgz#deb7acf2c788279556ea414b24cbac516b8ba408"
|
||||
integrity sha512-9bX3ohRBYutO82ACJL/ol0aL4PcyXbx7JI15no5CsVV1hPaPC84xdo1ZP/XrvfSChODskx2r18nr02bReFGP5w==
|
||||
dependencies:
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
prismjs "^1.23.0"
|
||||
|
||||
"@vuepress/plugin-search@^2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-2.0.0-beta.12.tgz#b0e7ad3ba20458f28f45d0e5a3e6d22badb96a0c"
|
||||
integrity sha512-a3s1mZNa+osTsOO9zqbgB7SWLvb5HUgFwC2HglGGFxWYfWp2hjY6vEUksGQDgh2gDVMuK77XvSSFJc4DMTJLIw==
|
||||
"@vuepress/plugin-search@^2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-2.0.0-beta.13.tgz#15b44034b7566e0ff0e3b6ea641be3a2ef5c573e"
|
||||
integrity sha512-gehkWIXtYZ4qe9XNt3kqkuDqwpisoWCMnW6dsH/eKgvGdA30Me8wSRmyY5jkCv3wB7go2v1BEPaDntVVnhUD4A==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
chokidar "^3.5.1"
|
||||
vue "^3.0.11"
|
||||
vue-router "^4.0.6"
|
||||
|
||||
"@vuepress/plugin-theme-data@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-theme-data/-/plugin-theme-data-2.0.0-beta.12.tgz#8ca8e227b2ac1fb552b49b05238008e94d7b82f5"
|
||||
integrity sha512-3YeGZgHxQ6pwrgXM13oKBxCL8xXBNZ5VyglBM1cy8irM9Q0TgmDOyDo06CdOClVCNO5JkeFNDrMXtB3u99d7jg==
|
||||
"@vuepress/plugin-theme-data@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/plugin-theme-data/-/plugin-theme-data-2.0.0-beta.13.tgz#3c8c15f403f024cf3cdbcb8696f9d25bab502289"
|
||||
integrity sha512-VswhgTg9KAoCTRv8Z0tyxc2X4k4o23a8y3bihbw6HEJg8vFym9HlUFfSLJw8IFio+SO6llSIZX0toXwpaI19YQ==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
|
||||
@ -561,22 +561,22 @@
|
||||
dependencies:
|
||||
"@vue/shared" "^3.0.11"
|
||||
|
||||
"@vuepress/theme-default@2.0.0-beta.12":
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-2.0.0-beta.12.tgz#9d09bda45e07eef1a70660d912695007af4b7ea8"
|
||||
integrity sha512-BRYVF3vSGYjM3OHxMSASI8/GouoP6k2qQCBkEs09KChu+z+T+6F6w129pWs0tG5pZx9RTPkkGIOFoFpyuDPGyQ==
|
||||
"@vuepress/theme-default@2.0.0-beta.13":
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-2.0.0-beta.13.tgz#d4d7aa98fca6e647534662f72df48a8816257775"
|
||||
integrity sha512-KcNvLHVt9+EsSRTztbZo5yyo2cFPdg+QE5+2IC7PqjhpYY8a0DprjmsT3kUc+qEZhBHPEydwU9jdxq2nEUxTIg==
|
||||
dependencies:
|
||||
"@vuepress/client" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-active-header-links" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-back-to-top" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-container" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-git" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-medium-zoom" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-nprogress" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-palette" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-prismjs" "2.0.0-beta.12"
|
||||
"@vuepress/plugin-theme-data" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-active-header-links" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-back-to-top" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-container" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-git" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-medium-zoom" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-nprogress" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-palette" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-prismjs" "2.0.0-beta.13"
|
||||
"@vuepress/plugin-theme-data" "2.0.0-beta.13"
|
||||
"@vuepress/shared" "2.0.0-beta.7"
|
||||
"@vuepress/utils" "2.0.0-beta.11"
|
||||
sass "^1.32.11"
|
||||
@ -928,10 +928,10 @@ boolbase@^1.0.0, boolbase@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
|
||||
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
||||
|
||||
bootstrap@^5.0.0-beta3:
|
||||
version "5.0.0-beta3"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.0-beta3.tgz#c959f61fbd03667a1b158f763856994859d7a465"
|
||||
integrity sha512-0urccjfIOzhrb9qJysN8XW/DRw6rg3zH7qLeKIp4Zyl8+Ens4JWB0NC0cB5AhnSFPd2tftRggjwCMxablo6Tpg==
|
||||
bootstrap@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.0.tgz#97635ac0e0d6cb466700ebf0fd266bfabf352ed2"
|
||||
integrity sha512-tmhPET9B9qCl8dCofvHeiIhi49iBt0EehmIsziZib65k1erBW1rHhj2s/2JsuQh5Pq+xz2E9bEbzp9B7xHG+VA==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
@ -4149,25 +4149,25 @@ vuepress-plugin-mermaidjs@^1.8.1:
|
||||
dependencies:
|
||||
mermaid "^8.8.3"
|
||||
|
||||
vuepress-vite@^2.0.0-beta.12:
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/vuepress-vite/-/vuepress-vite-2.0.0-beta.12.tgz#d82082dd84f95849a658c33a2409894c058e3861"
|
||||
integrity sha512-QmVzU4W2EphdzJq1+QvegEXO7H4SutUEoe5SLOEwCuWShhQV5mK5iHfe1MBj1smn6nSl+DpIREzFkGV1fFm+Rg==
|
||||
vuepress-vite@^2.0.0-beta.13:
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/vuepress-vite/-/vuepress-vite-2.0.0-beta.13.tgz#27c6910d7ccc9da4e503da0103ae7f005e076494"
|
||||
integrity sha512-oBW6wT5qb3i95d8ofGDrDWtnQEfmKzgC8qBehHA8vzC32rGn6M8nNwp2p7AQ9Ja7vXadGB+ni7WXwMUrz/vL9A==
|
||||
dependencies:
|
||||
"@vuepress/bundler-vite" "2.0.0-beta.12"
|
||||
"@vuepress/cli" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/theme-default" "2.0.0-beta.12"
|
||||
"@vuepress/bundler-vite" "2.0.0-beta.13"
|
||||
"@vuepress/cli" "2.0.0-beta.13"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/theme-default" "2.0.0-beta.13"
|
||||
|
||||
vuepress@^2.0.0-beta.12:
|
||||
version "2.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-2.0.0-beta.12.tgz#0b9f21283f13a415f5fcae3a346dd15784625478"
|
||||
integrity sha512-4F73CBC9/eFQ9olHY8kV6fiI5ZHEfzuXwK7GwHknddvtBN/GuO+pjwgiEq6OZ9VmcpSBIIjJMHNPN0E0ufDtTw==
|
||||
vuepress@^2.0.0-beta.13:
|
||||
version "2.0.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-2.0.0-beta.13.tgz#d0649420781f0357072cae00ebb71283c2e475f4"
|
||||
integrity sha512-41MEemyW5d3zjOznNanjESRJU1RrkzeuZ411UxwSGxm6gn9EQYn5ACLi8c05cmTZ9+GXl/lhjsbs/J62hJ+qOQ==
|
||||
dependencies:
|
||||
"@vuepress/bundler-webpack" "2.0.0-beta.12"
|
||||
"@vuepress/cli" "2.0.0-beta.12"
|
||||
"@vuepress/core" "2.0.0-beta.12"
|
||||
"@vuepress/theme-default" "2.0.0-beta.12"
|
||||
"@vuepress/bundler-webpack" "2.0.0-beta.13"
|
||||
"@vuepress/cli" "2.0.0-beta.13"
|
||||
"@vuepress/core" "2.0.0-beta.13"
|
||||
"@vuepress/theme-default" "2.0.0-beta.13"
|
||||
|
||||
watchpack@^2.0.0:
|
||||
version "2.1.1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user