|
49 | 49 | - [9.2 SSH 隧道](#92-ssh-隧道)
|
50 | 50 | - [9.3 Github / Git SSH 代理](#93-github--git-ssh-代理)
|
51 | 51 | - [9.4 Cloudflare Warp 原生 IP](#94-cloudflare-warp-原生-ip)
|
| 52 | + - [9.4.1 脚本安装](#941-脚本安装) |
| 53 | + - [9.4.2 手动安装](#942-手动安装) |
52 | 54 | - [10. 其它](#10-其它)
|
53 | 55 | - [10.1 其它方式](#101-其它方式)
|
54 | 56 | - [10.2 搭建脚本](#102-搭建脚本)
|
@@ -965,11 +967,44 @@ Host github.com
|
965 | 967 |
|
966 | 968 | 所谓“原生 IP”就是指该网站的 IP 地址和其机房的 IP 地址是一致的,但是,很多 IDC 提供商的 IP 都是从其它国家调配来的,这导致我们就算是翻墙了,也是使用了美国的 VPS,但是还是访问不了相关的服务。所以,我们需要使用 Cloudflare Warp 来访问这些网站。
|
967 | 969 |
|
968 |
| -下面是一个在 Ubuntu 20.10 上安装 Cloudflare Warp 的教程。 |
969 | 970 |
|
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 手动安装 |
973 | 1008 |
|
974 | 1009 | **1) 安装软件包**
|
975 | 1010 |
|
@@ -1047,28 +1082,18 @@ Endpoint = 162.159.192.1:2408
|
1047 | 1082 | - `162.159.192.1` 是域名的 `engage.cloudflareclient.com` 的 IP 地址,你可以使用 `nslookup engage.cloudflareclient.com` 获得。
|
1048 | 1083 | - 配置文件中默认的 DNS 是 `1.1.1.1` 这里使用了 Google 的 DNS,因为会快一些。
|
1049 | 1084 |
|
1050 |
| -**7)启动 WireGuard** |
| 1085 | +**7)启停 WireGuard** |
1051 | 1086 |
|
1052 |
| -临时启用网络接口(命令中的 `wgcf` 对应的是配置文件 `/etc/wireguard/wgcf.conf` 的文件名前缀) |
| 1087 | +启用网络接口(命令中的 `wgcf` 对应的是配置文件 `/etc/wireguard/wgcf.conf` 的文件名前缀) |
1053 | 1088 |
|
1054 | 1089 | ```shell
|
1055 | 1090 | sudo wg-quick up wgcf
|
1056 | 1091 | ```
|
1057 | 1092 |
|
1058 |
| -使用 `curl ipinfo.io` 命令来检查你的 IP 地址,如果显示的是 Cloudflare 的 IP 地址,那么恭喜你,你已经成功了。如: |
| 1093 | +停止网络接口如下: |
1059 | 1094 |
|
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 |
1072 | 1097 | ```
|
1073 | 1098 |
|
1074 | 1099 | **8)设置开机自启动**
|
|
0 commit comments