Skip to content

Commit 645f386

Browse files
committed
add cloudflare warp script installation
1 parent 2b7afae commit 645f386

File tree

1 file changed

+44
-19
lines changed

1 file changed

+44
-19
lines changed

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
- [9.2 SSH 隧道](#92-ssh-隧道)
5050
- [9.3 Github / Git SSH 代理](#93-github--git-ssh-代理)
5151
- [9.4 Cloudflare Warp 原生 IP](#94-cloudflare-warp-原生-ip)
52+
- [9.4.1 脚本安装](#941-脚本安装)
53+
- [9.4.2 手动安装](#942-手动安装)
5254
- [10. 其它](#10-其它)
5355
- [10.1 其它方式](#101-其它方式)
5456
- [10.2 搭建脚本](#102-搭建脚本)
@@ -965,11 +967,44 @@ Host github.com
965967

966968
所谓“原生 IP”就是指该网站的 IP 地址和其机房的 IP 地址是一致的,但是,很多 IDC 提供商的 IP 都是从其它国家调配来的,这导致我们就算是翻墙了,也是使用了美国的 VPS,但是还是访问不了相关的服务。所以,我们需要使用 Cloudflare Warp 来访问这些网站。
967969

968-
下面是一个在 Ubuntu 20.10 上安装 Cloudflare Warp 的教程。
969970

970-
> **Note**:
971-
>
972-
> 你也可以使用这个一键安装的脚本来完成 https://github.com/P3TERX/warp.sh
971+
#### 9.4.1 脚本安装
972+
973+
你可以使用这个一键安装的脚本来快速完成安装 https://github.com/P3TERX/warp.sh
974+
975+
下载脚本
976+
```shell
977+
wget git.io/warp.sh
978+
chmod +x warp.sh
979+
```
980+
运行脚本 中文菜单
981+
```shell
982+
./wrap.sh menu
983+
```
984+
先后执行如下安装:
985+
- 1 - 安装 Cloudflare WARP 官方客户端
986+
- 4 - 安装 WireGuard 相关组件
987+
- 7 - 自动配置 WARP WireGuard 双栈全局网络
988+
989+
990+
使用 `curl ipinfo.io` 命令来检查你的 IP 地址,如果显示的是 Cloudflare 的 IP 地址,那么恭喜你,你已经成功了。如:
991+
992+
```json
993+
{
994+
"ip": "104.28.227.191",
995+
"city": "Los Angeles",
996+
"region": "California",
997+
"country": "US",
998+
"loc": "34.0522,-118.2437",
999+
"org": "AS13335 Cloudflare, Inc.",
1000+
"postal": "90009",
1001+
"timezone": "America/Los_Angeles",
1002+
"readme": "https://ipinfo.io/missingauth"
1003+
}
1004+
```
1005+
1006+
1007+
#### 9.4.2 手动安装
9731008

9741009
**1) 安装软件包**
9751010

@@ -1047,28 +1082,18 @@ Endpoint = 162.159.192.1:2408
10471082
- `162.159.192.1` 是域名的 `engage.cloudflareclient.com` 的 IP 地址,你可以使用 `nslookup engage.cloudflareclient.com` 获得。
10481083
- 配置文件中默认的 DNS 是 `1.1.1.1` 这里使用了 Google 的 DNS,因为会快一些。
10491084

1050-
**7)启动 WireGuard**
1085+
**7)启停 WireGuard**
10511086

1052-
临时启用网络接口(命令中的 `wgcf` 对应的是配置文件 `/etc/wireguard/wgcf.conf` 的文件名前缀)
1087+
启用网络接口(命令中的 `wgcf` 对应的是配置文件 `/etc/wireguard/wgcf.conf` 的文件名前缀)
10531088

10541089
```shell
10551090
sudo wg-quick up wgcf
10561091
```
10571092

1058-
使用 `curl ipinfo.io` 命令来检查你的 IP 地址,如果显示的是 Cloudflare 的 IP 地址,那么恭喜你,你已经成功了。如
1093+
停止网络接口如下
10591094

1060-
```json
1061-
{
1062-
"ip": "104.28.227.191",
1063-
"city": "Los Angeles",
1064-
"region": "California",
1065-
"country": "US",
1066-
"loc": "34.0522,-118.2437",
1067-
"org": "AS13335 Cloudflare, Inc.",
1068-
"postal": "90009",
1069-
"timezone": "America/Los_Angeles",
1070-
"readme": "https://ipinfo.io/missingauth"
1071-
}
1095+
```shell
1096+
sudo wg-quick down wgcf
10721097
```
10731098

10741099
**8)设置开机自启动**

0 commit comments

Comments
 (0)